Dear SAPLearners, in this blog post i will discuss about different ways to create and model an OData service in SEGW(Gateway Builder) and Eclipse ABAP Development Tools.
SEGW(Gateway Builder) Tool
There are 3 different approaches to create and model an OData service in gateway builder(SEGW). They are
1. ABAP code-based implementation
This is most used approach in creating OData services. In this approach we define the model and write the business data retrieval logic in run-time generated artifact DPC_EXT class.
Before discussing the other approaches i would like to introduce you to the SADL (Service Adaptation Description Language), as the other 2 approaches depend on this framework.
Service Adaptation Description Language(SADL)
SADL is an ABAP technology that enables the consumption of entity relationship-like ABAP data models in various scenarios with a common development experience based on a model-driven approach. – SAP definition
SADL model is a data model like CDS views, DDIC tables (or) views and BOPF.
In short, SADL framework allows us to create OData service based on a model-driven approach using ABAP CDS Views.
Now, lets continue with other approaches
2. Mapping Editor
In SEGW gateway builder, you can map an ABAP CDS Views as a data source to the entity type properties.
With this approach, the business logic is available in ABAP CDS View. The SADL framework provides a standard, optimized implementation of the OData service to retrieve data.
3. Referenced Data Source
Along with these 3 approaches we have another approach, that is using annotation in ABAP CDS views.
ABAP Development Tools(Eclipse-based IDE)
4. Using Annotation
In this approach we can create OData service directly on ABAP CDS View in Eclipse ABAP Development Tools using annotation @OData.publish: true
Now we know 4 different ways to create OData service and different tools cover different use cases. Below is the table which compares different approaches.
Comparing Different Approaches
Please feel free to comment and let us know your feedback. Subscribe for more updates
If you liked it, please share it! Thanks!