导语:在做计划订单转生产订单的时候,要求库存地点如果不存在,就根据增强并扩充,库存地点的扩充,可以通过MM02和MMSC扩充,也就是说MMSC的BAPI可以和物料主数据创建用同一个。
BAPI:BAPI_MATERIAL_SAVEDATA
"扩充库存地点
DATA headdata TYPE bapimathead.
DATA storagelocationdata TYPE bapi_mard.
DATA storagelocationdatax TYPE bapi_mardx.
DATA return TYPE bapiret2.
headdata-material = '000000000002000003'.
headdata-storage_view = 'X'.
storagelocationdata = VALUE #( plant = '1000' stge_loc = '1202' ).
storagelocationdatax = VALUE #( plant = '1000' stge_loc = '1202' ).
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = headdata
storagelocationdata = storagelocationdata
storagelocationdatax = storagelocationdatax
IMPORTING
return = return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .
作者:小飞猪猪猪猪猪猪猪–CSDN