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

  1. Identify a requirement not fulfilled by SAP-delivered handler classes.
  2. Determine whether the extension belongs to BP, Customer, or Supplier processing.
  3. Create the custom class in SE24 in the Z namespace.
  4. Use the example name ZCL_CUSTOM_ECC_HANDLER if applicable.
  5. Set the class type to Usual ABAP Class and decide whether it should be Final.
  6. Assign the superclass CL_MDG_BS_FND_HANDLER for MDG_FND logic or CL_MDG_BS_ECC_HANDLER for MDG_APPL logic.
  7. Redefine the required methods of IF_MDG_BS_BP_ACCESS_HANDLER.
  8. Save, check, and activate the class; add it to a Workbench transport if needed by the landscape.
SE24

Class Builder

Create the custom handler class in the customer Z namespace and assign the SAP superclass.

Referenced tables

ObjectPurpose
MDG_BS_BP_HNDLRHandler registration table referenced by the guide for custom BP handler processing.
GT_HANDLER_ACCESSDebugger 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?

Keywords

SAP MDGMDG-BPMDG-CMDG-Scustom handlerextensionBusiness PartnerCustomerSupplierSE24SM30IF_MDG_BS_BP_ACCESS_HANDLERCL_MDG_BS_FND_HANDLERCL_MDG_BS_ECC_HANDLERV_MDG_BS_BP_HDLCL_MDG_BS_ECC_ACCESSPROVIDE_HANDLERGT_HANDLER_ACCESS