Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
MarcelWolf
Advisor
Advisor
SAP Cloud Platform Integration (SAP CPI) simplifies the custom-driven integration with SAP S/4HANA Cloud  by using a wide variety of SAP S/4HANA Cloud APIs. These APIs play the major role in exchanging data with other systems. Offering OData and SOAP protocol based APIs SAP S/4HANA Cloud is perfectly equipped to meet this requirement now and in the future. The central tool to explore all available SAP S/4HANA Cloud APIs is the SAP API Business Hub.

This blog series consists of two Blog posts. In this series the integration possibilities between SAP S/4HANA Cloud and the SAP CPI will be outlined by using a SOAP API of SAP S/4HANA Cloud to replicate business data to the SAP CPI. As SOAP APIs are best suited for a asynchronous exchange of have weight data and is mostly used in the Business-to-Business and Application-to-Application context this blog series uses SOAP APIs.


Deploy the integration flow on the SAP Cloud Platform Integration


The following steps describe how to deploy your integration flow (iFlow):

  1. Logon to the SAP CPI with the appropriate user roles assigned. The four appropriate user roles are as follows (for more details visit the SAP CPI help page😞

    1. AuthGroup.Administrator

    2. AuthGroup.IntegrationDeveloper

    3. ESBMessaging.Send

    4. Auth.Group.BusinessExpert



  2. Switch to the Design menu option in the main menu on the left.

  3. Create a Package.

  4. Open the Package by clicking on it and create an Integration Flow in the ARTIFACTS tab.

  5. Connect the Sender with the Start event by drawing a message flow between them.

  6. Select SOAP as adapter type and SOAP 1.X.

  7. Open the message flow settings by clicking on it and open the Connection tab. Enter a desired Address for your endpoint on the SAP CPI.

  8. Finally deploy the iFlow on the SAP CPI.


 

Important Remark: No WSRM policies allowed!

The SOAP 1.x adapter does not support WSRM. Make sure the used WSDL does not contain such policies or use the adapter without WSDL. In future a check will be introduced raising an error in case WSRM is defined in the WSDL.

Retrieve the endpoint of the iFlow


This step describes where to find the endpoint url of your recently deployed integration flow. Both information will be needed during the setup of the Communication Arrangement in the SAP S/4HANA Cloud system.

  1. Switch to the Monitor menu option in the main menu on the left.

  2. Navigate to the Manage Integration Content section.

  3. Select the iFlow in the Integration Content navigation pane.

  4. Copy the complete URL displayed in the Endpoints tab and save it for later. The URL consist of the host name and the specific path of the iFlow.

  5. Continue with the SAP S/4HANA Cloud setup which is described in this blog.


Setup the Certificate-to-User-Mapping


To enable the communication between the SAP S/4HANA Cloud system and the SAP CPI system you have to upload your authentication certificate of the SAP S/4HANA Cloud system into the SAP CPI. To do so:

  1. Switch to the Monitor menu option in the main menu on the left.

  2. Open the Certificate-to-User Mapping App in the Monitor Dashboard.

  3. Enter the SAP CPI user name and choose the certificate of the S/4HANA Cloud system downloaded during the setup of the Communication Arrangement.


Monitor replicated data


After replicating the data in the SAP S/4HANA Cloud system (described in this blog) the data was sent to the endpoint configured in the iFlow on the SAP CPI. Proceed as follows to Monitor the data replication:

  1. Open the Message Processing Monitor.

  2. Select the iFlow in the left navigation pane.


The detailed communication log of the data exchange between the S/4HANA Cloud system and the SAP CPI are shown in the message processing logs which can be found on the right side of the screen.
33 Comments
former_member16553
Active Participant
Hi Marcel,

Thanks for the Blog.This is very helpful for S/4 HANA beginners like me. We have some integration requirement with S/4 HANA and external system using CPI. Can you please suggest which  would be  the best methodology( SOAP API/ IDOC/ODATA SERVCES) from S/4 HANA back end point of view. We have master data interface like  Customer master /Material Master and also few transnational data interface like  Sales Order /Purchase Order Etc.

Thanks,

Girdhari Mondal

 
Sijin_Chandran
Active Contributor
Hi Marcel,

Authentication method for Outbound Communication in our scenario is based on "User-id and Password" , do we still need to upload Authentication Certificate to be uploaded for establishing the connection between S4 Hana Cloud and CPI ?



Thanks,

Sijin
Sijin_Chandran
Active Contributor
Hi Girdhari,

Connection to HCI from S4 Hana Cloud is established using Communication Scenario, Communication Scenario is a package of Communication provisions ( might be based on SOAP , IDOC, REST etc.) particular for a Business Integration Scenario like Customer Integration , Material/Product Integration , Sale Order etc.

So SAP has provided Communication Scenario and inside those you can Select option you want to .

For SAP Sales Order Inbound : Comm Scenario = SAP_COM_0109

For Customer/Business Partner Creation Outbound : Comm Scenario = SAP_COM_0008

For Material/Product Integration : Comm Scenario = SAP_COM_0009

For Sale Documents Outbound : Comm Scenario = SAP_COM_0223

For Reading Organizational Data from SAP S4 : Comm Scenario = SAP_COM_0087.

Create Communication Arrangements using these to explore the options ( SOAP/REST/IDOC ) each and every individual Comm Scenario offers for integration.

Thanks,

Sijin
former_member16553
Active Participant
0 Kudos
Thanks Srijin for your reply,

 

I have another query regarding CPI integration.  Do we need to do any configuration in S/4 HANA back end system as part of ABAP developments or all the configuration steps needs to done in CPI integrator.

Thanks,

Girdhari
MarcelWolf
Advisor
Advisor
0 Kudos
Hi Sijin,

no you can use both independently.

 

Regards,

Marcel

 
MarcelWolf
Advisor
Advisor
0 Kudos
Hi Girdhari,

you can explore all available APIs on the API Business Hub on api.sap.com. There you find the necessary communication scenario number for each API which are SOAP and OData services.

Kind Regards,

Marcel

 

 
MarcelWolf
Advisor
Advisor
0 Kudos
Hi Girdhari,

the SAP S/4HANA Cloud system setup is described in this blog:

https://blogs.sap.com/2018/03/05/integrate-sap-s4hana-cloud-with-sap-cloud-platform-integration-usin...

 

Kind Regards,

Marcel
Sijin_Chandran
Active Contributor
0 Kudos
Am quite new into this and I have minimal idea regarding ABAP related developments to be carried out in S4 Hana Cloud.
Sijin_Chandran
Active Contributor
0 Kudos
Hi Marcel,

I am trying to Implement Sale Order replication to HCI and as mentioned by you ( in another blog) once am using Communication Scenario SAP_COM_0223.

But as contradictory from the Part 2 of this blog in which we are giving "Replication Model" in Additional Properties of the  Outbound setting , there is no such Additional Properties with "Replication Model" in case of Sale Order Integration ( SAP_COM_0223). Please find the screenshot.



 

So how to establish connection in this scenario ?

Even the "Check Connection" button is not showing activated ( you can see in screenshot).

As in Part 2 of this blog we are activating the Replication Scenario using Replication Model , can you please suggest what to do in this case as there is no Replication Model being asked here.

Your suggestion would be very helpful for many here who need to replicate transactional data to HCI like Sale Order, Purchase Order. There is no blog explaining this kind of scenario that's the reason finding it difficult to get it done.

Thanks,

Sijin
MarcelWolf
Advisor
Advisor
Hi Sijin,

the "replication model" is not always there. It depends on the use case of the APIs. For master data there is usually the DRF framework used which then requires a "replication model". For transactional data there is no need to replicate data as it would be for master data. And as the SAP_COM_0223 is for transactional data there is no possibility to maintain a "replication model". The sales order confirmation gets distribute by the system every time the sales order is created.

This setup is described in detail in the setup guide of scope item 2EL:

https://rapid.sap.com/bp/scopeitems/2EL

 

Cheers,

Marcel
Former Member
Hello Marcel,

I have a question regarding our ERP to S/4 Hana Cloud project:

We have the FI module in the S/4 Hana Cloud, and we have the HCM module in the ERP ABAP System On Premise.

We have to transfer HCM masterdata from that HCM system to the S/4 Hana Cloud, and we have to transfer FI data (like cost centers) from the S/4 Hana Cloud to the HCM System.

Our plan is to use the SAP Cloud Connector and the Cloud Platform Integration between these systems.

Do you know, exists there any predefined Szenario for that data transfer.

If I discover the predefined Szenarios within the CPI, I can find about 130 of them, but nearly all of them are for connections to SuccessFactors.

If I check the Communnication Arrangements within the S/4 Hana Cloud I can find the following, interesting ones:

.) GEM Service Cost Level Export  OData V2 https://myxxxxxx-api.s4hana.ondemand.com/sap/opu/odata/sap/YY1_GEM_SCL_EXP_CDS

