CRM and CX Blog Posts by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
sureshmusham
Product and Topic Expert
Product and Topic Expert
865

Welcome back to our integration series! Having established the strategic differences of using SAP Master Data Integration (MDI) & CPI for S/4HANA Cloud to FSM replication in Part 1, this blog post pivots to the execution. I will provide a complete, step-by-step walkthrough detailing all the essential configurations required within SAP S/4HANA Cloud, the SAP MDI service on BTP, and the FSM MDI Connector. Additionally, will guide you through the key aspects of monitoring your live data replication and leveraging the necessary MDI APIs.

Blog Series links:

MDI vs. CPI: Master Data Decisions for SAP S/4HANA Cloud to SAP Field Service Management

SAP MDI Setup for Master Data Integration to SAP FSM from S/4HANA Cloud

Before proceeding with the configuration steps, it's essential to understand the core roles and data flow mechanics of the SAP Master Data Integration (MDI) framework:

  • In MDI, the change requests API is used to send data from external system to SAP MDI and the change events API is used to consume data from MDI to external system
  • SAP MDI holds data from multiple applications like S/4HANA, Successfactors, etc.
  • S/4HANA Cloud & Successfactors will act as provider systems when sending data to MDI and FSM would act as consumer to receive the data
  • Similarly, for Equipment and Functional Location data where data is sent from FSM to S4HANA, provider system would be FSM, and consumer would be S/4HANA
  • The WorkforcePersons are loaded as Unified person in FSM. The master system for this workforce persons would be Successfactors, but in case if the workforce persons are maintained in S/4HANA Cloud then it would act as provider for employee data.
  • Note that all the distribution models are maintained in MDI Business Data Orchestration Service (BDO) to read the Master change requests and send change events.
  • In MDI BDO, the CHANGE or SOAP APIs are used to inbound data into MDI from provider system and LOG APIs are used to outbound from MDI to consumer system.
  • The Business Partner and Relationship data is triggered using SAP_COM_0008 communication scenario (via DRF) to MDI.

sureshmusham_0-1762527681359.png

 

Configuration steps:

MDI Service Instance Setup:

  1. In SAP BTP Subaccount, create Master Data Integration instance pointing to S4HANA system. For this you need S4HANA own system name, you can get it from communication system app (filter for own system) in S4HANA cloud.
  • Select the application as “s4” for pointing to S4HANA. If you are creating service instance for Successfactor set the application parameter as “sfsf”.
  • You would need writePermissions to below entities and also additional XS authorities are required to access Business Partner MDI APIs. So, set the instance parameter as below:
{
    "application": "s4",
    "businessSystemId": "<S4HANABusinessSystemID>",
    "enableTenantDeletion": false,
    "writePermissions": [
        {
            "entityType": "sap.odm.workforce.WorkforcePerson"
        },
        {
            "entityType": "sap.odm.assetmanagement.FunctionalLocation"
        },
        {
            "entityType": "sap.odm.assetmanagement.Equipment"
        },
        {
            "entityType": "sap.odm.product.ProductGroup"
        },
        {
            "entityType": "sap.odm.workforce.capability.WorkforceCapability"
        },
        {
            "entityType": "sap.odm.product.Product"
        },
        {
            "entityType": "sap.odm.businesspartner.BusinessPartnerRelationship"
        },
        {
            "entityType": "sap.odm.workforce.capability.WorkforceCapabilityCatalog"
        },
        {
            "entityType": "sap.odm.workforce.capability.WorkforceCapabilityProficiencyScale"
        },
        {
            "entityType": "sap.odm.businesspartner.BusinessPartner"
        }
    ],
    "xs-security": {
        "xsappname": "<Service-Clone-Name>", <you can generate a unique v4 UUID>
        "authorities": [
            "$XSMASTERAPPNAME.BPCommonRead",
            "$XSMASTERAPPNAME.BPSensitiveDataRead"
        ]
    }
}

Create service keys (this will be used later)

  1. Create a generic MDI Service Instance to point to SAP FSM system. Any business system ID can be assigned. This will be referred later in BDO distribution models.

Use below parameter with following write permissions

{
    "businessSystemId": "FSM_US", <can be any name>
    "writePermissions": [
        {
            "entityType": "sap.odm.assetmanagement.FunctionalLocation"
        },
        {
            "entityType": "sap.odm.assetmanagement.Equipment"
        }
    ]
}

Now, create the service keys

 

  1. Now, subscribe to MDI (Orchestration) Service with standard plan.

sureshmusham_1-1762527681360.png 

sureshmusham_2-1762527681362.png

Assign required roles MasterDataOrchestrationAdmin & MasterDataOrchestrationDisplay to your user. Optionally you can add other available MDO roles.

