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

  1. Create or confirm BAdI implementation `ZBADI_BP_INTERFACE_SERVICE` for `IF_MDG_SE_BP_BULK_REPLRQ_IN` in SE19.
  2. Confirm the exact interface signature in SE24 for `IF_MDG_SE_BP_BULK_REPLRQ_IN~INBOUND_PROCESSING` and `OUTBOUND_PROCESSING`.
  3. Read `in-message_header-sender_business_system_id` and normalize it with `to_upper( )`.
  4. Determine the scenario/system type using configuration such as `ZMDG_D_UTIL_SYST` and related `ZMDG_*` tables.
  5. Resolve the BP number through `CL_MDG_ID_MATCHING_API_BS` by key mapping.
  6. Decide whether the message is create or change and determine the CR type.
  7. Read active-area data such as `BUT0ID`, `KNVP`, `KNVV`, `KNBK`, `BUT0BK`, `KNA1`, `BUT000`, `LFB1`, and `LFM1` as needed.
  8. 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
SE19

Enhancement implementation for `IF_MDG_SE_BP_BULK_REPLRQ_IN`

Register and activate the BAdI implementation `ZBADI_BP_INTERFACE_SERVICE`.

SE24

Class/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

ObjectPurpose
ZMDG_D_UTIL_SYSTScenario/system mapping used to determine the inbound processing branch.
ZMDG_C_UTILITYConfig-driven utility behavior referenced by the inbound service.
ZMDG_C_EKP_USAGEConfig-driven behavior referenced by the inbound service.
ZMDG_C_BP_S_DERConfig-driven behavior referenced by the inbound service.
mdg_user_proxy_settingControls persistence routing via `PROXY_PERSISTANCE` and optional `CHANGE_REQUEST_TYPE`.
CL_MDG_ID_MATCHING_API_BSKey mapping API that resolves source ID and business system to BP number.
BUT0IDActive-area BP identification data read during enrichment.
KNVPActive-area customer partner function data read during enrichment.
KNVVActive-area customer sales data read during enrichment.
KNBKActive-area customer bank data read during enrichment.
BUT0BKActive-area BP bank data read during enrichment.
KNA1Active-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?

Keywords

SAP MDGBusiness PartnerBP inbound serviceBAdIIF_MDG_SE_BP_BULK_REPLRQ_ININBOUND_PROCESSINGkey mappingdirect activationstagingchange requestCL_MDG_ID_MATCHING_API_BSmdg_user_proxy_settingCL_MDG_BP_BUPA_SI_IN