.) WorkforcePersonMasterDataReplicationRequestResponse_In SOAP https://myxxxxxx-api.s4hana.ondemand.com/sap/bc/srt/scs/sap/workforcepersonmasterdatarepli

It seems the dataflow between S/4 Hana Cloud and the On Premise ERP system can work via the follwing protocols: SOAP, OData V2, RFC and Idoc
Do you know, exists there any guide that describes how to establish the connections by using these Aplication Protocols?
Are there different guides for the configuraton of all theses Aplication Protocols available?
Is there a cloud connector for the connection with the ERP system required? Is that Cloud Connector required for all these aplication protocols?

Thanks a lot for your help!
Best regards,
Christian

 

 
Sijin_Chandran
Active Contributor
0 Kudos
Hi Marcel,

I have gone through this document , so it shows a "Process flow" where they have outlined a  S4 Hana Cloud Sale Integration with a Buyer Side Client, but its nowhere mentioned what are the Technical and Configuration setups to be done to achieve this.

I am looking for the "Send Order Confirmation" part only, if you could provide a document which explains what EDI related setup need to be done for this it would be very helpful.

Thanks,

Sijin
Sijin_Chandran
Active Contributor
0 Kudos
Hi Marcel,

I was finally able to download 2EL document from a "Integration Package" using CPI System ( used Discover option of CPI ).

