Change Notes:
24 Aug 2021: Modified the way Provider system is configured.
In this blog, I will go through the steps necessary to connect a SAP Master Data Integration service instance with a SAP S/4HANA On-premise system. While these steps can be applied to connect any other cloud systems with S/4HANA, this blog will primarily focus on integration with MDI service on SAP Business Technology Platform.
I. Data Replication Framework Customising
In the S/4HANA, the Data Replication Framework is used to invoke theSOAP services.You can follow the steps mentioned in the webpage
here to maintain DRF customising.
It is important that "Business system" value, that is used in DRF customising should be the same as MDI Business System Generic Configuration.
You can retrieve the MDI Business System Configuration via a Postman GET call on the below URL.(Use oAuth credentials of your MDI tenant)
https://one-mds.cfapps.<region>.hana.ondemand.com/businesspartner/v0/odata/API_GENERIC_CONFIGURATION...
For SAP canary environment, use the value "sap" in region placeholder.
II. Retrieving the WSDL required for the setup (Optional)
You can download WSDL files directly from
here.
Note: You need to change the host Name in the URL configured in these WSDL file.
You can also fetch these files individually from system. Execute transaction
sproxy in SAP S/4HANA system and download the WSDL files for the below interfaces.
BusinessPartnerSUITEBulkReplicateRequest_Out BusinessPartnerSUITEBulkReplicateConfirmation_Out BusinessPartnerRelationshipSUITEBulkReplicateRequest_Out BusinessPartnerRelationshipSUITEBulkReplicateConfirmation_Out
KeyMappingBulkReplicateRequest_Out
KeyMappingBulkReplicateConfirmation_Out

