SAP MDG · DATA MODEL UI
How do I create and use a custom MDG BP access handler class in SAP MDG?
Create a custom BP access handler by inheriting from CL_MDG_BS_ECC_HANDLER, implementing IF_MDG_BS_BP_ACCESS_HANDLER, and registering the class in the MDG BP handler customizing so MDG can call it during read, map, and save processing.
Create a custom BP access handler by inheriting from CL_MDG_BS_ECC_HANDLER, implementing IF_MDG_BS_BP_ACCESS_HANDLER, and registering the class in the MDG BP handler customizing so MDG can call it during read, map, and save processing.
In SAP MDG BP processing, a custom access handler is the bridge between the staging area and the active ECC/CVI payload. The handler implements IF_MDG_BS_BP_ACCESS_HANDLER, inherits from CL_MDG_BS_ECC_HANDLER, and is registered so the standard MDG BP flow can call it for your custom entities and tables.
Process flow
- Identify the custom BP requirement.
- Choose the BP/application layer and use CL_MDG_BS_ECC_HANDLER.
- Create the Z class in SE24.
- Implement IF_MDG_BS_BP_ACCESS_HANDLER.
- Redefine the needed handler methods.
- Gate logic by iv_entity.
- Read DB state into gt_ecc_extern_db.
- Map data to staging structures and ECC extern structures with the standard API objects and task constants from the base class.
Referenced tables
| Object | Purpose |
|---|---|
gt_ecc_extern_db | Protected in-memory buffer holding ECC-extern BP data and custom entity state during handler processing. |
ZMDG_BP_ZNPSCDUP | Custom table for the NPS duplicate-flag example. |
ZMDG_T_IDPLBPTAX | Custom table for the VAT/payment-type example. |
IDPL_BP_TAX | Standard/custom tax-related persistence object used in the VAT/payment-type example. |
The remaining configuration, implementation details, and testing guidance continue from this answer more…
Related questions and keywords
Alternative questions
- What is an MDG BP access handler?
- Which interface must an MDG BP handler implement?
- Which superclass should I use for an MDG BP access handler?
Possible questions
- How do I build a custom BP access handler for custom entities?
- How does ZCL_MDG_BS_ECC_HANDLER fit into the MDG BP save flow?
- How are staging data and ECC extern data mapped in an MDG BP handler?
- Which methods are called in IF_MDG_BS_BP_ACCESS_HANDLER?
- How do I persist custom BP tables from an access handler?