Skip to Content
1
Nov 24, 2009 at 02:32 PM

Not able to delete line items using BAPI_OUTB_DELIVERY_CHANGE

1324 Views

Hi,

Not able to delete line items of a delivery using BAPI 'BAPI_OUTB_DELIVERY_CHANGE', with thte below code and even return parameter has zero messages.

I have even checked existing below posting.

https://www.sdn.sap.com/irj/scn/logon?redirect=http%3a%2f%2fforums.sdn.sap.com%2fthread.jspa%3fthreadid%3d782509

Below is the code that i am using.........

*wa1-deliv_numb = wa_lips-vbeln.

  • wa1-deliv_item = wa_lips-posnr.

  • APPEND wa1 to item_data.

wa-deliv_numb = vbeln_so .

wa-deliv_item = l_item.

wa-del_item = 'X'.

APPEND wa TO item_control.

w_header_data-deliv_numb = vbeln_so .

w_header_control-deliv_numb = vbeln_so .

w_delivery = vbeln_so .

*w_header_control-dlv_del = 'X'. "Delete whole Delivery

CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'

EXPORTING

header_data = w_header_data

header_control = w_header_control

delivery = w_delivery

TABLES

  • item_data = item_data

item_control = item_control

return = return.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = 'X'.

I have even tried uncommenting item_data parameter but not able to delete line item.....i am able to delete whole delivery but not line items .........can any one of u help me in resolving this issiue plz ???

Regards,

M, Manohar