Now we are going to expose our CDS view as an OData service.
Pre-requisite- Please visit my previous blog post for the development of CDS view-
Expose CDS view as OData service:
- Add the following annotation to the ZXC_SO_84 CDS view just before the view definition- @OData.publish : true
- Press “CTRL + S” to save the changes and “CTRL + F3” to activate the CDS view.
- Now register our OData service in the SAP system. Open SAP system -> Go to t-code “/N/IWFND/MAINT_SERVICE” -> Click on “Add service” -> Search services.
- Enter “System Alias” – “Local” -> Press “Add Selected Service” -> Specify Package name (Here we are doing for the Local development) use $TMP -> Click on .
- Check the newly registered service.
- Select the service -> Click on SAP Gateway Client -> Execute.
- Now we successfully exposed our CDS view as OData service.
- In the next blog post we will develop an SAP Fiori Elements (Analytcial List Page/ Object Page) template and define UI annotations for the application in the CDS view.