Skip to Content
Author's profile photo Shivankit Bisht

Consumption of CDS in an OData Service

Consumption of CDS in an Odata Service

1. In Hana Studio, ABAP Development Perspective click on add a new ABAP Project. From here you can directly add  your SAP System to your Studio. Login details

    remain the same as your SAP Logon.


2. After the system is added you can see it Righ hand side in you r Project Explorer. Right click on it and select DDL source. You can create these repository artifacts as local  

    objects belonging to the $TMP package.


3. Provide a source table or view and give a SQL view name. Select all the field that you might require on your UI. (TIP: Press Ctrl+Enter to bring the entire list help of fields.)


4. Now, Give some annotation to make the data more readable on UI. Annotations allow to enhance the core meta model with consumer-specific vocabularies. For eg. @EnduserText.label will give the UI label for the partner field.


5. Now to register the Odata service , go to the transaction segw in the same system in the ABAP System and click on create project.


6. Provide the CDS data source and give the CDS name.




7. Now click on Generate Runtime Objects.


8. Now click on Register Service to create a service in the system. Here we will select ER9. Provide alias as local and package as $temp.

After successful registration the registration status will show in Green.


9. Now click on SAP Gateway Client Button. There click on Execute.


10. So after this we need a UI for our service. This we can do in WebIDE


11. Select Smart Template Application




Click Finish.

12.   Finally, it’s time to run our project. Click on the green Play icon on the top.


And, this is the final result.


Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Nice Documentation

      Author's profile photo Prasad Pomaji
      Prasad Pomaji

      Very well explained. Helped in creating a small(but fast) end to end project with CDS view-oData service-UI.

      Thanks for the document.

      Author's profile photo Rabert Kumar
      Rabert Kumar

      Very useful documentation.

      Thank you Shivankit Bisht.