Summary
Embarking on the journey of leveraging SAP S/4HANA Cloud for Projects, Resource Management (C4P), this blog simplifies the process of accessing its APIs, with a focus on the Resource Request functionality. Beginning with preparations, where we gather key information like API URL and credentials, we then explore the capabilities of the Resource Request API in the Business Accelerator Hub. We break down how to find the right URL for accessing resource requests and demonstrate how to connect these APIs to tools like SAP Analytics Cloud or SAP DataSphere. By following these steps, users can seamlessly integrate data from C4P into their analytics workflow, enabling better decision-making and operational efficiency.
Preparation Step:
And at step 7 of Creating a Service Key, please note down all of the information mentioned in the table below. We will use them to fill in the connection information in either SAP Analytics Cloud or SAP DataSphere later.
For example:
{
"apiUrl": https://resource-management-api-projectscloud.cfapps.eu10.hana.ondemand.com,
"uaa": {
"clientid": "sb-............................................................265",
"clientsecret": "49...............................................................vc=",
"url": https://cp..........w.authentication.eu10.hana.ondemand.com,
"identityzone": "cp..........w",
apiUrl: is the main part of the OData Service URL and we will add path to this URL in the later step.
clientid: is OAuth Client ID in SAC OData Service Connection dialog
clientsecret: is Secret in SAC OData Service Connection dialog
url: is the base of token URL. The full token URL should be:
https://cp..............w.authentication.eu10.hana.ondemand.com/oauth/token
In Business Accelerator Hub, you will see four cards. Each of them contains a collection of request methods based on OData API. However, only Assignment and Resource Request contain GET method. Project Experience and Workforce Availability don't support GET method. Hence, only queries from Assignment and Resource Request can be imported and consumed in SAP Analytics Cloud and DataSphere. And this blog will take the Resource Request OData API as an example.
Step1: Check API Reference and Capability
1. Click on the card of Resource Request > Click on API Reference
2. You will see the GET method is supported for Resource Request.
However, in the Workforce Availability. Only POST method is supported. This is the reason that we are not able to leverage this endpoint in the Analysis Application
Step2: Find OData Service URL for Resource Request
1. Click on the card of Resource Request > Click on Try Out
2. Select /ResourceRequests from the method section > click on Environment: Sandbox > Select Add New Environment
3. In the prompt window > find Starting URL. By following the format, you can add the path of /ResourceRequestService/v1 to the end of the apiUrl which you noted down at the preparation step. For example, like the screenshot below. (In the same vein, the URL logic also applies to Assignment)
(This apiUrl will be used for connection later.)
Step3: Build Connection in SAC
Now, you have obtained all required the information. And you can build the OData Services Connection in SAP Analytics Cloud or SAP DataSphere. For example, like below screenshot.
OData Service Connection supports scheduling import in SAP Analytics Cloud. You can leverage this feature to update the data in the model.
Tips:
- If you have DataSphere, you can use DataSphere to restructure the query and then visualize the data in SAP Analytics Cloud.
- If you find the data from one single query is not enough and you don't have DataSphere. You can leverage the data blending feature in SAP Analytics Cloud to combine the data visualization from different sources.
No comments:
Post a Comment