SAP MDG · REPLICATION OUTBOUND

How do I implement custom MDG BP bulk outbound field mapping and business rules in `IF_MDG_SE_BP_BULK_REPLRQ_OUT`?

Implement the outbound BAdI as a payload-enrichment step: read the active MDG BP data, map standard and custom fields into the proxy structure, then apply target-system or country-specific checks before returning the message.

Implement the outbound BAdI as a payload-enrichment step: read the active MDG BP data, map standard and custom fields into the proxy structure, then apply target-system or country-specific checks before returning the message.

`IF_MDG_SE_BP_BULK_REPLRQ_OUT` is used as an outbound proxy enrichment step for Business Partner bulk replication. The documented pattern is to read the outbound request structure, fetch the active BP data from the MDG model, map standard and custom fields, then apply special rules before the message is sent.

Process flow

  1. Identify the BP entity types and outbound proxy structure used by the replication scenario.
  2. Read the active BP data from the MDG model before any custom mapping.
  3. Map standard fields into the outbound proxy structure first.
  4. Map customer-specific or supplier-specific append fields in a dedicated helper block.
  5. Copy special substructures such as permit-payee, Thailand branch, Brazil append, or procurement-related data as needed.
  6. Apply target-system-dependent and country-specific rules after the base mapping.
  7. Return the enriched proxy payload to the framework and document source-to-target field mapping clearly.

The retrieved knowledge does not provide a specific SPRO path or transaction code for this outbound BAdI pattern; implementation is focused on the outbound class and proxy mapping logic.

Referenced tables

ObjectPurpose
KNVVCustomer sales-area custom fields can be mapped into the outbound proxy sales arrangements.
KNZACustomer permit-payee data can be copied into the outbound payload.
KNVLCustomer license data can be copied into the outbound payload.
KNA1Brazil-specific append fields can be transferred to the outbound proxy extension table.
LFZASupplier permit-payee vendor data can be copied into the outbound payload.
LFA1Supplier custom fields can be mapped from supplier master data into the outbound proxy.
LFM1/LFB1Supplier account and procurement custom values can be copied into the outbound proxy structures.

ILLUSTRATIVE ABAP SAMPLE

Source ABAP example: MAP_CUSTOMER_CUSTOM_FIELDS.abap

Exact relevant implementation excerpt from the knowledge document set.

1"Generic skill: map customer extension fields into the outbound BP bulk proxy. 2"Use this pattern when copying central customer data, sales-area data, and customer append structures. 3 4out-business_partner-customer-zzmdgproxy_apprlevel = in-customer-central_data-central-data-zzapprlevel. 5out-business_partner-customer-zzmdgproxy_bpmappstat = in-customer-central_data-central-data-zzbpmappstat. 6out-business_partner-customer-zzmdgproxy_ind_bus_code = in-customer-central_data-central-data-zzwwibc. 7 8IF in-customer-header-object_instance-kunnr IS NOT INITIAL. 9 SELECT * 10 INTO TABLE @DATA(lt_knvv) 11 FROM knvv 12 FOR ALL ENTRIES IN @out-business_partner-customer-sales_arrangement 13 WHERE kunnr EQ @in-customer-header-object_instance-kunnr. 14ENDIF.

The remaining configuration, implementation details, and testing guidance continue from this answer more…

Related questions and keywords

Alternative questions

  • How do I enrich the Business Partner bulk replication payload in MDG?
  • How do I map custom customer or supplier fields in BP outbound replication?
  • How do I add target-system or country-specific rules to MDG BP bulk outbound?

Possible questions

  • Which fields from `KNVV`, `KNZA`, `KNVL`, `KNA1`, `LFZA`, `LFA1`, or `LFM1/LFB1` can be copied into the outbound payload?
  • How do I separate standard mapping from customer-specific mapping in an MDG outbound BAdI?
  • How do I apply SNP wave checks or bank external ID rewriting in outbound replication?
  • What is the pattern for reading active MDG model data before outbound mapping?
  • What helper methods should I use for customer and supplier bulk replication mapping?

Keywords

MDGBusiness Partnerbulk replicationoutbound`IF_MDG_SE_BP_BULK_REPLRQ_OUT`customer replicationsupplier replicationcustom fieldstarget-system rulescountry-specific logic`KNVV``KNZA``KNVL``KNA1``LFZA``LFA1``LFM1``LFB1`Thailand branchBrazil appendSNP wave check