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. 1. Register the BAdI implementation in SE19 for the MDG BP bulk replicate-request inbound service.
  2. 2. In `INBOUND_PROCESSING`, normalize `in-message_header-sender_business_system_id` and check `recipient_business_system_id`.
  3. 3. Read scenario/system routing from `ZMDG_D_UTIL_SYST` using the sender business system.
  4. 4. Resolve the external source key to a BP number with `CL_MDG_ID_MATCHING_API_BS`.
  5. 5. Derive the create/change case and the change request type.
  6. 6. Read active-area data such as `BUT0ID`, `KNVP`, `KNVV`, `KNBK`, `BUT0BK`, `KNA1`, or `LFB1` and populate the outbound BP structure.
  7. 7. Set `PROXY_PERSISTANCE` and, if staging, `CHANGE_REQUEST_TYPE` in `mdg_user_proxy_setting`.
  8. 8. Call `CL_MDG_BP_BUPA_SI_IN=>IF_MDG_UPLOAD_PROXY~SETUP_FOR_FILE_UPLOAD` with the prepared user settings.

Referenced tables

ObjectPurpose
ZMDG_D_UTIL_SYSTScenario/system routing configuration used to decide the inbound processing branch.
mdg_user_proxy_settingControls routing to direct activation or staging through `PROXY_PERSISTANCE` and `CHANGE_REQUEST_TYPE`.
BUT0IDBusiness partner identification numbers for active-area enrichment.
KNVPCustomer partner functions for active-area enrichment.
KNVVCustomer sales-area data for active-area enrichment.
KNBKCustomer bank data for active-area enrichment.
BUT0BKBusiness partner bank data for active-area enrichment.
KNA1Customer general data for active-area enrichment.
LFB1Vendor company-code data for active-area enrichment.
LFM1Vendor 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?

Keywords

SAP MDGBusiness Partnerinbound serviceBAdIIF_MDG_SE_BP_BULK_REPLRQ_ININBOUND_PROCESSINGkey mappingCL_MDG_ID_MATCHING_API_BSmdg_user_proxy_settingCL_MDG_BP_BUPA_SI_INBUT0IDKNA1KNVVKNVPKNBKBUT0BKdirect activationstagingchange request