Skip to Content
Technical Articles
Author's profile photo SAKRIYANAIK NK

Creating ODATA Service with CDS Views and Consume the same in SAP CPI

let us assume that we have requirement for creating ODATA service for any SAP Standard table VBAK SALES document header- we can achieve this through simple code in SAP HANA Studio with CDS Views.  Here is the below step by step procedure.

Install latest version development tools in eclipse other it will not allow to connect SAP application server.

SAP Development Tools for Eclipse 2020-03 –

make the connectivity with SAP application system and create ABAP Repository Object




Create new ABAP Repository object and select as Data Definition as below and specify the Package TR, and object name.

select the new template as -default view and finish.


below is the default code is created – now go ahead and specify the view name and data source name.

choose ctrl+space will get the list of all fields in VBAK table as below – as mentioned you can specify any SAP standard table as there are 200+ fields are there in VBAK table – now we need to select as per the business requirement which are the fields require to expose the data through ODATA service.



activate – once it is activated successfully in the backend SAP Application server SAP HANA view is crated this view can not be edited directly in SAP GUI. we can also run and check the data in Eclipse view.


SAP HANA annotation is added with @ODATA.publish.true and activate .


here the below ZCDS_SALESDOCHEADER_CDS ODATA is created. now we need to active and register this into SAP GW.


here the below service is added in GW service maintenance t.code /n/IWFND/MAINT_SERVICE

then go ahead with add the selected service -specify the package name TR for transports.


service metadata is loaded – as above and go and search this service. now the ODATA service is ready for testing.


Now add your Gateway server HTTP service in SAP Cloud connector and consume this ODATA service in SAP CPI time bound iflow with ODATA Adapter and process the data to target legacy cloud applications. For Details you can ref my other SAP Blogs.


Krushi Nenavath

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Venkat Kodi
      Venkat Kodi

      Hi Krushi Nenavath,

      I have created the OData Service with ABAP CDS View to get the S/4HANA Could data into SQL Server.

      I didn't find the next part of this blog. Could you please explain in detail on how to get this data with OData ino SQL Server with SAP CPI.