SAP MDG · REPLICATION OUTBOUND

How do I implement and troubleshoot custom MDG vendor outbound replication in DRF/ALE?

Custom MDG vendor outbound replication in DRF/ALE is handled by `ZCL_MDG_BS_VEND_ALE_DRF`, which captures the hub system in the constructor, applies DRF filters for company code and purchasing org, resolves hub/client identifiers through MDG matching and CVI, handles contact-person key mapping, and dispatches vendor/classification IDocs through dedicated send helpers.

Custom MDG vendor outbound replication in DRF/ALE is handled by `ZCL_MDG_BS_VEND_ALE_DRF`, which captures the hub system in the constructor, applies DRF filters for company code and purchasing org, resolves hub/client identifiers through MDG matching and CVI, handles contact-person key mapping, and dispatches vendor/classification IDocs through dedicated send helpers.

`ZCL_MDG_BS_VEND_ALE_DRF` is the custom outbound class for MDG vendor replication in the DRF/ALE stack. It stores the local business system in the constructor, prepares runtime data in `IF_DRF_OUTBOUND~INITIALIZE`, reduces the outbound scope in `IF_DRF_OUTBOUND~READ_COMPLETE_DATA`, and sends vendor-related IDocs through specialized helper methods. It also manages hub/client ID translation, contact-person mapping, and organizational filtering.

Process flow

  1. Verify the outbound scenario and target objects.
  2. Capture the hub business system in the constructor using `CL_MDG_CA_GET_OWN_BUS_SYS=>GET_LOCAL_BUSINESS_SYSTEM( )`.
  3. Implement the DRF lifecycle methods `IF_DRF_OUTBOUND~INITIALIZE`, `IF_DRF_OUTBOUND~READ_COMPLETE_DATA`, and `IF_DRF_OUTBOUND~SEND_MESSAGE`.
  4. Use `GET_BURKS_FILTER` and `GET_EKORG_FILTER` to build DRF filters from runtime parameters and external criteria.
  5. Resolve vendor and BP identifiers with CVI and MDG matching APIs.
  6. Handle contact-person numbering with `READ_KEY_MAPPING_4PARNR`, `GET_CLNT_PARNR_FROM_NUMBRANGE`, and `WRITE_KEY_MAPPING_4PARNR`.
  7. Send outbound payloads through the dedicated `SEND_*_IDOC` helper methods.
  8. Update DRF replication status and check message handling after each send path.

Referenced tables

ObjectPurpose
MDG_BS_ECC_CUSCPStores target-system-specific number range and object settings used when generating client contact person numbers in `GET_CLNT_PARNR_FROM_NUMBRANGE`.

ILLUSTRATIVE ABAP SAMPLE

Source ABAP example

Exact relevant implementation excerpt from the knowledge document.

