"扩充库存地点
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' .