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.
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.
- Knowledge on ODATA and how to use them.
- You have HCP trial Account.
- You have access to SAP Web IDE.
- You have access to HANA Cloud Portal services on trial HCP.
- You have created a Fiori Launch Pad in your trial Account.
- 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.
URL maintained above will be your C4C tenant URL.
2. Open SAP Web IDE and create new project using template.
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.
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:
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!!
Thanks Emmanuel ...... 🙂
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.
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.
I am curious why u have used oDATA service instead of webservice API's
Have you set oAuth or Saml2.0 between Hcp and c4c before integration?
Plz let me know.