Skip to Content
The blog post has been successfully updated.
Technical Articles
Author's profile photo Shivankit Bisht

Configuring SAP Master Data Integration service for Business Partners replication

(Note: Some features mentioned here might not be available in your environment. Please get in touch with SAP support if you face any such discrepancy.)

SAP Master Data Integration service serves as a central entry point for master data integration within the Intelligent Suite. There are many articles such as this one that explain how the service can help our customers achieve true integration for various Domain models in the cloud.

In this blog, I will go through the steps required to enable the SAP Master Data Integration service and replicate Business Partners. It is important to note that these steps are valid only for Business Partners replication. If your scenario requires replication of objects such as Cost center etc. then additional steps might be required.

 

I. Service Instance Creation for Business Partner Read and replicate.

  1. Go to the SAP BTP subaccount where you want the SAP MDI instance to be created. On the left-hand side, under Services, click on Instances and Subscriptions.
  2. Click on Create on the top right side.
  3. Select the service name and provide an Instance Name. Click Next.
  4. Use this JSON to create the service instance.
    {
        "businessSystemId": "<Business_System_Name>",
        "application": "<application_type>",
        "xs-security": {
            "xsappname": "<Service-Clone-Name>",
            "authorities": [
                "$XSMASTERAPPNAME.BPCommonRead",
                "$XSMASTERAPPNAME.BPSensitiveDataRead"
            ]
        }
    }​

    – Provide a service clone name, a unique v4 UUID. You can use this link to generate a v4 UUID https://www.uuidgenerator.net/

    – For BusinessSystemId, provide the logical system identifier of the client system that you will connect to the MDI instance. For E.g. if I want to connect my SAP S/4 HANA Cloud system CG4 to this system, I will use its logical system 0LOI36K.
    In SAP S/4HANA Cloud system this value is can be found under Communication systems tile and then filter by Own System.
    In SAP S/4HANA On-premise system, open transaction se37 and execute Function Module LCR_GET_OWN_BUSINESS_SYSTEM.

    – For application type, provide one value from mdg, s4, c4c, ariba, cdc, commerceCloud, hrc (SAP Subscription Billing) depending upon the type of your client system. This value is mandatory if you want to persist Key Mapping in MDI. In case your system type is not listed above, please contact SAP MDI development team.

  5. Select the service instance you created and click on Create Service Key. Click Next and then Finish.
  6. We are now done with Instance Creation for Business Partner read and replicate. Please note that for each new client system that you want to connect to MDI, you would have to follow this step again.

 


II. Setting up Generic Configuration

In this step we provide a unique identifier to the MDI tenant. This is necessary because during Key Mapping creation a corresponding MDI entry is created along with the Key Mapping of the client Business partner. At that moment, this identifier is referenced in MDI Key Mapping.

  1. Create a new MDI Service Instance. Use the below JSON to create the instance.
    {
       "xs-security":{
          "xsappname":"<service-clone-name>",
          "authorities":[
             "$XSMASTERAPPNAME.BPGenericConfigRead",
             "$XSMASTERAPPNAME.BPGenericConfigWrite"
          ]
       }
    }​

    Provide a v4 UUID for service-clone-name parameter.

  2. Generate service keys.
  3. In the Postman Client, create a POST Request for the following endpoint. This endpoint in OAuth2.0 protected. Use the service keys that were generated.
    https://one-mds.cfapps.<region>.hana.ondemand.com:443/businesspartner/v0/odata/API_GENERIC_CONFIGURATIONS/GenericConfigurations

    Use the following payload.

    {
        "BusConfignVersion": "4294967296",
        "BusConfignIsDeleted": null,
        "Id": "<Unique_V4_Uuid>",
        "ConfigurationName": "Business System",
        "ConfigurationValue": "<identity-zone>",
        "AllowedValues": null
    }

    Replace the identity-zone parameter value with the identityzone from the service keys. To generate a V4 UUID: https://www.uuidgenerator.net/

    Please refer to the Troubleshooting section to generate access token via the Postman client.

 

 

