Skip to Content
Author's profile photo Chandan Bankar

Easy Steps to build an HANA Cloud Platform App leveraging C4C ODATA

I have been working on creation of HANA Cloud Platform Application that will fetch the data from C4C and display it in the Application. Thought of sharing this experience with the community.


Concept:

The idea behind this is to leverage the SAP Cloud of Customer (C4C) ODATA services. The ODATA services from C4C are used to fetch the relevant data in your application. In this case we are fetching All Accounts (Customers) from C4C.

Pre-requisites:

  1. Knowledge on ODATA and how to use them.
  2. You have HCP trial Account.
  3. You have access to SAP Web IDE.
  4. You have access to HANA Cloud Portal services on trial HCP.
  5. You have created a Fiori Launch Pad in your trial Account.

Methodology:

  1. Open your Destinations option on your trail HCP and setup the new Destination that will be connecting to your C4C tenant. Below screenshot shows how the destination was configured.

          Pic1.jpg

          URL maintained above will be your C4C tenant URL.

  2.  Open SAP Web IDE and create new project using template.

          Pic2.jpg

  3.  Select your appropriate template and click Next. In my case, I have used SAP Fiori Full Screen Appwhich will my App the similar view as it shows in C4C Account view.

  4.  Application creation wizard starts. Give meaningful name for your App and click on Next.

  5.  On Next step, select the option to insert Service URL and select the Destination which was created on your HCP cockpit.

  6.  Later Add the path from your ODATA completing the complete ODATA URL.

          Pic3.jpg

          Press enter and Click Next.

        Note: After pressing Enter, confirm if you don’t get any error. I experienced this gives error for some ODATA URL. Use the URL that throws no error and recognizes the ODATA details.

  7.  Next step is Template Customization. Configure the Template with relevant Elements from the relevantODATA collection and Navigations.

  8. Once all the configurations are done, click Next and confirm to Finish the Wizard on next step.

  9. Your custom App is ready. Test the App and deploy it on to your trial HCP Account and Register it on the Fiori Launch Pad.

Below is the end result of this. This will fetch the data into the Portal and display as below:

 

    Pic4.jpg

This is just an example elaborating how the data from C4C be accessed in few easy steps. This methodology can also be used with different system or ODATA to create basic App which can however be modified to make more robust and it is always possible to add more functionality on it.

Hope this helps many!!

Cheers,

Chandan

Assigned Tags

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

      Great job

      Thanks

      Author's profile photo Chandan Bankar
      Chandan Bankar
      Blog Post Author

      Thanks Emmanuel ...... 🙂

      Author's profile photo Srinivasan S
      Srinivasan S

      Hi Chandan,

      I am able to access a service URL and access an OData service. I choose Fiori  Master-Detail template for building the app.

      My problem is that once the screen is generated the elements are displaying but the data inside them doesn't. Eg: If I want to display CustomerID my screen displays "CustomerID" instead of the data in it.

      Please provide your suggestions. Please find screen below for reference.

      Worklist.PNG

      Thanks,

      Srinivasan

      Author's profile photo Navin Kandasamy
      Navin Kandasamy

      Hi Chandan,

      Thanks for your documentation with this am able to consume the Account details from C4C.

      Also kindly provide me the steps to create and update accounts from HCP. Currently am not finding any such blog providing the detailed steps to create entries in C4C from HCP App.

      This will be useful for me if you could share the details.

      Chandan Bankar Thanks in advance.

      Regards

      Navin

      Author's profile photo Former Member
      Former Member

      I am curious why u have used oDATA service instead of webservice API's

      Author's profile photo Former Member
      Former Member

      Hi chandan,
      Have you set oAuth or Saml2.0 between Hcp and c4c before integration?
      Plz let me know.

      Br..
      Prasad sistla.