SAP MDG · VALIDATION DERIVATION
How do I implement SAP MDG Business Partner derivation defaults using ZCL_MDGBP_BP_DEFAULTS patterns?
Implement derivation as deterministic defaulting: read changed data from the delta buffer, inspect current BP state with the model API, populate only initial target fields, and write back through the delta-buffer write or governance conversion API. Use account group, BP kind, and CR type as control inputs, and keep BP/address/company/purchasing-org logic split into small entity-specific hooks.
Implement derivation as deterministic defaulting: read changed data from the delta buffer, inspect current BP state with the model API, populate only initial target fields, and write back through the delta-buffer write or governance conversion API. Use account group, BP kind, and CR type as control inputs, and keep BP/address/company/purchasing-org logic split into small entity-specific hooks.
`ZCL_MDGBP_BP_DEFAULTS` is a good template for MDG BP derivation: read delta-buffer data first, inspect the current BP state with the model API, derive only missing values, and keep account group/BP kind/CR type as the controlling inputs. The class is intended for vendor and company-code defaults plus BP/address/company/purchasing-org interface hooks, so the safest implementation is to separate each entity into its own small derivation method and write back only through the buffer or governance conversion layer.
Process flow
- Open the derivation method or the BP defaults class that implements the MDG derivation hook.
- Read changed data from `IF_USMD_DELTA_BUFFER_READ`.
- Inspect current BP state with `IF_USMD_MODEL_EXT` or the governance conversion API.
- Derive values only if the target field is initial.
- Use account group, BP kind, and CR type as the main control inputs.
- Write the result back through `IF_USMD_DELTA_BUFFER_WRITE` or the governance write API.
- Keep BP/address/company/purchasing-org derivations in separate focused methods.
- Debug with breakpoints on method entry and verify context, field names, and fallback paths.
Referenced tables
| Object | Purpose |
|---|---|
IF_USMD_DELTA_BUFFER_READ | Reads changed data from the MDG delta buffer for derivation input. |
IF_USMD_MODEL_EXT | Inspects the current BP state and related context before deriving defaults. |
IF_USMD_DELTA_BUFFER_WRITE | Writes derived values back to the MDG change buffer. |
The remaining configuration, implementation details, and testing guidance continue from this answer more…
Related questions and keywords
Alternative questions
- How do I derive BP, vendor, company-code, and purchasing-org defaults in SAP MDG?
- What is the standard pattern for MDG BP default derivation in a custom class?
- How do I fill missing BP default fields only when they are initial in MDG?
Possible questions
- How do I implement SAP MDG BP derivation defaults using ZCL_MDGBP_BP_DEFAULTS patterns?
- Which sources and rules should I use for BP default derivation in MDG?
- How do I keep derivation deterministic and initial-field-only in SAP MDG?
- How do I connect BP defaults with account group and BP kind logic?
- Which interface hook should handle BP/address/company/purchasing-org defaults?