SAP MDG · REPLICATION INBOUND
How do I implement an SAP MDG Business Partner inbound service BAdI for replication, key mapping, CR routing, and active-area enrichment?
Implement IF_MDG_SE_BP_BULK_REPLRQ_IN~INBOUND_PROCESSING to read sender scenario config, resolve BP key mapping, decide create/change and CR type, enrich the outbound MDG BP structure from active-area tables, and route the payload either to staging or direct activation with mdg_user_proxy_setting.
Implement IF_MDG_SE_BP_BULK_REPLRQ_IN~INBOUND_PROCESSING to read sender scenario config, resolve BP key mapping, decide create/change and CR type, enrich the outbound MDG BP structure from active-area tables, and route the payload either to staging or direct activation with mdg_user_proxy_setting.
Implement the MDG BP inbound BAdI around `IF_MDG_SE_BP_BULK_REPLRQ_IN~INBOUND_PROCESSING`: determine the sender scenario from `ZMDG_D_UTIL_SYST`, resolve the BP with `CL_MDG_ID_MATCHING_API_BS`, decide create vs. change and the CR type, enrich the outbound structure from active-area master data, then set `PROXY_PERSISTANCE` and optionally `CHANGE_REQUEST_TYPE` before calling `CL_MDG_BP_BUPA_SI_IN=>IF_MDG_UPLOAD_PROXY~SETUP_FOR_FILE_UPLOAD`.
Process flow
- 1. Register the BAdI implementation in SE19 for the MDG BP bulk replicate-request inbound service.
- 2. In `INBOUND_PROCESSING`, normalize `in-message_header-sender_business_system_id` and check `recipient_business_system_id`.
- 3. Read scenario/system routing from `ZMDG_D_UTIL_SYST` using the sender business system.
- 4. Resolve the external source key to a BP number with `CL_MDG_ID_MATCHING_API_BS`.
- 5. Derive the create/change case and the change request type.
- 6. Read active-area data such as `BUT0ID`, `KNVP`, `KNVV`, `KNBK`, `BUT0BK`, `KNA1`, or `LFB1` and populate the outbound BP structure.
- 7. Set `PROXY_PERSISTANCE` and, if staging, `CHANGE_REQUEST_TYPE` in `mdg_user_proxy_setting`.
- 8. Call `CL_MDG_BP_BUPA_SI_IN=>IF_MDG_UPLOAD_PROXY~SETUP_FOR_FILE_UPLOAD` with the prepared user settings.
Referenced tables
| Object | Purpose |
|---|---|
ZMDG_D_UTIL_SYST | Scenario/system routing configuration used to decide the inbound processing branch. |
mdg_user_proxy_setting | Controls routing to direct activation or staging through `PROXY_PERSISTANCE` and `CHANGE_REQUEST_TYPE`. |
BUT0ID | Business partner identification numbers for active-area enrichment. |
KNVP | Customer partner functions for active-area enrichment. |
KNVV | Customer sales-area data for active-area enrichment. |
KNBK | Customer bank data for active-area enrichment. |
BUT0BK | Business partner bank data for active-area enrichment. |
KNA1 | Customer general data for active-area enrichment. |
LFB1 | Vendor company-code data for active-area enrichment. |
LFM1 | Vendor purchasing-org data for active-area enrichment. |
The remaining configuration, implementation details, and testing guidance continue from this answer more…
Related questions and keywords
Alternative questions
- How do I build the inbound processing logic for IF_MDG_SE_BP_BULK_REPLRQ_IN?
- How do I enrich the MDG BP inbound proxy payload and route it to staging or direct activation?
- How do I use key mapping and user settings in an MDG BP inbound BAdI?
Possible questions
- How do I implement an SAP MDG Business Partner inbound service BAdI for replication, key mapping, CR routing, and active-area enrichment?
- Which class and method handle MDG BP bulk replicate-request inbound processing?
- How do I read active-area BP tables and populate the outbound MDG BP structure?
- How do I set PROXY_PERSISTANCE and CHANGE_REQUEST_TYPE for MDG BP inbound routing?
- How do I use CL_MDG_ID_MATCHING_API_BS in inbound BP replication?