MDO Business System:

  1. Setup the Business System in MDI tenant
  • Go to Master Data Integration (Orchestration) application, open “Configure Business System Name” tile to create the business system. This system will be referenced in key mapping.
  • Then open “Configure SOAP Replication” and enable SOAP replication checkbox.

sureshmusham_3-1762527681363.png

  • Optionally, open “Configure Object ID Behavior” tile in MDO and create default settings. This will create ODI mapping configs with defaults for all 435 business objects.

S/4HANA Configurations:

  1. Create Communication System for MDI Instance. This system will be referred in Communication arrangement (SAP_COM_0008) for Business Partner/Relationships.

Set the host name as MDI uri (one-mds.cfapps.sap.hana.ondemand.com)

Set Business System as MDI business system which you configured in step 4. Name should exactly match with MDI business system.

Set Authorization endpoint and token endpoint as <uaa.url>/authorize and <uaa.url>/oauth/token respectively if you want to use oauth2 token based authentication.

Also, set the inbound communication as basic and outbound communication as basic & oauth2 using the clientid and secret from the MDI service keys referring to S4HANA system (created in step 1)

  1. Communication Arrangements:

We need to create three different comm. arrangements as below scenarios:

SAP_COM_0008 – to replicate Business Partners, Contacts and Relationships to MDI system

Set the Comm. System as MDI system which you created in step 5.a

Activate only below outbound services:

  1.         Business Partner - Replicate from SAP S/4HANA Cloud to Client Path as "/businesspartner/v0/soap/BusinessPartnerBulkReplicateRequestIn?tenantId=<identity-zone>". Set Replication model name like "RM_MDI_BP", replication mode as Change (C), output mode as Direct (D)
  2.         Business Partner Relationship - Replicate from SAP S/4HANA Cloud to Client Path as "/businesspartner/v0/soap/BusinessPartnerRelationshipBulkReplicateRequestIn?tenantId=<identity-zone>". 
  •        Business Partner - Send Confirmation from SAP S/4HANA Cloud to Client Path as "/businesspartner/v0/soap/BusinessPartnerBulkReplicateRequestConfIn?tenantId=<identity-zone>". 
  1.         BP Relationship - Send Confirmation from SAP S/4HANA Cloud to Client Path as "/businesspartner/v0/soap/BusinessPartnerRelationshipBulkReplicateRequestConfirmIn?tenantId=<identity-zone>". 

You can get identity zone from service keys of MDI instance created for S4HANA system (Step 1)

 

SAP_COM_0659 – used to replicate the master data from S/4HANA cloud via SAP MDI.

Create arrangement using service binding (service keys) created for MDI instance pointing to S4 system (step 1). The Comm. System, authorization, outbound services are auto filled.

sureshmusham_4-1762527681382.png

 

SAP_COM_0594 – Used to connect to Business Data Orchestration where the replication models are defined. The replication models are configured in BDO using distribution models for different master object types.

While creating this comm. arrangement, you need to create new comm. system with inbound only checked and maintain the inbound user. (keep a note on user name and password).

sureshmusham_5-1762527681401.png

 

Set Destination in BTP setup connection between BDO and S4HANA.

For this destination url as complete service URL of Distribution Administration from SAP_COM_0594 arrangement.

Set basic authentication with inbound user you created in SAP_COM_0594 arrangement.

Add below additional properties:

MDOProvider and MDOConsumer as true, MDIInstanceId as systemId from the service key you created for MDI instance created for S4HANA (Step 1)

MDOBusinessSystem as S4HANA Business System Id

Perform a check connection, it you should give successful connection

sureshmusham_6-1762527681410.png

 

Setup Distribution Models in MDO:

In MDI, configure the Distribution models for the valid objects

Integration Scenario

Business Object

ODM

API

Version

Mode

Provider

Consumer

Comments

S4H > MDI

Business Partner

sap.odm.businesspartner.BusinessPartner

MDI_SOAP_BUSINESS_PARTNER

3.3.0

Push

S4HANA SystemID

MDI

Replicates BP data from S4H system to MDI. Note: Key Mapping enabled

MDI > FSM

Business Partner

sap.odm.businesspartner.BusinessPartner

MDI_LOG_BUSINESS_PARTNER

3.3.0

Pull

MDI System ID

FSM Business System

Replicates BP data from MDI system to FSM

MDI > FSM

Business Partner Relationship

sap.odm.businesspartner.BusinessPartnerRelationship

MDI_LOG_BUSINESS_PARTNER_RELATIONSHIP

2.2.0

Pull

MDI System ID

FSM Business System

Replicates BP Relationship data from MDI system to FSM

S4H > MDI

Product Group

sap.odm.product.ProductGroup

MDI_CHANGE_PRODUCT_GROUP

5.0.0

Push

S4HANA SystemID

MDI

Replicates Product Group data from S4H system to MDI. Note: Set the Schedule as continuous distribution (immediate)

