通过bapi更新发货数量

Update delivery quantity via bapi

在我的业务场景中,WMS 系统 post 交货的 GI 并将信息发送到 SAP。

你遇到过这种情况吗?

我通过调用 BAPI_OUTB_DELIVERY_CHANGE 解决了它 使用以下映射:

LS_HEADER_DATA-DELIV_NUMB = <FS_LIPS>-VBELN.
LS_HEADER_CONTROL-DELIV_NUMB = <FS_LIPS>-VBELN.
LV_DELIVERY = <FS_LIPS>-VBELN.
LS_ITEM_DATA-DELIV_NUMB = <FS_LIPS>-VBELN.
LS_ITEM_DATA-DELIV_ITEM = <FS_LIPS>-POSNR.
LS_ITEM_DATA-MATERIAL = <FS_LIPS>-MATNR.
LS_ITEM_DATA-BATCH = <FS_LIPS>-CHARG.
LS_ITEM_DATA-DLV_QTY = LS_VBPOK_TAB-PIKMG. ==> new quantity
LS_ITEM_DATA-DLV_QTY_IMUNIT = LS_VBPOK_TAB-PIKMG. ==> new quantity
LS_ITEM_DATA-FACT_UNIT_NOM = <FS_LIPS>-UMVKZ.
LS_ITEM_DATA-FACT_UNIT_DENOM = <FS_LIPS>-UMVKN.
LS_ITEM_DATA-CONV_FACT = <FS_LIPS>-UMREF.
LS_ITEM_DATA-GROSS_WT = <FS_LIPS>-BRGEW.
LS_ITEM_DATA-NET_WEIGHT = <FS_LIPS>-NTGEW.
LS_ITEM_DATA-UNIT_OF_WT = <FS_LIPS>-GEWEI.
LS_ITEM_DATA-VOLUMEUNIT = <FS_LIPS>-VOLEH.
LS_ITEM_DATA-SALES_UNIT = <FS_LIPS>-VRKME.
LS_ITEM_DATA-BASE_UOM = <FS_LIPS>-MEINS.
LS_ITEM_DATA-STOCK_TYPE = <FS_LIPS>-INSMK.
LS_ITEM_DATA-VAL_TYPE = <FS_LIPS>-BWTAR.
LS_ITEM_DATA-INSPLOT = <FS_LIPS>-QPLOS.
LS_ITEM_DATA-VOLUME = <FS_LIPS>-VOLUM.

APPEND LS_ITEM_DATA TO LT_ITEM_DATA.

LS_ITEM_CONTROL-DELIV_NUMB = <FS_LIPS>-VBELN.
LS_ITEM_CONTROL-DELIV_ITEM = <FS_LIPS>-POSNR.
LS_ITEM_CONTROL-CHG_DELQTY = 'X'.

APPEND LS_ITEM_CONTROL TO LT_ITEM_CONTROL.