SAP MDG · DATA MODEL UI
How do I create and register a custom handler class in SAP MDG?
Create the Z class in SE24, inherit from the correct SAP handler superclass, redefine the required IF_MDG_BS_BP_ACCESS_HANDLER methods, and register the class in SM30 view V_MDG_BS_BP_HDL for data model BP.
Create the Z class in SE24, inherit from the correct SAP handler superclass, redefine the required IF_MDG_BS_BP_ACCESS_HANDLER methods, and register the class in SM30 view V_MDG_BS_BP_HDL for data model BP.
Create the custom handler in `SE24`, assign the correct SAP superclass, redefine the required `IF_MDG_BS_BP_ACCESS_HANDLER` methods, activate the class, and register it in `SM30` using `V_MDG_BS_BP_HDL` for data model `BP`. Then verify that MDG loads it in `CL_MDG_BS_ECC_ACCESS->PROVIDE_HANDLER`.
Process flow
- Identify the requirement not covered by SAP-delivered handlers.
- Choose the correct layer: MDG_FND or MDG_APPL.
- Create a Z class in SE24.
- Assign `CL_MDG_BS_FND_HANDLER` or `CL_MDG_BS_ECC_HANDLER` as superclass.
- Redefine the required methods of `IF_MDG_BS_BP_ACCESS_HANDLER`.
- Activate the class.
- Register the class in SM30 using `V_MDG_BS_BP_HDL` for data model `BP`.
- Set a breakpoint in `CL_MDG_BS_ECC_ACCESS->PROVIDE_HANDLER` and verify `GT_HANDLER_ACCESS`.
SE24Class Builder > Properties
Create the custom handler class and assign the superclass.
SM30View maintenance for `V_MDG_BS_BP_HDL`
Register the custom handler class for data model `BP`.
Referenced tables
| Object | Purpose |
|---|---|
MDG_BS_BP_HNDLR | Handler registration table used by MDG BP access processing. |
The remaining configuration, implementation details, and testing guidance continue from this answer more…
Related questions and keywords
Alternative questions
- Why create a custom handler in SAP MDG?
- When should I extend MDG-C or MDG-S with a handler?
- What if SAP-delivered handlers do not meet my requirement?
Possible questions
- Which interface must an MDG handler implement?
- Which superclass should I use for MDG_FND?
- Which superclass should I use for MDG_APPL?
- Which transaction creates the handler class?
- How do I register a custom MDG handler?
- How do I verify the handler is loaded?