cancel
Showing results for 
Search instead for 
Did you mean: 

Expose CDS View as OData Service/API in S/4HANA 2002 On-Premise

Vedette
Explorer
0 Kudos

I am new to CDS / Odata services.

I have created a very basic CDS View in eclipse (with ADT) for our S/4HANA 2022 On-Premise system. The CDS view displays data from a standard SAP table. I can run the service in the browser as an app and display the data.

I would like to also run this as an external API. How can I achieve this? Assuming I need to create a service definition, then a service binding? What type of service binding? Is there another step needed after this to create and find the API service url?

Accepted Solutions (1)

Accepted Solutions (1)

Pradeep_Reddy
Participant
0 Kudos

Hi,

Check API Availability: Visit SAP API Hub and verify if the API for the standard table is available.

Access Transaction '/n/IWFND/V4_ADMIN': Log in to your SAP system and navigate to the transaction '/n/IWFND/V4_ADMIN'. This transaction is utilized for managing OData services in SAP Gateway.

Publish Service Groups:

Within '/n/IWFND/V4_ADMIN', locate and click on 'Publish Service Groups'. This action enables the service groups to be accessible for consumption.
Select System Alias:

Choose the relevant system alias from the provided options. The system alias helps identify and connect to the appropriate SAP system.
Enter Service Group ID:

Input the name or ID of the service group you wish to publish.
Retrieve Service Groups:

After entering the service group ID, click on 'Get Service Groups' to retrieve the available service groups associated with the provided ID.
Select Service Group:

From the list of retrieved service groups, select the one you intend to publish.
Publish Service Group:

Once selected, click on 'Publish Service Groups' to make the chosen service group available for use.
By following these steps, you can effectively publish service groups and make them accessible for consumption within your SAP environment.

 

If there is no standard API is available, create a RAP API service consumption on top of CDS view and publish the service using above steps.

Test the service using postman with the user credentials. 

 

 

Regards,

Pradeep.

Vedette
Explorer
0 Kudos
Thank you. I managed to get it working now.

Answers (0)