Skip to Content
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

      14 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.