III. Altering the WSDL files with MDI Endpoints
Add the following elements at the end of each of the WSDL Files before the </wsdl:definitions> tag. It is important to note that the below XML element contains a sample MDI Endpoint. You would have to replace this with your MDI details for all of them.
Eg. For BP, replace
https://one-mds.cfapps.sap.hana.ondemand.com:443/businesspartner/v0/soap/BusinessPartnerRelationship...
with your MDI tenant endpoint. Additionally, make sure the endpoint contains the 443 port number suffixed after the Host Name.
a. BusinessPartnerSUITEBulkReplicateRequest_Out
<wsdl:binding name="CO_MDG_BP_RPLCTRQ" type="tns:BusinessPartnerSUITEBulkReplicateRequest_Out">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="BusinessPartnerSUITEBulkReplicateRequest_Out">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="BusinessPartnerSUITEBulkReplicateRequest">
<soap:body use="literal"/>
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="BusinessPartnerSUITEBulkReplicateRequestOut">
<wsdl:port name="MDI_PORT" binding="tns:CO_MDG_BP_RPLCTRQ">
<soap:address location="https://one-mds.cfapps.sap.hana.ondemand.com:443/businesspartner/v0/soap/BusinessPartnerBulkReplicateRequestIn?tenantId=mdibpconsumer1"/></wsdl:port>
</wsdl:service>
b. BusinessPartnerSUITEBulkReplicateConfirmation_Out
<wsdl:binding name="CO_MDG_BP_RPLCTCO" type="tns:BusinessPartnerSUITEBulkReplicateConfirmation_Out">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="BusinessPartnerSUITEBulkReplicateConfirmation_Out">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="BusinessPartnerSUITEBulkReplicateConfirmation">
<soap:body use="literal"/>
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="BusinessPartnerSUITEBulkReplicateConfirmationOut">
<wsdl:port name="MDI_PORT" binding="tns:CO_MDG_BP_RPLCTCO">
<soap:address location="https://one-mds.cfapps.sap.hana.ondemand.com:443/businesspartner/v0/soap/BusinessPartnerBulkReplicateRequestConfIn?tenantId=mdibpconsumer1"/></wsdl:port>
</wsdl:service>
c. BusinessPartnerRelationshipSUITEBulkReplicateRequest_Out
<wsdl:binding name="CO_MDG_BP_RELATIONSHIP_OUT" type="tns:BusinessPartnerRelationshipSUITEBulkReplicateRequest_Out">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="BusinessPartnerRelationshipSUITEBulkReplicateRequest_Out">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="BusinessPartnerRelationshipSUITEBulkReplicateRequest">
<soap:body use="literal"/>
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="BusinessPartnerRelationshipSUITEBulkReplicateRequestOut">
<wsdl:port name="MDI_PORT" binding="tns:CO_MDG_BP_RELATIONSHIP_OUT">
<soap:address location="https://one-mds.cfapps.sap.hana.ondemand.com:443/businesspartner/v0/soap/BusinessPartnerRelationshipBulkReplicateRequestIn?tenantId=mdibpconsumer1"/></wsdl:port>
</wsdl:service>
d. BusinessPartnerRelationshipSUITEBulkReplicateConfirmation_Out
<wsdl:binding name="CO_MDG_BP_RELATIONSHIP_CNF_OUT" type="tns:BusinessPartnerRelationshipSUITEBulkReplicateConfirmation_Out">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="BusinessPartnerRelationshipSUITEBulkReplicateConfirmation_Out">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="BusinessPartnerRelationshipSUITEBulkReplicateConfirmation">
<soap:body use="literal"/>
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="BusinessPartnerRelationshipSUITEBulkReplicateConfirmationOut">
<wsdl:port name="MDI_PORT" binding="tns:CO_MDG_BP_RELATIONSHIP_CNF_OUT">
<soap:address location="https://one-mds.cfapps.sap.hana.ondemand.com:443/businesspartner/v0/soap/BusinessPartnerRelationshipBulkReplicateRequestConfirmIn?tenantId=mdibpconsumer1"/></wsdl:port>
</wsdl:service>
e. KeyMappingBulkReplicateRequest_Out
<wsdl:binding name="CO_KEY_MAP_RPLCTRQ" type="tns:KeyMappingBulkReplicateRequest_Out">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="KeyMappingBulkReplicateRequest_Out">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="KeyMappingBulkReplicateRequest">
<soap:body use="literal"/>
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="KeyMappingBulkReplicateRequestOut">
<wsdl:port name="MDI_PORT" binding="tns:CO_KEY_MAP_RPLCTRQ">
<soap:address location="https://one-mds.cfapps.sap.hana.ondemand.com:443/businesspartner/v0/soap/KeyMappingBulkReplicateRequestIn?tenantId=mdibpconsumer1"/></wsdl:port>
</wsdl:service>
f. KeyMappingBulkReplicateConfirmation_Out
<wsdl:binding name="CO_KEY_MAP_RPLCTCO type="tns:KeyMappingBulkReplicateConfirmation_Out">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="KeyMappingBulkReplicateConfirmation_Out">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="KeyMappingBulkReplicateConfirmation">
<soap:body use="literal"/>
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="KeyMappingBulkReplicateConfirmationOut">
<wsdl:port name="MDI_PORT" binding="tns:CO_KEY_MAP_RPLCTCO">
<soap:address location="https://one-mds.cfapps.sap.hana.ondemand.com:443/businesspartner/v0/soap/KeyMappingBulkReplicateConfirmIn?tenantId=mdibpconsumer1"/></wsdl:port>
</wsdl:service>
IV. Configuring MDI system access - Profile Creation
- Navigate to tab “Technical Administration” and open “Profiles”.

- Click on "Create Profile".
- Enter a Name and a Profile Description for accessing SAP MDI and select “Old Profile Mode”.

- Click “Next” and fill out the Security Settings as follows -
a. Authentication Method: User ID/Password
b. Identifiable Business Context: No IBC Determination
c. Transport Security: Select “Secured Communication”
- Click “Next”. In case Proxy Settings are used, fill them in. Otherwise leave them empty & click “Finish”

- Confirm the popup with “Yes” and activate the profile
V. Configuring MDI as "Third party Provider System"
At this point you need to check your SAP BASIS release version. The below steps are valid only for SAP BASIS release >= 7.53. For lower version, please follow the steps mentioned in the note
here.
- Navigate to tab “Technical Administration” and open “Provider Systems”

- Click on "Create Special" dropdown and select "Create Third Party System"

- Provide a name for the Provider System.
NOTE: The name of the Provider system here should "exactly" match the value configured in Generic Configuration on MDI.
In the "Profile Name" dropdown, select the value created in previous step.

- Click Next. Provide credentials of a system user that can access Service metadata. Ensure that the "Use WSIL user" checkbox is selected.

- Click Finish. At this step you will get a popup to activate the Provide system. DO NOT activate it yet.

- Click on the Provider System that was just created and navigate to "WSDL assignments" tab.

- Click on "Upload" button and select the WSDL file from your system.

- Click "Next". Do not modify the WSDL.

- Click Next. Ensure that the Service Definition Name is selected.

- Click "Next" and then click "Confirm".

- Repeat the above step for all the WSDL Files that you want to upload.
- Finally, click on "Activate".