III. Create SOAP Outbound Destinations to the client System

The Business partner implementation in MDI utilizes the BTP subaccount destinations that are defined in a specific format.

  1. Navigate to your subaccount and click on the Destinations tab on the right side. (Your user should have relevant security authorisations)
  2. Click on “New Destination”.
  3. In the Name placeholder provide value <Business_System_Name>_BPOUTBOUND. Make sure “Business_System_Name” value is the same as the one used in section I of this blog.
  4. Type: HTTP
  5. The URL placeholder value can retrieved in two ways depending upon whether your system is is a Cloud or OnPremise.
    For the S/4H OnPremise system login to your ERP system and create BP SOAP endpoint as mentioned in section IX of this blog here. Use the final URL created in this field.
    For the Cloud system, open a communication arrangement of type SAP_COM_0008 and copy the inbound Services URL.
  6. Proxy Type: OnPremise for S/4HANA on-premise system / Internet for S/4HANA Cloud system. Additionally, a cloud connector setup would be required for OnPremise systems.
  7. Username and Password for the S/4HANA system.
  8. Click on “New Property” and add MDOConsumer. Set its value True.
  9. Click on Save. The final result should look like this.
  10. Repeat steps 3-7 and create the following destination:
    a. <Business_System_Name>_BPCONFIRM
    b. <Business_System_Name>_BPRELOUTBOUND
    c. <Business_System_Name>_BPRELCONFIRM

    NOTE: Optionally you can also configure
    d. <Business_System_Name>_KEYMAPCONFIRM
    e. <Business_System_Name>_KMOUTBOUND
    These interfaces are part of the Communication Arrangement SAP_COM_0539 & SAP_COM_0540.

 

IV. Subscribing to Master Data Orchestration

In the sub-account, click on “Instances and Subscriptions” on the left side. Search for the “Master Data Integration (Orchestration)” service and click Subscribe.

 

V. Configuring access for Master Data Orchestration Fiori application

To view the Master Data Orchestration tiles, your user should have the necessary roles assigned to it.

  1. Under the Security dropdown on the left side, click on Role Collections. (You should have a Security Administrator authorisation to perform this step).
  2. Click on sign and create a new Role collection with the name MDOAdmin. Search for the role MasterDataOrchestrationAdmin & MasterDataOrchestrationDisplay to the role collection. Finally, add your user to the role collection.
  3. Once your user is assigned, go back to Instances and Subscriptions and click on “Go to Application”.
  4. You should now have access to all the Master Data Orchestration tiles.

 

V. Creating MDO Distribution Model for Business Partner Replication

  1. Open the “Manage Distribution Model”.
  2. Provide a name for the model and select “Business Partner” in the Business Object Type dropdown.
  3. Set the continuous distribution checkbox if you want the business partners to be replicated as soon as they are created/updated.
  4. Provide a value for Package Size.  Package size specifies up to how many objects are contained in a single outbound XML message from MDI to the client system
  5. Select the latest stable API : MDI_SOAP_BUSINESS_PARTNER
  6. Now, to create a Provider and Consumer, click the create button and select the provider: MDI
    Similarly for the consumer, select the target destination. You can select the appropriate “Application Category” if required.
  7. Set Data filters if required.
  8. Activate the Replication Model. The configuration is now complete. You can now replicate the Business Partners from the SAP Master Data Integration service to client systems.

 

 

