SAP MDG · REPLICATION INBOUND

How does the inbound customer proxy method validate, update, and log records in SAP MDG?

The inbound customer proxy first removes empty and BPM technical records, then validates the remaining customer payload, updates ERP only for validated records, and writes an application log for discarded, successful, and failed items.

The inbound customer proxy first removes empty and BPM technical records, then validates the remaining customer payload, updates ERP only for validated records, and writes an application log for discarded, successful, and failed items.

The customer inbound proxy is intentionally thin: it cleans the inbound payload, validates the remaining records, pushes only validated entries into ERP update processing, and writes a log for discarded, successful, and failed records. This keeps the runtime sequence clear and separates validation, update, and logging into dedicated helper methods.

Process flow

  1. Copy the inbound payload from `input` to `ls_input`.
  2. Delete records where `partner_te_customer_acct_nbr` is initial or starts with `BPM*`.
  3. Move the remaining records to `lt_customer`.
  4. Call `MDG_VALIDATE_BPM_CUSTOMER` to split valid and discarded records.
  5. If valid records exist, call `UPDATE_ERP_CUSTOMER` to process ERP update.
  6. If discarded, success, or error records exist, call `MDG_WRITE_LOG`.
  7. Return control to the inbound proxy framework.

Referenced tables

ObjectPurpose
zmt_mdg_customerInbound customer message structure used for `ls_input`.
zdt_mdg_customer_record_tabInternal table type used to hold the filtered customer records.
zmdg_bpm_customer_record_tabInternal table type used for validated, discarded, successful, and error customer records.

ILLUSTRATIVE ABAP SAMPLE

Source ABAP example

Exact relevant implementation excerpt from the knowledge document.

1METHOD zii_si_mdg_customer_inbound~si_mdg_customer_inbound. 2 DATA: 3 ls_input TYPE zmt_mdg_customer, 4 lt_customer TYPE zdt_mdg_customer_record_tab, 5 lt_discard_customer TYPE zmdg_bpm_customer_record_tab, 6 lt_error_customer TYPE zmdg_bpm_customer_record_tab, 7 lt_invalid_customer TYPE zmdg_bpm_customer_record_tab, 8 lt_success_customer TYPE zmdg_bpm_customer_record_tab, 9 lt_valid_customer TYPE zmdg_bpm_customer_record_tab. 10 11 ls_input = input. 12 13 DELETE ls_input-mt_mdg_customer-record WHERE partner_te_customer_acct_nbr IS INITIAL 14 OR partner_te_customer_acct_nbr CP 'BPM*'. 15 16 IF ls_input IS NOT INITIAL. 17 18 lt_customer = ls_input-mt_mdg_customer-record. 19 20 IF lt_customer[] IS NOT INITIAL. 21 22 IF lt_customer[] IS NOT INITIAL. 23 me->mdg_validate_bpm_customer( 24 EXPORTING 25 it_current_customer = lt_customer 26 IMPORTING 27 et_validated_customer = lt_valid_customer 28 et_discarded_customer = lt_discard_customer 29 ). 30 31 IF lt_valid_customer IS NOT INITIAL. 32 me->update_erp_customer( 33 EXPORTING 34 it_current_customer = lt_valid_customer 35 IMPORTING 36 et_success_customer = lt_success_customer 37 et_error_customer = lt_error_customer ). 38 ENDIF. 39 40 41 IF lt_discard_customer IS NOT INITIAL OR 42 lt_success_customer IS NOT INITIAL OR 43 lt_error_customer IS NOT INITIAL. 44 45 me->mdg_write_log( 46 it_discarded_customer = lt_discard_customer 47 it_error_customer = lt_error_customer 48 it_success_customer = lt_success_customer 49 ). 50 ENDIF. 51 52 ENDIF. 53 ENDIF. 54 ENDIF. 55 ENDMETHOD.

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

Related questions and keywords

Alternative questions

  • What is the processing flow of ZCL_SI_MDG_CUSTOMER_INBOUND~SI_MDG_CUSTOMER_INBOUND?
  • How do I implement customer inbound validation and ERP update in the MDG proxy?
  • What does the customer inbound proxy do before updating ERP?

Possible questions

  • Can you show the ABAP flow for the customer inbound proxy?
  • Which helper methods are called by the customer inbound method?
  • How are invalid or discarded customer records handled?
  • How do I filter BPM technical records before processing?
  • What should be logged after inbound customer processing?

Keywords

ZCL_SI_MDG_CUSTOMER_INBOUNDZII_SI_MDG_CUSTOMER_INBOUND~SI_MDG_CUSTOMER_INBOUNDMDG_VALIDATE_BPM_CUSTOMERUPDATE_ERP_CUSTOMERMDG_WRITE_LOGzmt_mdg_customerzdt_mdg_customer_record_tabzmdg_bpm_customer_record_tabpartner_te_customer_acct_nbrBPM*