SAP MDG · CONSOLIDATION

How do I add a custom Business Partner table to MDG consolidation and persist it during activation?

Create custom BP consolidation classes, configure process model 147 in MDCIMG, and redefine the model/data access methods to read staged data, map custom API extensions, and persist the active custom table. For activation-based CR integration, add the SE19 implementation for MDG_BS_CUST_SUPP_CR_SI and write the custom data through the governance API and update-task FM.

Create custom BP consolidation classes, configure process model 147 in MDCIMG, and redefine the model/data access methods to read staged data, map custom API extensions, and persist the active custom table. For activation-based CR integration, add the SE19 implementation for MDG_BS_CUST_SUPP_CR_SI and write the custom data through the governance API and update-task FM.

To add a custom Business Partner table to MDG consolidation, you typically create a custom data access class and model class, configure Process Model 147 in MDCIMG, and then implement the custom read, mapping, and save hooks. In the canonical BP example, the model class `ZCL_MDC_MODEL_BP` extends `CL_MDC_MODEL_BP` and handles custom partner numbering, extension mapping, and persistence for the custom table `ZLFA1_EXT`.

Process flow

  1. Create `ZCL_MDC_DATA_BP` inheriting from `CL_MDC_DATA_BP`.
  2. Redefine `TABLE_NAME_BY_TYPE` and `APPEND_ACTIVE_RECORDS`, and `IF_MDC_DATA~CONTAINS_LOB_DATA` if needed.
  3. Create `ZCL_MDC_MODEL_BP` inheriting from `CL_MDC_MODEL_BP`.
  4. Redefine `READ_ALL_DATA`, `MAP_EXTENSIONS_2API`, `SAVE_BUSINESS_PARTNER_ACTIVE`, and `MAP_BUSINESS_PARTNER_2API`.
  5. In `MDCIMG`, open process model `147` and add the custom table under Tables, mark it Process, save, and generate artifacts.
  6. If Change Request integration is required, start `SE19` and implement `MDG_BS_CUST_SUPP_CR_SI`.
  7. Use the governance API in the BAdI implementation to write/delete the MDG entity data.
  8. Persist active data with an update-task FM such as `Z_BP_ZLFA1_EXT_UPDATE` in the canonical BP example.

Referenced tables

ObjectPurpose
ZMDG_BP_MDC_MAPStores process-wise BP number mappings so reruns reuse the same generated number.
ZLFA1_EXTCustom BP extension table read from staging and updated during activation in the canonical example.
ZSUPPLIER_RATINGExample custom active table used in the broader guide for BP process model 147 customization.
ZSUPP_RACMDG custom entity used by the CR integration example.

ILLUSTRATIVE ABAP SAMPLE

Source ABAP example: ZCL_BI_CUST_CR_SI_ERP.clas.abap

Exact relevant implementation excerpt from the knowledge document set.

1class ZCL_BI_CUST_CR_SI_ERP definition 2 public 3 final 4 create public . 5 6public section. 7 8 interfaces IF_BADI_INTERFACE . 9 interfaces IF_MDG_BS_CUST_SUPP_CR_SI . 10 11 methods CONSTRUCTOR . 12protected section. 13 14 data MO_CUSTOMER type ref to CL_MDG_BS_CUST_CR_SI_ERP_IMPL . 15private section. 16ENDCLASS. 17 18 19 20CLASS ZCL_BI_CUST_CR_SI_ERP IMPLEMENTATION. 21 22 23 METHOD constructor. 24 CREATE OBJECT mo_customer. 25 ENDMETHOD. 26 27 28 method IF_MDG_BS_CUST_SUPP_CR_SI~MAP_BP_TO_STAGING_WO_CR. 29 mo_customer->if_mdg_bs_cust_supp_cr_si~map_bp_to_staging_wo_cr( 30 EXPORTING 31 is_bp_api = is_bp_api 32 iv_temp_sta_bp_id = iv_temp_sta_bp_id 33 CHANGING 34 ct_bp_staging = ct_bp_staging 35 ct_messages = ct_messages ). 36 endmethod. 37 38 39 METHOD if_mdg_bs_cust_supp_cr_si~set_supplier_data_2_sta. 40 41 mo_customer->if_mdg_bs_cust_supp_cr_si~set_supplier_data_2_sta( 42 EXPORTING 43 is_bp_api = is_bp_api 44 ir_cr_api = ir_cr_api 45 ir_gov_api = ir_gov_api 46 iv_crequest_id = iv_crequest_id 47 iv_temp_sta_bp_id = iv_temp_sta_bp_id 48 CHANGING 49 ct_return_messages = ct_return_messages ). 50 ENDMETHOD. 51ENDCLASS.

The remaining configuration, implementation details, and testing guidance continue from this answer more…

Related questions and keywords

Alternative questions

  • How do I extend MDG Business Partner consolidation with a custom table?
  • What is the end-to-end setup for a custom BP table in process model 147?
  • How do I implement custom read, mapping, and save logic for BP consolidation?

Possible questions

  • Give me the steps to add a custom BP table in MDCIMG.
  • What class should I create for custom BP consolidation logic?
  • Which methods must be redefined in CL_MDC_MODEL_BP?
  • How do I persist custom BP extension data during activation?
  • What tables and function modules are used for the custom BP mapping?
  • Show me an example ABAP implementation for MAP_BUSINESS_PARTNER_2API.
  • How do I implement READ_ALL_DATA for a custom BP table?
  • How do I implement SAVE_BUSINESS_PARTNER_ACTIVE?

Keywords

MDG Business PartnerMDCIMGVC_MDC_MODELCL_MDC_MODEL_BPZCL_MDC_MODEL_BPCL_MDC_DATA_BPZCL_MDC_DATA_BPMAP_BUSINESS_PARTNER_2APIMAP_EXTENSIONS_2APIREAD_ALL_DATASAVE_BUSINESS_PARTNER_ACTIVEZMDG_BP_MDC_MAPZLFA1_EXTZ_NEXT_NUM_ZTRAZ_BP_ZLFA1_EXT_UPDATEBUPA_NUMBERS_GETCONVERSION_EXIT_ALPHA_INPUTProcess Model 147