ABAP outbound deletion

https://answers.sap.com/questions/4074302/bapioutbdeliverychange-delete-delivery-line-item.html

IF delivery_item IS NOT INITIAL. "Delete particular Delivery item
SELECT SINGLE vbeln posnr charg matnr lfimg umvkz umvkn
INTO wa_lips
FROM lips
WHERE vbeln = delivery AND posnr = delivery_item.
item_data-deliv_numb = wa_lips-vbeln.
item_data-deliv_item = wa_lips-posnr.
item_data-material = wa_lips-matnr.
item_data-dlv_qty = wa_lips-lfimg.
item_data-dlv_qty_imunit = wa_lips-lfimg.
item_data-fact_unit_nom = wa_lips-umvkz.
item_data-fact_unit_denom = wa_lips-umvkn.
item_data-batch = wa_lips-charg.
APPEND item_data.
item_control-deliv_numb = wa_lips-vbeln.
item_control-deliv_item = wa_lips-posnr.
item_control-del_item = ‘X’.
APPEND item_control.
ELSE. "Delete whole Delivery
header_ctrl-dlv_del = ‘X’.
ENDIF.
ELSE.
header_ctrl-dlv_del = ‘X’.
ENDIF.

header_data-deliv_numb = delivery.
header_ctrl-deliv_numb = delivery.

CALL FUNCTION ‘BAPI_OUTB_DELIVERY_CHANGE’
EXPORTING
header_data = header_data
header_control = header_ctrl
delivery = delivery
TABLES
item_data = item_data
item_control = item_control
return = return5

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值