MSSC 扩充物料库存地点


一、MSSC

输入库存地点,点击保存

 

 二、调用BAPI:BAPI_MATERIAL_SAVEREPLICA

"-----------------------------------------@斌将军--------------------------------------------
DATA
:ls_return TYPE bapiret2, lt_head TYPE TABLE OF bapie1matheader WITH HEADER LINE, lt_mard TYPE TABLE OF bapie1mard WITH HEADER LINE, lt_mardx TYPE TABLE OF bapie1mardx WITH HEADER LINE. lt_head-function = '009'. lt_head-material = 'HYM01'. lt_head-storage_view = 'X'. APPEND lt_head. CLEAR lt_head. lt_mard-function = '009'. lt_mard-material = 'HYM01'. lt_mard-plant = '1000'. lt_mard-stge_loc = '1002'. APPEND lt_mard. CLEAR lt_mard. lt_mardx-function = '009'. lt_mardx-material = 'HYM01'. lt_mardx-plant = '1000'. lt_mardx-stge_loc = '1002'. APPEND lt_mardx. CLEAR lt_mardx. CALL FUNCTION 'BAPI_MATERIAL_SAVEREPLICA' EXPORTING noappllog = 'X' nochangedoc = '' testrun = '' inpfldcheck = '' IMPORTING return = ls_return TABLES headdata = lt_head storagelocationdata = lt_mard storagelocationdatax = lt_mardx. IF ls_return-type <> 'E'. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' EXPORTING wait = 'X'. ELSE. CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'. ENDIF.
"-----------------------------------------@斌将军--------------------------------------------