We are following the same and setting up the EDI configs and getting the below error message.



It says "No active outbound service could be found.) , but we have already setup a Communication Arrangement using Scenario SAP_COM_0223 with correct endpoint URL of CPI/HCI side in the Outbound side. Could you please guide where we would be missing.

Thanks,

Sijin
Sijin_Chandran
Active Contributor
0 Kudos
We have assigned the Recipients as well:





But still the Output message for EDI persists and we are not able to push data to HCI.

Thanks,

Sijin
MarcelWolf
Advisor
Advisor
0 Kudos
Hi Sijin,

did you maintain the setting in the BRF+ properly as well ?

Best Regards,

Marcel
Sijin_Chandran
Active Contributor
0 Kudos
Hi Marcel,

First very thanks for your prompt response.

Will check with Functionals and paste the screenshots of BRF+ done in our S4 System asap.

Thanks,

Sijin
Sijin_Chandran
Active Contributor
0 Kudos
One question while maintaining Recipients what should we provide under Alias ?

In our case we have provided here the S userid of the CPI Credential ( User Id ) which we have defined for Outbound  Communication in Communication Arrangement. Is this fine ?
Sijin_Chandran
Active Contributor
0 Kudos
Hi Marcel,

Please find the below details on BRF+ details maintained for carrying out Output determination:









We are creating Sale Orders which satisfies above rules and still we are getting below error message :



 

Please tell where we could be missing ?

Thanks,

Sijin

 
MarcelWolf
Advisor
Advisor
0 Kudos
Hi Sijin,