1class ZCL_MDG_BS_VEND_ALE_DRF definition 2 public 3 inheriting from CL_MDG_BS_BP_SUPER_DRF 4 final 5 create public . 6 7public section. 8 9 interfaces IF_DRF_OUTBOUND . 10 11 constants SC_MSGID type SYMSGID value 'MDG_BS_ECC_SUPPLIER' ##NO_TEXT. 12 13 methods CONSTRUCTOR . 14 methods GET_VEND_ID_AND_KTOKK_OF_CLNT 15 importing 16 !IV_CLIENT_SYSTEM type MDG_BUSINESS_SYSTEM 17 !IV_HUB_KTOKK type KTOKK 18 exporting 19 !EV_VENDOR_ID type MDG_OBJECT_ID_BS 20 !EV_CLIENT_KTOKK type KTOKK . 21protected section. 22 23 types: 24 begin of ty_parnr_hc, 25 parnr_hub type parnr, 26 parnr_clnt type parnr, 27 end of ty_parnr_hc . 28 types: 29 TT_KNVKADR TYPE STANDARD TABLE OF knvkadrfeld . 30 types: 31 TT_PARNR_HC TYPE STANDARD TABLE OF ty_parnr_hc . 32 types: 33 TT_MDG_BS_ECC_VENNR type table of MDG_BS_ECC_venNR . 34 35 constants SC_S_DRF_VEND type STRING value 'MDG_BS_BP_S_SUPPLIER_OTC' ##NO_TEXT. 36 constants SC_TT_DRF_VEND type DRF_REL_OBJECT_TYPE value 'MDG_BS_BP_TT_SUPPLIER' ##NO_TEXT. 37 class-data GT_ECC_CLIENT_VEND type TT_MDG_BS_ECC_VENNR . 38 class-data GS_ECC_CLIENT_VEND type MDG_BS_ECC_VENNR . 39 data MV_HUB_BUS_SYSTEM type SLD_BSKEY . 40private section. 41 42 types: 43 tt_obj_id TYPE TABLE OF mdg_bp_object_id . 44 types: 45 tt_mdg_bs_bp_lfb1 TYPE SORTED TABLE OF mdg_bs_bp_s_lfb1 WITH UNIQUE KEY bukrs . 46 types: 47 tt_mdg_bs_bp_lfm1 TYPE SORTED TABLE OF mdg_bs_bp_s_lfm1 WITH UNIQUE KEY ekorg . 48 49 data MT_VENDOR_SEND_DATA type BDILFA1KEY . 50 constants GC_ASSIGN_CAT type MDG_BP_ASSIGNMENT_CAT value 'SUPPL' ##NO_TEXT. 51 class-data GS_ECC_CLIENT_CUSP type MDG_BS_ECC_CUSCP . 52 constants: 53 begin of gc_msg_type, 54 clfmas type TBDME-MESTYP value 'CLFMAS' ##NO_TEXT, 55 cremas type TBDME-MESTYP value 'ZCREMAS' ##NO_TEXT, 56 end of gc_msg_type . 57 58 methods SEND_CLFMAS_IDOC 59 importing 60 !IS_BUS_SYS_TECH type MDG_S_BUS_SYS_TECH 61 !IS_VENDOR_SEND_DATA type BDILFA1KEY 62 changing 63 !CV_APPEND_REP_ENTRY type ABAP_BOOL 64 !CT_OBJ_REP_STA type DRF_T_OBJ_REP_STA_FULL . 65 methods GET_ASSIGN_FROM_BP_ID 66 importing 67 !IV_HUB_BP_ID type MDG_OBJECT_ID_BS 68 exporting 69 !ET_OBJ_IDENT type TT_OBJ_ID 70 changing 71 !CT_RETURN type BAPIRET2_T . 72 methods GET_BP_ID_FROM_VEND_ID 73 importing 74 !IV_LIFNR type LIFNR 75 exporting 76 !EV_PARTNER type BU_PARTNER . 77 methods GET_BURKS_FILTER 78 importing 79 !IS_RUNTIME_PARAM type DRF_S_RUNTIME_PARAMETER_EXT 80 exporting 81 !ET_FILTERED_LFB1 type TT_MDG_BS_BP_LFB1 . 82 methods GET_CLNT_ID_FROM_VEND_ID 83 importing 84 !IV_HUB_VEND_ID type MDG_OBJECT_ID_BS 85 !IV_HUB_SYSTEM type MDG_BUSINESS_SYSTEM 86 !IV_CLNT_SYSTEM type MDG_BUSINESS_SYSTEM 87 exporting 88 !EV_CLNT_VEND_ID type MDG_OBJECT_ID_BS 89 !ET_CLNT_VEND_IDENT type MDG_T_IDENTIFIER_DATA_BS . 90 methods GET_CLNT_PARNR 91 importing 92 !IV_CLNT_BUS_SYSTEM type MDG_BUSINESS_SYSTEM 93 !IV_HUB_PARNR type PARNR 94 exporting 95 !EV_CLNT_PARNR type PARNR . 96 methods GET_CLNT_PARNR_FROM_NUMBRANGE 97 importing 98 !IV_CLNT_BUS_SYSTEM type MDG_BUSINESS_SYSTEM 99 exporting 100 !EV_CLNT_PARNR type PARNR . 101 methods GET_EKORG_FILTER 102 importing 103 !IS_RUNTIME_PARAM type DRF_S_RUNTIME_PARAMETER_EXT 104 exporting 105 !ET_FILTERED_LFM1 type TT_MDG_BS_BP_LFM1 . 106 methods GET_IDENT_FROM_BP_ID 107 importing 108 !IV_HUB_BP_ID type MDG_OBJECT_ID_BS 109 !IV_HUB_SYSTEM type MDG_BUSINESS_SYSTEM 110 !IV_CLNT_SYSTEM type MDG_BUSINESS_SYSTEM 111 exporting 112 !ET_CLNT_VEND_IDENT type MDG_T_IDENTIFIER_DATA_BS . 113 methods GET_LIFNR_RECEIVER_IDS 114 importing 115 !IV_LIFNR type LIFNR 116 exporting 117 !ET_FOREIGN_OBJECTS type MDG_T_MATCHING_OBJ_DATA_BS . 118 methods GET_VEND_CONTACT_PERSONS 119 importing 120 !IV_LIFNR_HUB type LIFNR

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

Related questions and keywords

Alternative questions

  • How does ZCL_MDG_BS_VEND_ALE_DRF resolve vendor IDs and send outbound IDocs?
  • Which DRF methods and helper methods are used for custom vendor replication in MDG?
  • How are key mapping, contact persons, and organizational filters handled in MDG vendor outbound processing?

Possible questions

  • How does the class determine the outbound vendor ID?
  • Which helper builds the IDoc payload for a specific object type?
  • Which methods depend on DRF filter objects or MDG matching services?
  • Where is key mapping read or written?
  • Which outbound methods are relevant for vendor master replication?

Keywords

MDGDRFALEvendor replicationkey mappingIDocCLFMASCREMAScompany code filterpurchasing org filtercontact personBAdIABAP