- You have an SAP S/4HANA Cloud system and can log on as an Administrator Business User.
Your company just has orders SAP S/4HANA Cloud and you don't have an Administrator Business User ? This should help:
- This key user need to have the administrator business user that contains the business catalog
SAP_CORE_BC_COM
(Communication Management). For example, the business roleSAP_BR_ADMINISTRATOR
(Administrator).
SAP S/4HANA Cloud has by default different APIs, which are not accessible outside the SAP S/4HANA Cloud system. Those APIs are made accessible from outside secured via Communication User and Password.
If you face any problems with the steps, see section Establish Your Communication Arrangement in SAP S/4HANA Cloud on SAP Help Portal for more details.
A communication system is a semantic representation of the system, which will connect to SAP S/4HANA Cloud system. It holds all necessary technical information about the system, such as hostname/IP address, identity, user information, certificates etc.
-
Log in to your SAP S/4HANA Cloud Fiori Launchpad.
-
Search for the Fiori tile Communication Systems and choose it to open the app.
-
Choose New to create a new communication system.
-
In the opened dialog, New Communication System, enter the following values:
-
In the opened SAP Fiori page, enter the following values:
-
A communication user is needed to authenticate to the SAP S/4HANA Cloud APIs. You can create different users for different scenarios/APIs. This user will have specific access to the API depending upon which Communication Scenario, this communication user is configured for. Choose + near User for Inbound Communication.
-
In the opened dialog, New Inbound Communication User, choose New User to create a new communication user. Inbound user is a user, which is used for incoming communications to the SAP S/4HANA Cloud system.
-
In the opened SAP Fiori page, Create Communication User, enter the following:
-
User Name:
INBOUND_COMM_USER_BTP_EXTENSION
-
Description: Enter a meaningful description
-
Password: Choose Propose Password to propose a password, which is strong, secure and of minimum 20 characters in length. Copy the password and store in a safe password depot for later use.
-
Choose Create to create the communication user.
-
-
The UI returns back to the previous screen where you wanted to select an inbound user for the Communication System edit dialog.
-
In the User Name field of New Inbound Communication User, leave the preselected newly created user and Authentication Method as User Name and Password and choose OK to confirm the in-bound user selection.
-
In the field User for Outbound Communication, create a new user by choosing the + icon. Even if you do not need an outbound user, as your SAP S/4HANA Cloud system will not call an external system, the user creation is needed to be able to create a Communication Arrangement successfully in the next step.
-
Enter a user name and password for the outbound user and choose Create to create this user.
-
Choose Save to save the Communication System dialog.
Result: You have created a communication user and communication system in order to expose the API in the SAP S/4HANA Cloud System.
A communication arrangement is always based on one communication scenario and makes use of one communication system. The business partner API is included in the communication scenario named Business Partner, Customer and Supplier Integration, which has the identifier SAP_COM_0008. If you need a different API, just use the according scenario in step 4.
-
In the SAP S/4HANA Cloud Fiori Launchpad, search for the SAP Fiori tile *Communication Arrangement and choose it to open the app.
-
Choose New to create a new Communication Arrangement.
-
In the opened dialog, New Communication Arrangement, select the Scenario: as SAP_COM_0008 from the list of communication scenarios.
For the field Arrangement Name, enter a meaningful arrangement name, which will fit to your scenario, for example: BTP_BUSINESS_PARTNER_BASIC or BUSINESS_PARTNER_<your cloud account name>.
-
The edit screen of the communication arrangement opens. For the field, Communication System, enter the communication system you created in the previous step.
-
Verify if both inbound and outbound users are pre-filled accordingly.
-
For the fields under Outbound Services, you can see that there are multiple outbound services for replicating data from SAP S/4HANA Cloud to other external systems. To enable the OData API that you do not need these functionalities so you will uncheck the checkbox for these outbound services.
-
Uncheck the checkbox of Service Status of all the outbound services, so that all the outbound services are not active. There are many outbound services. Make sure you 'uncheck the checkbox' of all the Outbound services. The following screenshot shows not all of them.
-
Choose Save to save the communication arrangement.
Troubleshooting: In case you get an error complaining about the missing Business System ID as shown in the screenshot, you missed providing the Business System in the Communication System.
Open the previously created Communication System in edit mode and provide a Business System.
-
Check the saved communication arrangement. In the list of inbound services, note the URL under Business Partner (A2X) with protocol OData V2.
-
Copy the URL and save it for the next step to test the API. The URL is of the format:
https://<your S/4 hostname>-api.s4hana.ondemand.com/sap/opu/odata/sap/API_BUSINESS_PARTNER
Hint: Later on by defining a destination consuming this OData V2 API, you need to insert the URL. Based on your application implementation you can insert the path
/sap/opu/odata/sap/API_BUSINESS_PARTNER
directly in the URL of the destination or in the application code.
Result: You have created a communication arrangement for the Business Partner API using scenario SAP_COM_0008
so that the Business Partner OData Rest API can be accessed externally from SAP BTP.
Let us test the business partner API which you currently exposed in our SAP S/4HANA Cloud system. You can test the API in any browser.
-
Open the OData V2 URL, which you have copied in the previous step, when creating communication arrangement and open in browser.
-
When asked for user name and password enter the inbound communication user name and password, which you created in the previous step.
-
When you add
/$metadata
at the end of the URL you can get the OData metadata description. -
To get the actual Business Partner data, change the URL by removing the
$metadata
and adding A_BusinessPartner like:https://<your S/4 hostname>-api.s4hana.ondemand.com/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner
. You will receive all the business partner data returned from the SAP S/4HANA Cloud system. -
If you would like to learn about the queries options see URI Conventions (OData Version 2.0) for more details.
Result: You have tested the Business Partner API of the SAP S/4HANA Cloud system.
You can use the SAP API Business Hub to gain more information about the Business Partner API or other APIs.
-
Open the SAP API Hub page.
-
Choose S/4HANA Cloud.
-
Select APIs and ODATA V2. Use Business Partner as search term to finally find the tile Business Partner (A2X). Open it.
Alternatively you can use the direct-link for Business Partner (A2X).
In case you want details for another API than the Business Partner, just check for what you are searching for.
-
Check for the information that you are searching for. You can also try out according requests.