SAP MDG · REPLICATION OUTBOUND
How do I implement custom outbound payload enrichment in MDG BP bulk replication?
Use IF_MDG_SE_BP_BULK_REPLRQ_OUT as the outbound proxy BAdI and implement outbound payload enrichment: read the active BP data from the MDG model, map standard and custom fields into the proxy structure, apply country- or target-specific rules, then return the updated outbound message.
Use IF_MDG_SE_BP_BULK_REPLRQ_OUT as the outbound proxy BAdI and implement outbound payload enrichment: read the active BP data from the MDG model, map standard and custom fields into the proxy structure, apply country- or target-specific rules, then return the updated outbound message.
`IF_MDG_SE_BP_BULK_REPLRQ_OUT` is the outbound proxy BAdI for BP bulk replication request generation. The documented pattern for `ZCL_MDG_BP_BULKREQ_OUT` is to read the active BP entity data from the MDG model, map standard and custom fields into the proxy structure, and then apply special business rules such as country-specific handling or target-system-dependent adjustments before the message is sent.
Process flow
- 1. Implement the outbound BAdI `IF_MDG_SE_BP_BULK_REPLRQ_OUT` in your customer class.
- 2. In the outbound-processing method, read the outbound proxy structure passed by the framework.
- 3. Read the active BP entity data from the MDG model before mapping custom fields.
- 4. Map standard fields and custom append fields into the proxy output structure.
- 5. Read dependent data such as customer, vendor, sales-area, company-code, procurement, address, or extension tables if your payload requires them.
- 6. Append special extension rows into custom proxy tables where the interface expects them.
- 7. Apply special business rules such as country-specific or target-system-specific logic, keeping these checks isolated.
- 8. Return the updated proxy structure back to the framework so it can be sent to the target system.
General MDG BP outbound enhancement: implement `IF_MDG_SE_BP_BULK_REPLRQ_OUT` in the outbound proxy BAdI for Business Partner bulk replication request generation.
Use this enhancement to enrich the outbound payload before replication is sent.
Referenced tables
| Object | Purpose |
|---|---|
KNVV | Source of sales-area custom field mapping for customer replication. |
KNZA | Source of permit-payee customer data. |
KNVL | Source of customer license data. |
KNA1 | Source of Brazil-specific append fields for the outbound proxy extension table. |
LFZA | Source of permit-payee vendor data for supplier replication. |
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 enhance IF_MDG_SE_BP_BULK_REPLRQ_OUT for BP replication?
- How do I map custom BP fields in the outbound bulk replication request?
- How do I suppress or adjust outbound BP values before replication?
Possible questions
- What is the purpose of IF_MDG_SE_BP_BULK_REPLRQ_OUT?
- Which class pattern is used for BP outbound enrichment?
- How do I map customer-specific fields into the outbound proxy structure?
- How do I apply target-system rules in outbound BP replication?
- What SAP MDG objects are typically read before sending the BP message?