Troubleshooting

  1. Checking if the Business Partner is replicated
    Using the credentials generated in Step 1 of the blog, perform a GET request on:

    https://one-mds.cfapps.<region>.hana.ondemand.com/businesspartner/v0/odata/API_BUSINESS_PARTNER/BusinessPartner?$format=json&$filter=BusinessPartner eq '<BP_Number>'

    The endpoint is OAuth2.0 protected. SAP MDI adopts the BP Number of the sender system. So, you can use the BP Number of the sender system for the GET request.

    Additionally, you can expand on an entity to see the details. Eg:

    https://one-mds.cfapps.<region>.hana.ondemand.com/businesspartner/v0/odata/API_BUSINESS_PARTNER/BusinessPartner?$format=json&$filter=BusinessPartner eq '<BP_Number>'&$expand=to_Person
  2. Accessing MDI Business Partner Endpoints
    https://one-mds.cfapps.<region>.hana.ondemand.com:443/businesspartner/v0/soap/BusinessPartnerBulkReplicateRequestIn?tenantId=<identity_zone>
    
    https://one-mds.cfapps.<region>.hana.ondemand.com:443/businesspartner/v0/soap/BusinessPartnerRelationshipBulkReplicateRequestIn?tenantId=<identity_zone>
    
    https://one-mds.cfapps.<region>.hana.ondemand.com:443/businesspartner/v0/soap/BusinessPartnerBulkReplicateRequestConfIn?tenantId=<identity_zone>
    
    https://one-mds.cfapps.<region>.hana.ondemand.com:443/businesspartner/v0/soap/BusinessPartnerRelationshipBulkReplicateRequestConfirmIn?tenantId=<identity_zone>
    
    https://one-mds.cfapps.<region>.hana.ondemand.com:443/businesspartner/v0/soap/KeyMappingBulkReplicateRequestIn?tenantId=<identity_zone>
    
    https://one-mds.cfapps.<region>.hana.ondemand.com:443/businesspartner/v0/soap/KeyMappingBulkReplicateRequestConfirmIn?tenantId=<identity_zone>
    

    These endpoints are Basic Authenticated. Client_Id is the username and clientsecret is the password. Both of the values are available in the service keys of the MDI Instance.

  3. Using Postman Client with OAuth2.0 authenticated endpoints.

 

