技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
btp-master-data-integration【数据与研究】SAP Master Data Integration (MDI) — BP/Material replication, distribution models, CPI iFlow integration
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: btp-master-data-integration description: SAP Master Data Integration (MDI) — BP/Material replication, distribution models, CPI iFlow integration trigger: keywords: [mdi, master data, business partner replication, material master sync, distribution model, master data hub] intent: Replicating master data between SAP systems via BTP MDI prerequisites:
Central hub for master data harmonization — Business Partner, Material, Cost Center, etc.
# Create service instance
cf create-service master-data-integration standard mdi-instance
cf create-service-key mdi-instance mdi-key
cf service-key mdi-instance mdi-key
# → Save the `url` and `clientid`/`clientsecret`
{
"sourceSystem": "S4H_100",
"entityType": "BusinessPartner",
"targetSystems": ["SFSF_worker", "COM_Cloud_customer"]
}
Entities: BusinessPartner, Material, CostCenter, ProfitCenter, CompanyCode.
# Get OAuth token
TOKEN=$(curl -s -X POST "$AUTH_URL/oauth/token" \
-d "grant_type=client_credentials&client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET" \
| jq -r '.access_token')
# Send Business Partner
curl -X POST "$MDI_URL/api/v1/BusinessPartner" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"BusinessPartner":"1000001","BusinessPartnerName":"ACME Corp"}'
S/4HANA → CPI iFlow (BAPI_MATERIAL_GETLIST → MDI API map) → MDI Service → Targets
Key CPI patterns: idempotency check (avoid duplicate BP), field mapping (S/4 field → MDI field), error logging to Cloud Logging.
MDI dashboard → Distribution run status, record-level errors, queue depth, processing time per entity.
GET $MDI_URL/api/v1/$metadata, map fields in CPI iFlow.# Check MDI service health
curl -s -o /dev/null -w "%{http_code}" "$MDI_URL/health/v1"
# Expect: 200
# List distribution models
curl -s -H "Authorization: Bearer $TOKEN" "$MDI_URL/api/v1/DistributionModel" | jq
# Check replication log
curl -s -H "Authorization: Bearer $TOKEN" "$MDI_URL/api/v1/DistributionLog?$top=5" | jq