‎2009 Nov 10 9:42 AM
Hi, we have to add a new item to a delivery using ABAP. The function module BAPI_OUTB_DELIVERY_CHANGE has a parameter NEW_ITEM_DATA, but unfortunately no documentation about it. It Does anybody have an example on how to add a new item with this FM?
Thanks for your help, best regards, Martin
‎2009 Nov 10 9:48 AM
Hello,
I have never used that FM before but I think you just have to pass a table that contains the values of the changes to the FM.
item_control is used to confirm item_data
Hope this helps at least a little
‎2009 Nov 10 10:23 AM
Hi,
I have used this way:
Loop at it_vbrp.
CLEAR: wa_hdata, wa_hcont, d_delivy, it_bapiret2.
wa_hdata-deliv_numb = it_vbrp-vgbel.
wa_hcont-deliv_numb = it_vbrp-vgbel.
wa_hcont-dlv_del = c_x.
d_delivy = it_vbrp-vgbel.
*---Deleting delivery doc (VL02)
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
EXPORTING
header_data = wa_hdata
header_control = wa_hcont
delivery = d_delivy
TABLES
return = it_bapiret2.
*---commit
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
Endloop.
Thanks,
Krishna