Assigned Tags

      23 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Siva Chandolu
      Siva Chandolu

      Hello Shivkant,

      Thanks for the detailed blogs.It was helpful to start with the setup.

      I have followed the blogs to setup the replication of BP using MDI and have few queries related to setup.

      Could you please clarify the following?

      • What is the need/purpose of MDI instance with the name Generic Configuration? -> Explained in II. Setting up Generic Configuration
      • ID value i.e.
          "Id": "9251014e-3b89-49c1-bb52-b681da7d7bf4",​

        mentioned in the post request payload for Generic instance is constant!! Is this correct?Should we use the relevant Instance ID in Service key of Generic MDI instance?

      • What is the purpose of the destinations explained in the blog? <Business_System_Name>_KEYMAPCONFIRM
                 <Business_System_Name>_KMOUTBOUND

      Regards,

      Siva

      Author's profile photo srikanth kakani
      srikanth kakani

      Hello Shivankit,

      Thanks for the good blog on explaining the MDI configurations.

      Along with Siva questions, I have couple points need some light. Can you please explain

      1. when we create post request (Section II. 3), What is the purpose of this post request and where these data will be saved and how can we use this data in Business partner replication
      2. How the testing can be done i.e. Which service end point will be used to replicate the BP data to S4H Cloud?
      3. In Troubleshooting-- Accessing MDI Business Partner Endpoints, how can we use these endpoints? (I tried in postman but getting 403 error)

      Thanks in advance

      Thanks,

      Srikanth

      Author's profile photo Shivankit Bisht
      Shivankit Bisht
      Blog Post Author
      1. Mentioned in other comment
      2. The "Inbound Services" endpoints in the Communication Arrangemnt SAP_COM_0008
      3. You need to provide a valid XML payload. This endpoint is OAuth 2.0 protected.
      Author's profile photo Shivankit Bisht
      Shivankit Bisht
      Blog Post Author
      • MDI creates a Key Mapping, corresponding to each Business Partner. The "Business System" value provided in Generic Configuration is used to create that Key Mapping.

        You can think of it as assigning a Logical System Id to MDI. Something like S/4 systems have Id's ER9_001
        The  "Id" value can be any valid V4 UUID.

      • <Business_System_Name>_KEYMAPCONFIRM : Send SOAP confirmation back to sender system when a Key Mapping SOAP payload is sent to MDI.

        <Business_System_Name>_KMOUTBOUND: Send MDI Key Mapping information to the client system

       

      Author's profile photo Leo Li
      Leo Li

      @Shivankit, Don't know what's purpose of MDI instance with the name Generic Configuration either. Feel like there's useless of Generic Configuration.

      Author's profile photo Shivankit Bisht
      Shivankit Bisht
      Blog Post Author

      If it was useless, it would not be in this blog.

      MDI creates a Key Mapping, corresponding to each Business Partner. The "Business System" value provided in Generic Configuration is used to create that Key Mapping.

      This Key mapping is later distributed via SOAP or Log API.

      Author's profile photo Leo Li
      Leo Li

      Hi Shivankit,

      Here is my scenario: MDI -> CPI(by SOAP).

      First, I would have to put "BusinessPartner" data into MDI, however, postman always gives "500 Internal Server Error".  So, from your side, do you have the correct SOAP BP payload?

      Author's profile photo Shivankit Bisht
      Shivankit Bisht
      Blog Post Author

      The payload sent to MDI is incorrect. Please reach out at MDI General Slack Channel for the payload.

      Author's profile photo Srikanth Chandru
      Srikanth Chandru

      Hi Shivankit,

      I am trying to implement this at a client :

      Integrating Public Sector Master Data from SAP Business Technology Platform Master Data Integration to Employee Central : 

      https://help.sap.com/viewer/8737092aab7848d997cdd11a0f6ff13c/2105/en-US/c00f40ed0ae044ae8d5685d807bb4d93.html

      I am very new and educating myself on this topic of MDI enablement in BTP. What I am gathering is that to utilize the above services for Public Sector Master Data integration, the enablement of the "SAP Master Data Integration service in the BTP subaccount" as you have described in this blog is a Pre-Req step that needs to be performed first. Would you agree?

      Are there any learning journeys or official implementation guides coming out on this topic in the future do you know?

      Any further information for a beginner on this topic is very appreciated. Thank you for your insightful blog and efforts in educating the community on this niche and promising topic. Keep it on!!

      Best,
      Srikanth

      Author's profile photo Shivankit Bisht
      Shivankit Bisht
      Blog Post Author

      Hi, these steps are not required for Public Sector Master Data. For the exact steps please get in touch with MDI Team on our Slack General channel

      Author's profile photo Srikanth Chandru
      Srikanth Chandru

      Hi Shivankit,

      How does one get on the Slack General Channel as a Consulting Partner? This is a new channel that I am unaware of. Appreciate it if you can point me to that.

      Thanks,
      Srikanth

      Author's profile photo Shivankit Bisht
      Shivankit Bisht
      Blog Post Author

      Hi,

      I was not aware that you are a Consulting Partner. Please get in touch with michael.rieker@sap.com who can provide you the latest information on your scenario.

       

      Thanks

       

      Author's profile photo Muhammet Tenbih
      Muhammet Tenbih

      Hi Shivankit,

      regarding the  Generic Configuration why its required to insert  identify_zone of our client service key

      , in the parameter "ConfigurationValue".

      It's not possible to use any name for the MDI BusinessSystemname like e.g. MDIDEV ?

      Thank you

      BR

      Muhammet

      Author's profile photo Shivankit Bisht
      Shivankit Bisht
      Blog Post Author

      Yes, any value is possible. However, Please make sure that the same value is reference in soamanager and drfimg.

      Author's profile photo Peranandam Chinnathambi
      Peranandam Chinnathambi

      Hi Shivankit,

      I am getting below error which configuring MDI instance in trial BTP account

      Service broker error: Service broker one-mds-service-broker failed with: Trial is not supported, this service plan must only be used for SAP-to-SAP integrations

       

      Author's profile photo Peranandam Chinnathambi
      Peranandam Chinnathambi

      Author's profile photo Manasi Sridhar
      Manasi Sridhar

      For maintaining Business System using API_GENERIC_CONFIGURATION. Information on the payload to be used and authorization is documented below.

      https://help.sap.com/viewer/c7713d6177ad479d9ea00958db9f2f81/CLOUD/en-US/15564ec4dd434e81b20c857dd550494a.html

      https://help.sap.com/viewer/c7713d6177ad479d9ea00958db9f2f81/CLOUD/en-US/1afed34e287640ee90a27d29043e0f34.html

      Author's profile photo Alina Ifrim
      Alina Ifrim

      Thank you for the update Manasi.

      There are still some points which for me are not that clear and would be great if an expert could clarify those:

      1.  Related to Generic configuration, I am getting in the S4 On-premise system the error 400= "Error while processing the SOAP request. Please check the Generic Configuration again." when I am trying to push out business partners from S4 to MDI (by using DRFOUT). What can be the reason of that?
      2. when I modify a BP in S4 on-prem I see no trace in SRT_UTIL, even if is activated on SOAMANGER and even if the DRFIMG customizing is setup as Direct output for the business object type 986. What could be the reason? What it triggers the Outboud SOAP from S4 tp MDI?
      3. I am trying to configure a distribution model in MDI with Push Mode "to replicate data to SAP Master Data Integration" according to the SAP help link bellow and choosing the CHANGE API. But the issue is that if I want to use MDI as mandatory consumer, then I can't find it on the list and also on the list of Providers appears only MDI, not the S4 on-prem system. What can be wrong here?    Maintenance of the Distribution Model in SAP Master Data Orchestration - SAP Help Portal
      4. What value should be configured in property MDIInstanceID of the S4 system destination? Is it Service ID from the Service key of the Instance ( a44ab28a-f529-46b9-91de-f334d506f29a ) or the Instance name itself = CAL-onprem-MDI or the business system name from instance creation? I have tried with all 3 variants and still got the error "Model replication failed for MDI service instance S4H_100 as no corresponding destination counterpart was found. Please check the destination configuration (and property "MDIInstanceId") in the SAP BTP cockpit."

      Thnak you very much in advance for taking time to reply to these questions! It would help a lot!

      Alina

      Author's profile photo Manasi Sridhar
      Manasi Sridhar

      Hi,

      Please find the answers below :

      1. The RecipientBusinessSystemID in the SOAP payload should be same as value of business System maintained using API_GENERIC_CONFIGURATIONS. Doc : https://help.sap.com/docs/SAP_MASTER_DATA_INTEGRATION/c7713d6177ad479d9ea00958db9f2f81/15564ec4dd434e81b20c857dd550494a.html?locale=en-US&version=CLOUD
      2. I think Automatic Replication is not configured. If you use explicitly use DRFOUT do you see an entry ? If yes, then may you should check how Automatic Replication can be triggered form S4 side.
      3. When sending data to MDI using Change-API, MDI is mandatory Consumer, and for Provider you should get a value help based on the Service Instances created. Please reach out to MDI-MDO team otherwise.
      4.  Are you referring to SOAP distribution to S4. If so, MDIInstanceID is not needed for S4 system destination. Please use the below link for setting up destination : https://help.sap.com/docs/SAP_MASTER_DATA_INTEGRATION/c7713d6177ad479d9ea00958db9f2f81/2959a5c628024e39bcac60e3e7e85ba7.html?locale=en-US&version=CLOUD

      Regards,

      Manasi Sridhar

      Author's profile photo Alina Ifrim
      Alina Ifrim

      Thank you very much Manasi for the reply to the individual questions! 🙂 I have deeper dived and managed to resolve one of them (point 2), but for the others is still not clear. So I'm giving bellow the current status/question, where advice is highlly appreciated.

      1.  I have tried to send a POST and/or GET API to MDI by Postman - is this a good one, or which should be used?. When I'm trying to generate the OAuth2 in Postman Using Passcode method, I am getting the errror "Failed to decode basic authentication token". Why can be that? DO I mandatory need to regsiter the application to the SAP SaaS Provisioning service as in Getting an Application Access Token - SAP Help Portal ?
        • a.   In the DRFIMG I have configured the Business system to be the Subdomain name from the BTP subaccount. Is this ok ?
        • b.  when creating the instance in BTP for identifying the S4 onpreimise system, I have used as "businessSystemId" the one found in the S4  onprem system.
        • the values for point a and b above are different as one is from BTP subaccount and the other is from S4 onprem system. this is correct, right?
        • Is it mandatory to do the POST as well ?

      2. for automatic replication of BP after change I found another blog with indications, and after activating in transaction CRMC_BUT_CALL_FU the function MDG_BS_BP_OUTBOUND_DRF, I could see the same error in SRT_UTIL as when using DRFOUT

      3. Which would be the best way to reach MDI-MDO team for this issue no 3?

      4. I was not referring to the SOAP destinations, but to the main destination representing the S4 On-premise system which needs to be setup as a consumer in the Pull distribution model from MDI to S4 . This one is mentioned also in the SAP Help that needs to have the property MDIInstanceID setup, but is not clear where to take the value, and no matter which of the 3 values I use I still get the same error (Service ID from the Service key of the Instance ( like a44ab28a-f529-46b9-91........... ) or the Instance name itself = CAL-onprem-MDI or the business system name from instance creation).

       

      And one more new question:

      5. How do we mark entities as extensible in the SAP One Domain Model with a corresponding annotation (annotation: @odm.extensible:['primitives']), in order to add extension fields ? Do we need to use Sap graph or how ? Is it documented somewhere so we can follow the steps?

      Thank you again for the reply in advance!

      Author's profile photo Manasi Sridhar
      Manasi Sridhar

      When sending SOAP messages to MDI

      1. The RecipientBusinessSystemID in the payload should be same as value for the parameter "Configuration Value" maintained in the API_GENERIC_CONFIGURATIONS endpoint. Doc
      2. The SenderBusinessSystemID in the payload should be same as "businessSystemId" passed when creating service instances. Doc
      3. When using Basic Auth, the SOAP Urls should have a query parameter tenantId. The value for this parameter is "identityzone" from service key. Doc 
      Author's profile photo Aishwarya Laxmi
      Aishwarya Laxmi

      Hi Shivankit,

      I have done all the configuration related to MDI but mdi get API returning empty response

      {
      "@odata.context": "$metadata#Logs",
      "value": [],
      "@odata.deltaLink": "/v1/odm/2.1.1/sap.odm.businesspartner.BusinessPartner/events?$deltatoken=F3uAu5u2.1.1u1u4u1u0u31u0u0u0u0u0u0u0u0u0u0u0u0u0u0u0u0"
      }

       

      can you please tell if i am missing some steps or what's going wrong here ?

       

      Thanks

       

      Author's profile photo Aishwarya Laxmi
      Aishwarya Laxmi

      Hi Shivankit,

       

      I am unable to get data from mdi api even after doing all the configuration .

      mdi get api is returning empty response .

      {
      "@odata.context": "$metadata#Logs",
      "value": [],
      "@odata.deltaLink": "/v1/odm/2.1.1/sap.odm.businesspartner.BusinessPartner/events?$deltatoken=F3uAu5u2.1.1u1u4u1u0u31u0u0u0u0u0u0u0u0u0u0u0u0u0u0u0u0"
      }

      please let me know if i am missing some steps or why mdi not returning any data even replication is successful from s4 side .

       

      Thanks