Skip to Content
author's profile photo Former Member
Former Member

Consume HCP OData from within SAP Cloud Application Studio

Hello Experts,

I have a requirement that states a need to consume (read, etc) data via OData provided by an application running SAP Hana Cloud Platform from within SAP Cloud for Customer.

The data should be displayed on C4C UI screen.

Any idea how to implement this? would a mashup work here or there is a better way to do that?

Looking forward for you answers.

Best regards

Mohammed

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Aug 11, 2016 at 07:16 PM

    Hi Mohammed,

    Basically, you can do the following:

    1) Create an external webservice integration in studio.
    2) Set to use REST webservice.

    3) Generate and configure communications systems and arrangements.

    4) Perform the request by absl code and parse (you have to parse it by yourself =\) the response into your fields.

    You can read about "external webservice integration" in the studio documentation.

    Regards,

    Alexandre.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Mohammed,

      The request is something like:

      var communicationScenarioName = "Blah"; var serviceName = "BlahBlah"; var httpMethod = "POST"; var resourceName = ""; var contentType = "application/json"; var urlParameters : collectionof NameAndValue; var headerParameters : collectionof NameAndValue; var body = "{\"value\":{\"key\":\"" + params.WSKeyExterna + "\",\"secret\":\"" + params.WSSecretExterno + "\"}}";

      var response = WebServiceUtilities.ExecuteRESTService(communicationScenarioName,serviceName, httpMethod, resourceName, urlParameters,headerParameters,contentType, body);

      There are posts here in scn with more examples.

      To parse the response, you can create a library that uses the following code:How to Parse a String in JSON Format in ABSL

      Then, you search/loop for the fields u want and set in you BO fields.

      Best regards,

      Alexandre.

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.