SAP HANA Cloud Portal Developer Challenge: Building HCP App to fetch Accounts from C4C
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.
- You should be aware of SAP Cloud for Customer.
- Access to SAP Cloud for Customer tenant to use it in this integration.
- 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 App which 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 relevant ODATA 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.
10. Customize your Fiori Launch Pad to have the URL widget for this App.
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!!