EDUCAÇÃO E TECNOLOGIA

Configuring SAP Master Data Integration for Business Partners replication

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 model 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 you scenario requires replication of objects such as Cost center etc. then these steps are not valid.

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

  1. Go the SAP BTP subaccount where you want the SAP MDI instance to be created. In 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.

    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, commerceCloud depending upon the type of your client system.

  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

  1. Using the steps mentioned earlier create a service instance using the JSON
    { "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.sap.hana.ondemand.com:443/businesspartner/v0/odata/API_GENERIC_CONFIGURATIONS/GenericConfigurations
    Use the following payload.
    { "BusConfignVersion": "4294967296", "BusConfignIsDeleted": null, "Id": "9251014e-3b89-49c1-bb52-b681da7d7bf4", "ConfigurationName": "Business System", "ConfigurationValue": "<identity-zone>", "AllowedValues": null
    }​

    Replace the identity-zone parameter value with the identityzone from the service keys.

III. Replicating data from MDI to client systems: Master Data Orchestration setup

  1. Create a service instance and its service keys using the below JSON. Provide a V4 UUID for service-clone-name parameter.
    { "xs-security":{ "xsappname":"<service-clone-name>", "authorities":[ "$XSMASTERAPPNAME.MDOModelMaintain", "$XSMASTERAPPNAME.MDOObjectTypeOwnerMaintain", "$XSMASTERAPPNAME.MDOTriggerReplication", "$XSMASTERAPPNAME.MDOScopeMaintain", "$XSMASTERAPPNAME.MDOCopyModel" ] }
    }​
  2. Go to your subaccount and create a Provider Destination. The provider destination is an endpoint that will act as a source application from which data will be distributed to consumer applications. To create the provider destination follow these stepsA. Create a destination with the name MDO_PROVIDER.
    B. Give the URL: https://one-mds.cfapps.sap.hana.ondemand.com/businesspartner/v0/distribution/odata/v2/mdo.orchestrationAdmin
    Authentication: OAuth2ClientCredentials
    Provide clientId, clientSecret and TokenServiceURL using the service keys generated.
    C. Create an additional property MDOProvider and set it to true.
  3. Creating consumer destinationsCreate the following destinations.
    <Business_System_Name>_BPOUTBOUND
    <Business_System_Name>_BPRELOUTBOUND
    <Business_System_Name>_BPCONFIRM
    <Business_System_Name>_BPRELCONFIRM
    <Business_System_Name>_KMOUTBOUND
    <Business_System_Name>_KMCONFIRMFor the <Business_System_Name>_BPOUTBOUND destination, provide additional property MDOConsumer. Set its value to true.For each of the destinations use the respective endpoint from your client system. If the client system is an SAP ERP System select proxy type On Premise otherwise select Internet. For the SAP ERP system, cloud connector setup is mandatory.
  4. Subscription to Master Data Orchestration service.
    In the sub account, click on Instances and Subscriptions on left side. Search for Master Data Orchestration service and click Subscribe.
  5. To view the Master Data Orchestration tiles, your user should have the necessary roles assigned to it. Under the Security dropdown on left side, click on Role Collections. Click on sign and create a new Role collection with name MDO. Search for the role MasterDataOrchestrationAdmin and assign your user.

    One your user is assigned, go back to Instances and Subscriptions and click on Go to Application.You should have access to all the Master Data Orchestration tiles.
  6. Creating a Distribution Model.In MDO, open the Manage Distribution Model tile and click Create. Provide a name for the model and select Business Partner in Business Object Type dropdown. Set the continuous distribution checkbox if you want the business partners to be replicated as soon as they created/updated.

    Select API_BUSINESS_PARTNER in the Provider Interface sectionNow, to create a Provider and Consumer, click the create button and select the provider that you created in the previous steps.
    Similarly for the consumer, select the BPOUTBOUND destination. Do not provide any value for the application category.
    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.