Hello everyone, in this blog we will discuss on how to create OData service for ABAP CDS views in SEGW Gateway Builder transaction.
In previous blog How to create OData service for ABAP CDS Views we have seen an easy approach on exposing the ABAP CDS view as an OData service using the annotation @OData.publish: true and also the restrictions/disadvantages by following the approach.
To overcome the above restriction, we can follow this approach. Below are the features supported.
Advantages and Features Supported
- Multiple Entities i.e multiple CDS views
- Actions using Function Imports in SEGW
- CDS View with parameters
- CDS annotations considered and derived at runtime
- CDS changes will be reflected at runtime, no need for re-activation
Basic understating of ABAP CDS views, to know more click here.
1. Creating an New Project
Launch SEGW – Gateway Service Builder transaction on front-end server(FES).
Reference Data Source
You can further explore the properties and other artifacts created.
2. Generating Model Provider Class/Data Provider Class and Other Runtime Objects
Navigate and select the project node and hit Generate Runtime Objects button to generate the SEGW OData service run-time artifacts.
On the Create Object Directory Entry dialog box, enter a value (e.g. $TMP) to the Package field, and then choose Save.
Now the service classes are generated.
3. Activating Service
Launch the transaction /IWFND/MAINT_SERVICE – Activate and Maintain Services.
On Add Selected Service screen provide the value for System Alias field and then choose Enter. A list of services is then displayed.
4. Test Service in Gateway Client
Congrats..! You have successfully created an OData service for ABAP CDS view using SEGW based on SADL framework. Please stay tuned for ABAP CDS View Tutorials.
ABAP CDS Views
Leave a comment in the below comment section and let us know your feedback.