could you please open a customer incident on this as the settings as such seems to be right from my point of view.

Kind Regards,

Marcel
Sijin_Chandran
Active Contributor
Hi Marcel,

Will proceed as you suggested.

Thanks for your efforts and time.

Thanks,

Sijin
jbaukham
Participant
Great blog and I wish we had this when we originally setup our EDI.

Currently the connection from our S4Hana Cloud to CPI uses a user name and password, however I wish to change this to use an SSL certificate as detailed in section 'Setup the Certificate-to-User-Mapping' and in part 2 of the blog.

I have set the user for outbound communication to use SSL Client Certificate - Default Client Certificate, I have then downloaded the certificate from the communication arrangement and uploaded to CPI.

But when we create outbound messages in S4HC the messages are showing up in error with HTTP Code: 403 (Forbidden)

Have I missed something? Change it back to User name and password and it works again.

thanks

Jon
jbaukham
Participant
0 Kudos
Resolved -  the user for the SSL certificate was missing authorisation on CPI
rajapriyar1908
Explorer
0 Kudos
Hi,

I have configured the same as above for business partner outbound , in S/4HANA the replication status is successful but no response in CPI. Please help me to overcome this issue.

With regards,

Rajapriya Ravi.
MarcelWolf
Advisor
Advisor
0 Kudos
Hi Rajapriya,

please check your configured endpoint in the communication arrangement and the certificate or user. And check if you have the required roles to execute a iFlow on the CPI.

 

Best Regards

Marcel
rajapriyar1908
Explorer
0 Kudos
Hi Marcel,

Thank you for your Response. I solved that problem ,resolution is I didn't add my CPI credentials as outbound User in Communication Arrangement.

Marcel I have one more doubt . I have Configured a scenario for IDOC inbound to S/4HANA. I am getting the below error.

org.apache.cxf.binding.soap.SoapFault: A/EA/706 (No authorization to send IDocs with message type

The error shows that its a type of authorization based error. So,can you please tell me what is the authorization role to be added to overcome this issue.

 

With Regards,

Rajapriya Ravi

 
0 Kudos
Hello Everyone,

I'm going to integrate sap s4Hana cloud to Success factor via CPI. This is my first integration with cpi earlier i worked on SAP PI. Could you please guied me and tell me the needful configuration for SAP s4 hana cloud. And also how can I replicate the query from S4hana cloud to CPI.

 

I'm going with JB1 document provided by sap, But the integration not working.

 

Best Regards,

Anil
former_member199125
Active Contributor
0 Kudos
Hi Marcel,

 

Can we use EDI to integrate with S/4 HANA cloud from Non SAP system?  Lets say i want to use some custom IDOC"s.Note 2653671 says only limited support after applying request.

 

Thanks,
Srinivas
0 Kudos
Hi Marcel,

 

Its a nice blog. I have followed almost everything but only the difference i have with me is we are having CPI cloud foundry env. Could you please help us with how we need add the certificate user mapping step completed in CPI CF env.

Thanks
MarcelWolf
Advisor
Advisor
0 Kudos
Hi,

unfortunately I am to able to assist here. I would highly recommend to check the Integration Suite docu on SAP Help.

Regards,

Marcel
kvkkvk
Discoverer
0 Kudos
Enter replication model name for Supplier outbound interface

Enter replication model name for Customer outbound interface

i got this error in communication arrangements app.please help me
MarcelWolf
Advisor
Advisor
0 Kudos
Hi,

 

I can't determine which Communication Arrangement you are referring to but generally speaking you have to maintain a replication model in some Communication Scenarios. Please do so to get rid of these errors.

 

Regards,

Marcel
kvkkvk
Discoverer
0 Kudos
SAP_COM_0008
MarcelWolf
Advisor
Advisor
0 Kudos
Please check the documentation linked in the API Business Hub: https://api.sap.com/api/CO_MDG_BP_RPLCTRQ/overview