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

  1. Identify the requirement not covered by SAP-delivered handlers.
  2. Choose the correct layer: MDG_FND or MDG_APPL.
  3. Create a Z class in SE24.
  4. Assign `CL_MDG_BS_FND_HANDLER` or `CL_MDG_BS_ECC_HANDLER` as superclass.
  5. Redefine the required methods of `IF_MDG_BS_BP_ACCESS_HANDLER`.
  6. Activate the class.
  7. Register the class in SM30 using `V_MDG_BS_BP_HDL` for data model `BP`.
  8. Set a breakpoint in `CL_MDG_BS_ECC_ACCESS->PROVIDE_HANDLER` and verify `GT_HANDLER_ACCESS`.
SE24

Class Builder > Properties

Create the custom handler class and assign the superclass.

SM30

View maintenance for `V_MDG_BS_BP_HDL`

Register the custom handler class for data model `BP`.

Referenced tables

ObjectPurpose
MDG_BS_BP_HNDLRHandler 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?

Keywords

SAP MDGMDG-BPMDG-CMDG-Scustom handlerIF_MDG_BS_BP_ACCESS_HANDLERCL_MDG_BS_FND_HANDLERCL_MDG_BS_ECC_HANDLERSE24SM30V_MDG_BS_BP_HDLMDG_BS_BP_HNDLRCL_MDG_BS_ECC_ACCESSPROVIDE_HANDLERGT_HANDLER_ACCESS