MDI > FSM

Product Group

sap.odm.product.ProductGroup

MDI_LOG_PRODUCT_GROUP

5.0.0

Pull

MDI System ID

FSM Business System

Replicates Product Group data from MDI system to FSM

S4H > MDI

Product

sap.odm.product.Product

MDI_CHANGE_PRODUCT

5.0.0

Push

S4HANA SystemID

MDI

Replicates Product data from S4H system to MDI. 

MDI > FSM

Product

sap.odm.product.Product

MDI_LOG_PRODUCT

5.0.0

Pull

MDI System ID

FSM Business System

Replicates Product data from MDI system to FSM

S4H > MDI

Equipment

sap.odm.assetmanagement.Equipment

MDI_CHANGE_EQUIPMENT

5.1.0

Push

S4HANA SystemID

MDI

Replicates Equipment data from S4H system to MDI. 

MDI > FSM

Equipment

sap.odm.assetmanagement.Equipment

MDI_LOG_EQUIPMENT

5.1.0

Pull

MDI System ID

FSM Business System

Replicates Equipment data from MDI system to FSM

FSM > MDI

Equipment

sap.odm.assetmanagement.Equipment

MDI_CHANGE_EQUIPMENT

5.1.0

Push

FSM Business System

MDI System ID

Replicates Equipment data from FSM system to MDI. 

MDI > CC8

Equipment

sap.odm.assetmanagement.Equipment

MDI_LOG_EQUIPMENT

5.1.0

Pull

MDI System ID

S4HANA SystemID

Replicates Equipment data from MDI system to S4HANA

S4H > MDI

Functional Location

sap.odm.assetmanagement.FunctionalLocation

MDI_CHANGE_FUNCTIONAL_LOCATION

5.0.0

Push

S4HANA SystemID

MDI

Replicates Functional Location data from S4H system to MDI. 

MDI > FSM

Functional Location

sap.odm.assetmanagement.FunctionalLocation

MDI_LOG_FUNCTIONAL_LOCATION

5.0.0

Pull

MDI System ID

FSM Business System

Replicates Functional Location data from MDI system to FSM

FSM > MDI

Functional Location

sap.odm.assetmanagement.FunctionalLocation

MDI_CHANGE_FUNCTIONAL_LOCATION

5.0.0

Push

FSM Business System

MDI System ID

Replicates Functional Location data from FSM system to MDI. 

MDI > CC8

Functional Location

sap.odm.assetmanagement.FunctionalLocation

MDI_LOG_FUNCTIONAL_LOCATION

5.0.0

Pull

MDI System ID

S4HANA SystemID

Replicates Functional Location data from MDI system to S4HANA

S4H > MDI

Workforce Person (Employees in S4HANA)

sap.odm.workforce.WorkforcePerson

MDI_CHANGE_WORKFORCE_PERSON

3.0.0

Push

S4HANA SystemID

MDI

Replicates Employee data from S4H system to MDI. 
If workforce persons are created from Successfactors system, then set the source then create a MDI instance for Successfactors and point to the respective Successfactors system

MDI > FSM

Workforce Person (Employees in S4HANA)

sap.odm.workforce.WorkforcePerson

MDI_LOG_WORKFORCE_PERSON

5.1.0

Pull

MDI System ID

FSM Business System

Replicates Employee data from MDI system to FSM
If workforce persons are created from Successfactors system, then set the source then create a MDI instance for Successfactors and point to t

The distribution of business partner data from SAP S/4 HANA to SAP Master Data Integration via SOAP still must be configured in the Data Replication Framework (DRF) locally in SAP S/4 HANA. The distribution of business partner data via REST between SAP Master Data Integration and SAP S/4HANA is not supported.

If you are integrating the Workforce Capability, proficiency, catalog, then configure respective BDO models. Refer to guide https://help.sap.com/docs/SAP_FIELD_SERVICE_MANAGEMENT/703cab4eaf67401293a27fa1b63f4edb/mdi-configur...

Mode: The mode determines which system triggers the data distribution. In Push mode, this is done by the provider who pushes data to the consumer. In Pull mode, the consumer regularly requests changes from the provider. In any case, the filtering of the data is done by the provider.

sureshmusham_7-1762527681412.png

API types:

CHANGE or SOAP API is used to replicate data into SAP MDI from provider system

LOG API is used replicate data from SAP MDI to consumer systems

 

FSM MDI Connector Configuration

Here we make the configurations in SAP FSM to setup connection to SAP MDI to pull data using polling method.

Login to FSM admin console Company > FSM Integrations > MDI Connector Configuration

First, we will configure MDI connection using the MDI XSUAA url & client details. Later the ODM entities are configured.

Create MDI connector by either manually filling the MDI URL, XSUAA URL, Oauth2 client id, secret OR simply use the service keys created for the generic FSM instance. 

