Monday, February 15, 2021

SAP CDS Views: Publishing an oData Service from a CDS View and Testing it (10 Simple Steps)

 In this post I am going to use the example from my previous post and publish it as an oData service in ten simple steps:

1. In the annotation part of the DDL, declare the publisher as 'true'



2. Make sure that the CDS View has at least one key field


3. Go to transaction SEGW and create a new project


4. Import the Structure of the CDS View to the new project


5. Map to the Data Source
6. Generate Mapping & Activate


7. Go to the Transaction /IWFND/MAINT_SERVICE 'Activate and Maintain Services' -> Add Service




Here select the System Alias and search for the Service with the name of the oData project

8. Load the Metadata and go to the Test Client





9. Coose an Entity Set you want to test.
In our example we have only one entity set.

10. Test your service













1 comment:

  1. Thank you very much, beautifully simple and comprehensible. I was able to build and extend the example quickly.

    ReplyDelete