SAP Retail article master data - Logical view updates distribution

Business Background

In the retail industry, the article master data can be copied by bulk distribution expanded logical view, there are differences in the data for each distribution center after the actual business, the cases to achieve changes to the profit center of the field different distribution centers

Realization of ideas

Use the original program BAPI_MATERIAL_MAINTAINDATA_RT modify marc-prctr, modify the requirements found in a test environment running very slow, does not meet the one million bulk commodities: SAP community after another query information, learn MATERIAL_UPDATE_LOGISTIC_DATA update can also be achieved MARC field, after the actual test speed increase the number of times to meet the optimization requirements

Specific steps

Part of the reference code is as follows

lt_upd_field_names-tabname = 'MARC'.
lt_upd_field_names-fieldname = 'PRCTR'."利润中心
append lt_upd_field_names.

lt_new_marc_data-matnr = <fs_marc>-matnr.
lt_new_marc_data-werks = <fs_marc>-werks.
lt_new_marc_data-prctr = wa_alv-prctr.
append lt_new_marc_data.

if lt_new_marc_data[] is not initial.
  call function 'MATERIAL_UPDATE_LOGISTIC_DATA'
    exporting
      iv_no_commit             = abap_false
    tables
      it_upd_field_names       = lt_upd_field_names
      it_new_marc_data         = lt_new_marc_data
      ot_messages              = lt_messages
    exceptions
      wrong_input_data         = 1
      wrong_reference_handling = 2
      lock_problems            = 3
      foreign_key_check_error  = 4
      special_check_error      = 5
      others                   = 6.

endif.

 

 

Guess you like

Origin blog.csdn.net/u012232542/article/details/93623137
Recommended