VI. Logon Data Management
- Navigate to tab “Service Administration” and open “Logon Data Management”.

- Click on “Create”. Provide a meaningful Logon Data Name & Description.

- Provide Logon Data for MDI by entering User Name & Password. From the service keys of MDI instance, clientId is the username and clientSecret is the passwrod.Ensure that the instance should be generated using correct BusinessSystemId parameter. (Refer Section 1 of this blog)

- Click “Finish” and confirm the popup with “Yes” to activate the Logon Data immediately.
VII. Configure Local Integration Scenario
The local integration scenario will only contain the outbound messages from SAP S/4 HANA to SAP MDI. In principal it would also be possible to configure the corresponding inbound services as well. However, the current SAP S/4 HANA – MDI – integration requires a different alternative access URL. Therefore, the configuration for the inbound services must be done (manually) outside the Local Integration Scenario Configuration.
- Navigate to tab “Service Administration” and open “Local Integration Scenario Configuration”

- Create new integration scenario by clicking “Create”.
- Provide a meaningful Name & Description.

- Click “Next”. Since no inbound services shall be configured here (explanation see above), click “Next”.

- Add the following Service Groups
- MDG_BS_SUPPLIERREPLICATECONF
- MDG_BS_SUPPLIERREPLICATEREQ
- KEY_MAP_REPLICATE_REQ
- KEY_MAP_REPLICATE_CONF
- Select all the Service Groups and click on "Assign IBC Reference". Execute search, chose MDI System from the search result, and click “Assign to Service Group”.

- The result should look like this.

- Select the Logon Data for each Service Group from the dropdown. Choose the Logon Data created earlier for all the service groups.

- Click “Finish”. Confirm the popup with “Yes” if you want the integration scenario to be activated immediately.
- Activate the pending tasks. Navigate to them by clicking the link.

- Click “Process List” to activate the logical ports

- If everything has been done properly, the logical ports should be activated successfully. Confirm the popup with “OK”.

- If everything has been configured as desired, navigate to tab “Service Administration” and open “Web Service Configuration.

- As search criteria, enter one of the Consumer Proxy
CO_MDG_BP_RPLCTRQ
CO_MDG_BP_RPLCTCO
CO_MDG_BP_RELATIONSHIP_OUT
CO_MDG_BP_RELATIONSHIP_CNF_OUT
CO_KEY_MAP_RPLCTRQ
CO_KEY_MAP_RPLCTCO
and click “Search”

- Ensure that a Logical Port is created for the our Provider System. Additionally, select the Logical Port and click on "Set Log. Port Default"

- Similarly, you can verify Logical Port creation for other Service Groups.
- At this point you Business Partners created in this system will be replicated to your MDI tenant. (Assuming necessary configuration is done at MDI. More details available here.)
VIII. Creating SOAP Endpoint to receive Business Partner and Key Mapping data from SAP MDI
- Navigate to tab “Service Administration” and open “Web Service Configuration.
- Open Service Definition: BUSINESSPARTNERSUITEBULKREPLIC

- Click on "Create Service"
- Provide value for
- Service Name: any meaningful name
- New Binding Name: any meaningful name
Click Next.

- Select SSL as Transport Level Security. Enable UserId/password as Transport Channel authentication.

- Click Next and then click Finish.
- To view the created binding, click on Display button.

- Navigate to "Transport Settings" tab.Copy the contents of "Calculated Access URL" field.

- The SOAP Endpoint is concatenation of Host Name of the ERP system and the "Calculated Access URL" field.
http://<Host_name>:<Https_Port>/Calculated_Access_URL
To retrieve HostName execute transaction smicm and then Click Shift +F1.
So, the final BP Endpoint URL will look like this.
http://ldciemt.wdf.sap.corp:44322/sap/bc/srt/xip/sap/businesspartnersuitebulkreplic/405/mdibpconsume...
You should use this URL to configure the BPOUTBOUND destination in your subaccount.
- Repeat Steps 2 - 6 for Service Definitions
a. BP Confirmation: BUSINESSPARTNERSUITEBULKREPLI1
b. BP Relationship: BUSINESSPARTNERRELATIONSHIPSUI
c. BP Relationship Confirmation: BUSINESSPARTNERRELATIONSHIPSU1
d. Key Mapping: KEYMAPPINGBULKREPLICATEREQUEST
e. Key Mapping Confirmation: KEYMAPPINGBULKREPLICATECONFIRM
Thank You.