SAP MDG · COMMUNITY
How can I create and register a custom handler class in SAP MDG for MDG-BP, MDG-C, or MDG-S?
Create the custom class in SE24, inherit from the correct SAP handler superclass, redefine the required IF_MDG_BS_BP_ACCESS_HANDLER methods, activate it, and register it in SM30 view V_MDG_BS_BP_HDL for data model BP.
Create the custom class in SE24, inherit from the correct SAP handler superclass, redefine the required IF_MDG_BS_BP_ACCESS_HANDLER methods, activate it, and register it in SM30 view V_MDG_BS_BP_HDL for data model BP.
Create the handler in SE24 as a Z class, choose the correct superclass based on the layer, redefine only the required IF_MDG_BS_BP_ACCESS_HANDLER methods, then register the class for data model BP in SM30 view V_MDG_BS_BP_HDL. The guide’s example uses ZCL_CUSTOM_ECC_HANDLER with CL_MDG_BS_ECC_HANDLER for application-layer processing.
Process flow
- Identify a requirement not fulfilled by SAP-delivered handler classes.
- Determine whether the extension belongs to BP, Customer, or Supplier processing.
- Create the custom class in SE24 in the Z namespace.
- Use the example name ZCL_CUSTOM_ECC_HANDLER if applicable.
- Set the class type to Usual ABAP Class and decide whether it should be Final.
- Assign the superclass CL_MDG_BS_FND_HANDLER for MDG_FND logic or CL_MDG_BS_ECC_HANDLER for MDG_APPL logic.
- Redefine the required methods of IF_MDG_BS_BP_ACCESS_HANDLER.
- Save, check, and activate the class; add it to a Workbench transport if needed by the landscape.
SE24Class Builder
Create the custom handler class in the customer Z namespace and assign the SAP superclass.
Referenced tables
| Object | Purpose |
|---|---|
MDG_BS_BP_HNDLR | Handler registration table referenced by the guide for custom BP handler processing. |
GT_HANDLER_ACCESS | Debugger table in CL_MDG_BS_ECC_ACCESS used to confirm the handler is loaded. |
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?
- How do I create an MDG custom handler?
- Which transaction creates the handler class?
- How do I create ZCL_CUSTOM_ECC_HANDLER?
- Which superclass does the SAP example use?
- Why inherit from CL_MDG_BS_ECC_HANDLER?
- Which methods need to be redefined?