SAP MDG · VALIDATION DERIVATION
How do I implement SAP MDG validation or derivation in the BAdI USMD_RULE_SERVICE from SE18 and SE19?
Implement the BAdI in SE18/SE19 by identifying the interface and filter settings first, then create the implementation, assign an ABAP class, and code CHECK_ENTITY for validation messages and DERIVE_ENTITY for safe defaulting. Keep messages in ET_MESSAGE with MSGID, MSGNO, MSGTY, and FIELDNAME, and derive only initial fields in CT_DATA.
Implement the BAdI in SE18/SE19 by identifying the interface and filter settings first, then create the implementation, assign an ABAP class, and code CHECK_ENTITY for validation messages and DERIVE_ENTITY for safe defaulting. Keep messages in ET_MESSAGE with MSGID, MSGNO, MSGTY, and FIELDNAME, and derive only initial fields in CT_DATA.
Use SE18 first to confirm the interface, filter dependency, and method intent for USMD_RULE_SERVICE, then create the implementation in SE19 and assign a Z* class. In CHECK_ENTITY, return business errors or warnings in ET_MESSAGE with proper message fields; in DERIVE_ENTITY, only fill empty target fields and keep the logic deterministic.
Process flow
- Open SE18 and inspect the BAdI definition `
USMD_RULE_SERVICE`. - Confirm the interface name `IF_EX_USMD_RULE_SERVICE`, filter dependency, and use type.
- Open SE19 and create the BAdI implementation in Z* namespace.
- Maintain filter values if the BAdI is filter-dependent.
- Assign or create the implementing class and implement `IF_EX_USMD_RULE_SERVICE`.
- Code `CHECK_ENTITY` for validations and `DERIVE_ENTITY` for defaulting.
- Activate the class, then the BAdI implementation, then dependent objects.
- Test by triggering the business scenario and debugging the interface methods.
SE18BAdI definition display
Check the interface name, multiple-use/single-use setting, filter dependency, and method intent before implementation.
SE19BAdI implementation creation
Create the implementation, assign package and transport, and maintain filter values if the BAdI is filter-dependent.
Referenced tables
| Object | Purpose |
|---|---|
usmd_s_message | Message structure used to return validation messages from CHECK_ENTITY. |
The remaining configuration, implementation details, and testing guidance continue from this answer more…
Related questions and keywords
Alternative questions
- How do I create a
USMD_RULE_SERVICEBAdI implementation? - How do I write CHECK_ENTITY and DERIVE_ENTITY in SAP MDG?
- What is the step-by-step process to implement an MDG rule-service BAdI?
Possible questions
- How do I create a
USMD_RULE_SERVICEBAdI implementation? - How do I write CHECK_ENTITY and DERIVE_ENTITY in SAP MDG?
- What is the step-by-step process to implement an MDG rule-service BAdI?
- What is the correct way to populate ET_MESSAGE in CHECK_ENTITY?
- How do I default fields safely in DERIVE_ENTITY?