Integrate SAP S/4HANA Cloud with SAP Cloud Platform Integration using SOAP APIs – Part 2
For enabling data exchange in your SAP S/4HANA Cloud with SAP- or non-SAP-solutions by integrating, APIs play an increasing role.
This blog entry will give you an overview about how to configure your SAP S/4HANA Cloud to integrate it with SAP Cloud Platform Integration using SOAP APIs.
Please note that these integration steps are divided into two blog entries. Please make sure that you begin with the first part of the blog entry and change when referenced.
The use case is based on the whitelisted SOAP API Replicate Business Partners from Client to SAP S/4HANA System based on the integration scenario SAP_COM_0008 (available in SAP API Business Hub). This SOAP API allows you to replicate the business partner relationship data from SAP S/4HANA Cloud to a client system.
- Note: SAP Cloud Platform Integration represents a third-party system so that the configuration of SAP S/4HANA Cloud is proceeded in the analogous way by integrating with other non-SAP systems.
For the configuration, SAP S/4HANA Cloud enables you to setup the Communication Management within 3 apps which are available in the SAP Fiori Launchpad:
- Maintain Communication User
- Create Communication System
- Create Communication Arrangement
You need to configure and activate the communication arrangement to enable the integration between the SAP S/4HANA Cloud and the SAP Cloud Platform Integration.
Note: Log into S/4HANA Cloud with a user who has the business role as “SAP_BR_ADMINISTRATOR”: A person responsible to configure SAP S/4HANA Cloud for the Communication Arrangement.
For establishing secure communication between these two systems, the best practice to organize efficient data exchange is to proceed as follow:
- Using the app Maintain Communication User in SAP S/4HANA Cloud you have to create a user who enables the integration with the SAP Cloud Platform Integration: In User Data, enter an appropriate communication user as User Name, for example CPI_USER and an appropriate Description.
Enter or generate the appropriate password as per the security guidelines.
Note: For this integration, we won’t use the basic authentication (username + password). Our used authentication method will be certificate based which will be explained in the upcoming steps. By clicking on Create, the User CPI_USER is created!
- With the app Communication System in SAP S/4HANA Cloud you have to define a system which will enable the communication with SAP Cloud Platform Integration. Under General Data, enter an appropriate communication system as System ID and System Name, for example CPI_SYSTEM.
Under Technical Data, you have to fill in the field Host Name with the path which you got generated in the SAP Cloud Platform Integration which is described in the 4th step of section Retrieve the endpoint of the iFlow. Please enter appropriate names in the fields for Logical System and Business System, for example CPI_SYSTEM.
In the section User for Inbound Communication, by clicking on +,choose the user which you created before in the app Maintain Communication User.
In the section User for Outbound Communication, please select SSL Client Certificate as Authentication Method and Default Client Certificate as Certificate Type.
By clicking on Create, the system which will enable the communication with the SAP Cloud Platform Integration is defined.
- After creating the communication user and system, you are able to create the communication arrangement which enables the electronic data exchange between the systems.
To create a communication arrangement, proceed as follow:
Open the Communication Arrangements app as usual from the SAP Fiori Launchpad and select New. Select the communication scenario SAP_COM_0008, define the arrangement name and select Create.
The communication arrangement based on the scenario SAP_COM_0008 is created and a new screen is now open. Under Common Data in the field Communication System, select system which you created before.
Under Inbound Communication, please select the user you created before, in our example CPI_USER.
Under Outbound Communication, use Default Client Certificate as Certificate.
Under Outbound Services, you are able to choose all business objects like customers, suppliers, company addresses (predefined in the integration scenario SAP_COM_0008) etc. which you want to replicate into the SAP Cloud Platform Integration.
In this example, business partners are chosen for replicating from SAP S/4HANA Cloud into SAP Cloud Platform Integration.In the filed Path, please enter the path you got from the SAP Cloud Platform Integration (last part of the URL; explained in the 4th step in section Retrieve the endpoint of the iFlow)
In Additional Properties, enter a unique name for the Replication Model into the field Property Value, for example, RM_BP.
Note: It is not allowed to use same names for any other replication model (for example in another communication arrangement) on the same SAP S/4HANA Cloud system.
After doing these steps, download the authentication certificate under Outbound Communication and save it locally.
Note: After downloading the certificate, you have to upload it in the SAP Cloud Platform Integration. Read section Setup the Certificate-to-User Mapping.
Activate the communication arrangement by saving it.
- Finally, for replicating business partner from SAP S/4HANA Cloud into the SAP Cloud Platform Integration, use the app Replicate by Replication Model.
Note: Logon to S/4HANA Cloud with a user who has the business role as “SAP_BR_ADMINISTRATOR_DATA_REPL”: A person responsible to replicate business objects. In the new opened screen, choose the replication model which was defined before in the communication arrangement (RM_BP) and click on Replicate.
The successful replication is indicated by a notification:
After successful replication, please continue with section Monitor replicated data.
Hi Mert,
I have followed exactly whats mentioned in this blog and the Part 1 of this blog, but not able to push anything to HCI endpoint URLs from S4 Hana Cloud side.
And when I check in Replication Model below is the message am getting :
Please consider Target System as CPI_SYSTEM.
On clicking Display Log below below details I could see ,
Can you please tell what we would be missing ?
Thanks,
Sijin
Hi Mert,
Can you please provide any suggestion on this.
https://answers.sap.com/questions/542819/issue-while-implementing-scenario-for-customer-bus.html
It seems this issue is prevailing with many others for similar scenarios like Product Master Integration also.
Helpful suggestions much appreciated.
Thanks,
Sijin
Hi Sijin,
first of all thanks for your comment and apologize for the late reply!
Regarding your question: I never had this issue and for that reason I cannot provide you any solutions.
In this case I would create a ticket in the component LO-MD-BP for SAP_COM_0008 and/or LO-MD-MM for SAP_COM_0009 (see in the set-up instructions of the scope item 1RO in which the communications scenarios are used for.
Hope you will get fixed this issue!
Best regards,
Mert
Hi Mert,
Do we have any provision in Cloud S/4 Hana to send out the soap request manually? like we have tcode called sproxy in on premise ERP.
Hi Muniyappan,
no, this is not supported in the cloud world.
Best regards,
Mert
Hi Mert,
Best regards,
Feng
Hi Feng,
The integration scenario needs to be defined in the communication arrangement in S/4HANA which you get from the SAP API HUB (search for the corresponding API and the scenario SAP_COM_0179 is named). You do not need to add the communication scenario somewhere in CPI.
Best regards,
Mert
Hi Mert,
Do you know if is it possible to connect S4 Hana Cloud to an SAP PI 7.3 dual stack directly without using SAP API or SAP CPI just the Hana Cloud Connector ?
Thanks in advance.
Hi Mert,
Thanks for the blog that provides a very easy way to understand the use of CPI.
I have done everything as described in the blog. But when I am saving the communication arrangement I get an error "Business System is not correctly defined"
I have properly defined the communication system with the end point URL hostname. There is no issue in the communication system.
Do you know what can be done to get rid of this error?
Regards
Babu