Technical Articles
Integration from one SAP ERP to two SAP Ariba Realms through SAP BTP Integration Suite
Disclaimer: SAP Ariba Cloud Integration Gateway (CIG) has been renamed to SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network, some graphics may still refer to the previous name, mainly due to size restrictions.
Business Case
A customer wants to migrate an SAP Ariba realm to the SAP Ariba realms of the global company.
This global company has two different Ariba Accounts, and therefore two different ANIDs and two different SAP Ariba Realms. One account is used for SAP Business Network (Ariba Network / Commerce Automation) while the other is used for SAP Ariba Sourcing & Contracts.
To summarize: in this business case, 2 different SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network (ex CIG) accounts are in use, alongside a single SAP ERP system.
Connectivity Diagram
From left to right: the connection is from the SAP ERP to SAP BTP Integration Suite and then Integration Suite bifurcates the payloads to the corresponding SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network account.
Implemented Solution
SAP Integration Suite needs to be implemented as a middleware using the SAP ERP and SAP S/4HANA Integration with SAP Ariba package. Furthermore, two iflows need to be edited to determine to which SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network the payload must go to based on whether it is a Sourcing & Contracts or a Commerce Automation one.
Details and Configuration
Basic configuration
- In the “Discovery” section in the SAP Integration Suite the Ariba package must be copied, the search functionality can be used to easily find it.
- All required iflows for the customer need to be deployed, in this example the following are deployed:
- SOAP Outbound Pass-Through Content for Ariba Applications
- SOAP Inbound Pass-Through Content for Ariba
- IDOC Outbound Pass-Through Content for Ariba Network
- SOAP Outbound Pass-Through Content for Ariba Network
- The SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network certificate must be added to the CPI KeyStore
- The user credentials must be deployed in the SAP Integration Suite “Security Materials”. Usually, only two user credentials can be found here: the SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network user and the SAP ECC or SAP S/4HANA communication user. In this business case, since 2 different SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network accounts are used, then 3 user credentials will be deployed.
- The Value Mappings must be configured in the “SAP ERP and S/4HANA with Cloud Integration Gateway” package
For the purpose of this demonstration, the full list of value mappings will not be shown. Please refer to the following section for the customized Value Mappings.
Customizations
- Custom variables to be added in the value mappings:
- HCI Connection: as per standard only one Value Mapping is required to be completed. This field refers to the credential for the “SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network” user.
For this business case, as two “SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network” are in use, the standard value mapping is used for the Network account and an extra value mapping must be added for the Sourcing SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network account. For this demonstration that additional credential is named “Connection_S2C”.
- HCI Solution: this value mapping contains the different SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network endpoints. As per standard only “Apps”, “MasterData”, “Sourcing_Direct” and “Network” are displayed.
Even if the “Network” value mapping is expected to work for Commerce Automation IDocs, such as Purchase Orders, it does not account for Sourcing IDocs (RFQ). To include these documents a new value mapping is created, named “Sourcing_IDOC”
- HCI Connection: as per standard only one Value Mapping is required to be completed. This field refers to the credential for the “SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network” user.
- Two of the deployed iflows had to be edited:
- SOAP Outbound Pass-Through Content for Ariba Applications
An extra script must be added between the XSLT mapping and the standard script.
The custom script is really simple: if the incoming message is for Sourcing, a header property called docType is set with the value “Sourcing”.
Then the standard script must also be edited to account for this header property.
This script chooses the connection credentials based on the docType variable. If the value of the docType variable is “Sourcing”, it will get the connection credentials from the custom value mapping “Connection_S2C”. The same behavior will occur for Master Data payloads.Important Note: If the customer has Ariba Procurement Master Data integration, this iflow will require further customization to account for that. - IDOC Outbound Pass-Through Content for Ariba Network
Both steps from this iflow must be edited, starting with the XSLT mapping whose logic is the following one: if the incoming payload is an ”ARBCIG_REQOTE” IDoc, the “docType” header property is set to “Sourcing”, otherwise it is set to “IDOC”.
The script also must be modified to make use of “docType” header propertySimilar to the previous iflow, if the value of “docType” is “Sourcing” then the “Connection_S2C” credential will be used instead of the standard one, in order for this payload to be sent to the Sourcing SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network.
- SOAP Outbound Pass-Through Content for Ariba Applications
Conclusion
With this approach a successful integration from one SAP ECC or SAP S/4HANA system to two different Ariba accounts each of them having a unique SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network account was accomplished.
In summary the steps are:
- Copy the Ariba integration package to the SAP Integration Suite account
- Configure the value mappings, both standard and customized
- Deploy the required iflows
- Modify the outbound iflows to use the corresponding SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network credential
Nice article , but by editing the standard SAP iflow(s) these SAP to SAP iflows would no longer count as SAP-to-SAP free messaging, and would not be able to update them if/when the standard content is patched at a later date.
Isn't the correct approach for extensibility of SAP standard Iflows, such that SAP provide customer exits in the standard iflows, which the customer can configure to call customer-specific iflows where they can do additional logic?
That is correct, the customer will have to update those 2 modified iflows manually if required.
As per your other question the Ariba package does not provide user exits, so the only way to do it is by modifying the iflow.
it looks connection is
About your point number 2, first of all sending data to Ariba Network, is an Ariba integration, second every time you say "ariba" I assume you are referring to Ariba Procurement which is a different solution that wasn't covered in the blog. But yes, it is feasible with different customizations to integrate with 2 different Ariba Procurement realms from only 1 SAP ERP system.
Nice article and much helpful. We are trying to use SAP BTP Integration Suite for CIG. Already one of our Ariba realm is CIG enabled (not via BTP). So, the flow is Ariba - CIG - Cloud Connector - SAP S/4 HANA Onpremise. Now, that we wanted to use the BTP Integration Suite CIG. Based on your steps, Certificate is uploaded and then the Security UserIDs (communication user and CIG user) are created. Cloud Connector shows up the SAP S/4 HANA Onpremise as well. Value mapping being done for those 2 users. Do we need to set up anything else to complete the integration? Or do we have any particular steps to follow? Please check if you can help.