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:
{
"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)
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
Assign required roles MasterDataOrchestrationAdmin & MasterDataOrchestrationDisplay to your user. Optionally you can add other available MDO roles.
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)
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:
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.
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).
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
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. |
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 |
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.
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
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.
Now, enable the ODM entities as below:
This completes all the required configurations to integrate Master data from S4HANA cloud to FSM.
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 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.
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |