Skip to Content

SAP C4 SDK: How to consume an ODATA service in C4 PDI ?

I would like to consume an ODATA service call from CPI in C4 using SDK/PDI. I searched a lot of blogs here in SDN but couldn't find a way to do this development. Also i found a reference which says that it's not possible to consume the ODATA from external systems in SDK, but that reference was in 2016. I am not sure if the situation remains the same ?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jul 15, 2020 at 05:06 PM

    Hi,

    You can very well consume external REST(ODATA) or SOAP service from C4C SDK from a very long time even before 2016.

    Steps:

    1. Create an external web service integration in PDI/SDK. Choose REST as the protocol.

    2. Give the service name as the endpoint of the external system. Ex: calling own service as odata https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ . Once done then activate this web service integration.

    web-service.png

    3. Create a communication arrangement against the scenario generated as part of step 2 activation.

    4. Write an ABSL script to consume service generated in the above steps. Use WebServiceUtilities.ExecuteRESTService method to consume his service.

    Pls refer https://blogs.sap.com/2018/12/06/use-restful-service-to-consume-s4-functionality-in-sap-cloud-for-customer/ as well as https://answers.sap.com/questions/12951181/consume-an-external-rest-webservice-in-c4c.html for more details about the implementation.


    web-service.png (15.2 kB)
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.