Note: if you want to setup integration to multiple FSM companies from SAP MDI, you need to create multiple generic MDI instances in BTP pointing to different FSM company names by differentiating the business system names.

sureshmusham_8-1762527681419.png

Now, enable the ODM entities as below:

sureshmusham_9-1762527681425.png

 

This completes all the required configurations to integrate Master data from S4HANA cloud to FSM.

 

Triggering Data Replication

The data will be replicated automatically from provider system as soon as the data in created/changed to MDI. For the Business Partner and Relationships which uses SAP_COM_0008 communication scenario, the data is transferred to SAP MDI via SOAP based API. If you set the replication mode as Change with output mode as Direct in the comm. arrangement, the data will be transferred immediately to SAP MDI instance. 

As we have set the Distribution models in SAP MDI to run every 5 minutes, the MDI will poll every 5 minutes the provider system (S4HANA or FSM) for changes and push the data to consumer system (FSM/S4HANA). 

For the initial loads, follow the below recommended sequence:

1) Replicate all Contacts from S4HANA to MDI using "Replicate by Replication Model" with contact role code filter

2) Replicate all Business Partners from S4HANA to MDI using "Replicate by Replication Model" with Customer, Supplier, Vendor, etc valid role codes filter. This will initiate the Relationship web service messages as well as all the contacts are first loaded into MDI. 

3) Use Replicate on the LOG API Distribution models of other business objects from MDI in the following sequence:

Workforce Person, Product Group, Product, Equipment, Functional Location

 

Monitoring

Monitoring of the master data replication from S4HANA public cloud to SAP FSM via SAP MDI in multiple ways. 

Monitoring from S/4HANA:

In S/4HANA Cloud, you can monitor the replication of Business Partners/Relationships from AIF Message Monitor "Message Dashboard - SAP Application Interface Framework" app. 

For the other objects which run on REST based API, you can monitor the data using AIF "Message Monitoring Overview" app. 

For inbound data, check Master Data Integration Inbound (LOADRUN_I – for different business types)

For outbound data, check Master Data Integration Outbound (CHANGERUN_0 – for different business types)

Monitoring from SAP FSM:

In SAP FSM, Admin Company > FSM Integrations > MDI Connector Replication Report, you can get an overview of all objects that are replicated between SAP MDI and FSM

In the MID Connector Errors, you can check for both inbound and outbound errors. 

 

SAP MDI Odata and Rest APIs

In order check data in SAP MDI, you can leverage below APIs:

First get token the OAuth2 token from Service Keys created for S4 MDI instance.

POST https://<identity-zone>.authentication.sap.hana.ondemand.com/oauth/token
Headers:
Content-Type: application/x-www-form-urlencoded
Authorization: Basic <based64 encoded value of clientid:clientsecret> 

Body:
client_id=<clientid>
&grant_type=client_credentials

 

Oauth2 token is required to authenticate these APIs:

Odata APIs to read BP/Relationships:

GET https://one-mds.cfapps.sap.hana.ondemand.com/businesspartner/v0/odata/API_BUSINESS_PARTNER/BusinessPartner?$format=json&$filter=BusinessPartner eq '<BPID>'
Authorization:  Bearer {{getToken.response.body.access_token}} 

OR 

GET https://one-mds-bp-odata.cfapps.sap.hana.ondemand.com:443/businesspartner/v0/odata/API_BUSINESS_PARTNER/BusinessPartner(guid'<GUID of BP>')/to_BusinessPartnerRelationship
Authorization:  Bearer {{getToken.response.body.access_token}}

 

REST APIs check other data from SAP MDI:

Request API is used to send data from consumer system to SAP MDI

Events API is used to pull data from MDI to consumer system

First get the deltaToken by passing timestamp as in ISO 18601 format (yyyy-MM-ddTHH:mm:ss.sssZ) for any standard business object. You need to use the correct odm model & version.

GET https://one-mds.cfapps.sap.hana.ondemand.com/v1/odm/5.0.0/sap.odm.product.Product/deltaToken?timestamp=2025-11-03T04%3A11%3A40.859Z
Authorization:  Bearer {{getToken.response.body.access_token}}

 

The use this deltaLink/nextLink to check all the data change events from the timestamp supplied in above API:

GET https://one-mds.cfapps.sap.hana.ondemand.com/v1/odm/5.0.0/sap.odm.product.Product/events?$deltatoken=<deltaToken>
Authorization:  Bearer {{getToken.response.body.access_token}}

 

References:

https://help.sap.com/docs/SAP_FIELD_SERVICE_MANAGEMENT/703cab4eaf67401293a27fa1b63f4edb/mdi-introduc...

https://help.sap.com/docs/SAP_S4HANA_CLOUD/0f69f8fb28ac4bf48d2b57b9637e81fa/32afd67be8dc4e66890171e9...