SAP MDG · REPLICATION INBOUND
How do I implement the SAP MDG Business Partner inbound service BAdI to enrich inbound replication data, determine create/change, and route to staging or direct activation?
Implement `ZBADI_BP_INTERFACE_SERVICE` in `IF_MDG_SE_BP_BULK_REPLRQ_IN~INBOUND_PROCESSING`: read sender/scenario config, resolve BP key mapping, enrich the outbound `mdg_bs_bp_s_extern` structure from active-area data, then route either to direct activation or staging by setting `mdg_user_proxy_setting` and calling `CL_MDG_BP_BUPA_SI_IN=>IF_MDG_UPLOAD_PROXY~SETUP_FOR_FILE_UPLOAD`.
Implement `ZBADI_BP_INTERFACE_SERVICE` in `IF_MDG_SE_BP_BULK_REPLRQ_IN~INBOUND_PROCESSING`: read sender/scenario config, resolve BP key mapping, enrich the outbound `mdg_bs_bp_s_extern` structure from active-area data, then route either to direct activation or staging by setting `mdg_user_proxy_setting` and calling `CL_MDG_BP_BUPA_SI_IN=>IF_MDG_UPLOAD_PROXY~SETUP_FOR_FILE_UPLOAD`.
The MDG BP inbound service BAdI (`ZBADI_BP_INTERFACE_SERVICE`) is the enhancement point for SOAP/proxy replication requests. In `IF_MDG_SE_BP_BULK_REPLRQ_IN~INBOUND_PROCESSING`, you read sender/scenario config, resolve the BP number through key mapping, enrich the deep `out-partner-central_data-...` / `out-customer-...` / `out-vendor-...` nodes, and then route the payload either to staging or direct activation using the MDG upload proxy settings.
Process flow
- Create or confirm BAdI implementation `ZBADI_BP_INTERFACE_SERVICE` for `IF_MDG_SE_BP_BULK_REPLRQ_IN` in SE19.
- Confirm the exact interface signature in SE24 for `IF_MDG_SE_BP_BULK_REPLRQ_IN~INBOUND_PROCESSING` and `OUTBOUND_PROCESSING`.
- Read `in-message_header-sender_business_system_id` and normalize it with `to_upper( )`.
- Determine the scenario/system type using configuration such as `ZMDG_D_UTIL_SYST` and related `ZMDG_*` tables.
- Resolve the BP number through `CL_MDG_ID_MATCHING_API_BS` by key mapping.
- Decide whether the message is create or change and determine the CR type.
- Read active-area data such as `BUT0ID`, `KNVP`, `KNVV`, `KNBK`, `BUT0BK`, `KNA1`, `BUT000`, `LFB1`, and `LFM1` as needed.
- Fill the deep outbound structure `mdg_bs_bp_s_extern` and set matching `datax` and `task` flags in `out-partner`, `out-customer`, or `out-vendor` nodes.','Build `mdg_user_proxy_setting` with `PROXY_PERSISTANCE` and optionally `CHANGE_REQEUE
SE19Enhancement implementation for `IF_MDG_SE_BP_BULK_REPLRQ_IN`
Register and activate the BAdI implementation `ZBADI_BP_INTERFACE_SERVICE`.
SE24Class/interface display for `IF_MDG_SE_BP_BULK_REPLRQ_IN` and helper classes
Confirm the exact method signatures and runtime object interfaces before coding.
Configuration table `ZMDG_D_UTIL_SYST`
Map sender business system to scenario/system type.
Configuration tables `ZMDG_C_UTILITY`, `ZMDG_C_EKP_USAGE`, `ZMDG_C_BP_S_DER`
Drive scenario-dependent routing and enrichment behavior.
Referenced tables
| Object | Purpose |
|---|---|
ZMDG_D_UTIL_SYST | Scenario/system mapping used to determine the inbound processing branch. |
ZMDG_C_UTILITY | Config-driven utility behavior referenced by the inbound service. |
ZMDG_C_EKP_USAGE | Config-driven behavior referenced by the inbound service. |
ZMDG_C_BP_S_DER | Config-driven behavior referenced by the inbound service. |
mdg_user_proxy_setting | Controls persistence routing via `PROXY_PERSISTANCE` and optional `CHANGE_REQUEST_TYPE`. |
CL_MDG_ID_MATCHING_API_BS | Key mapping API that resolves source ID and business system to BP number. |
BUT0ID | Active-area BP identification data read during enrichment. |
KNVP | Active-area customer partner function data read during enrichment. |
KNVV | Active-area customer sales data read during enrichment. |
KNBK | Active-area customer bank data read during enrichment. |
BUT0BK | Active-area BP bank data read during enrichment. |
KNA1 | Active-area customer general data read during enrichment. |
The remaining configuration, implementation details, and testing guidance continue from this answer more…
Related questions and keywords
Alternative questions
- How do I code IF_MDG_SE_BP_BULK_REPLRQ_IN~INBOUND_PROCESSING for BP replication?
- Which tables and classes are used in MDG BP inbound service enhancement?
- How do I set up the BP inbound BAdI to map active-area data and call the MDG upload proxy?
Possible questions
- How do I implement the MDG BP inbound service BAdI?
- What is the standard pattern for IF_MDG_SE_BP_BULK_REPLRQ_IN~INBOUND_PROCESSING?
- Which configuration controls direct activation versus staging for BP replication?
- How do I enrich out-partner, out-customer, and out-vendor data in the BP inbound service?
- Which SAP objects are used for key mapping and persistence routing in MDG BP inbound processing?