03-14-2008 10:43 AM
Hi!
I would like to delete an item (for example item 010) in an outbound delivery (VL02N). I found BAPI_INB_DELIVERY_CHANGE but i don't manage to use it.
In HEADER_DATA i key the delivery.
IN DELIVERY i key the delivery too.
In ITEM_DATA i key the delivery and the item.
in ITEM_CONTROL i key the item number (10)
But it doesn't work!
Could you help me please?
Thanks by advance,
LB
03-14-2008 11:07 AM
HI
Use this BAPI V50I BAPI_OUTB_DELIVERY_CHANGE for outbound delivery
the one which u have used is for inbound
Regards
Shiva
03-14-2008 11:07 AM
HI
Use this BAPI V50I BAPI_OUTB_DELIVERY_CHANGE for outbound delivery
the one which u have used is for inbound
Regards
Shiva
03-14-2008 12:46 PM
thanks you for your answer!
It still doesn't work. Th return table is empty but the item is not deleted. Here is my code:
DATA g_delivery TYPE bapiobdlvhdrchg-deliv_numb.
DATA gt_header_data TYPE TABLE OF bapiobdlvhdrchg WITH HEADER LINE.
DATA gt_header_ctrl TYPE TABLE OF bapiobdlvhdrctrlchg WITH HEADER LINE.
DATA return TYPE TABLE OF bapiret2 WITH HEADER LINE.
DATA gt_data TYPE TABLE OF bapiobdlvitemchg WITH HEADER LINE.
DATA gt_ctrl TYPE TABLE OF bapiobdlvitemctrlchg WITH HEADER LINE.
CLEAR g_delivery.
g_delivery = '0080000469'.
CLEAR gt_header_data.
REFRESH gt_header_data.
gt_header_data-deliv_numb = g_delivery.
APPEND gt_header_data.
CLEAR gt_header_ctrl.
REFRESH gt_header_ctrl.
gt_header_ctrl-deliv_numb = g_delivery.
APPEND gt_header_ctrl.
CLEAR gt_data.
REFRESH gt_data.
gt_data-deliv_numb = '0080000469'.
gt_data-deliv_item = '000010'.
APPEND gt_data.
REFRESH gt_ctrl.
gt_ctrl-deliv_numb = '0080000469'.
gt_ctrl-deliv_item = '000010'.
gt_ctrl-del_item = 'X'.
APPEND gt_ctrl.
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
EXPORTING
header_data = gt_header_data
header_control = gt_header_ctrl
delivery = g_delivery
TABLES
* item_data = gt_data
item_control = gt_ctrl
return = return.
Is there something wrong?
LB
03-14-2008 12:54 PM
After the call to FM BAPI_OUTB_DELIVERY_CHANGE, try to call the BAPI
BAPI_TRANSACTION_COMMIT for commiting the data to DB.
Hope this helps.
Thanks,
Balaji
03-14-2008 12:59 PM
03-14-2008 1:01 PM
It works with BAPI_TRANSACTION_COMMIT !
Thank you a lot for your help!
LB
Edited by: Laurent BOUDART on Mar 14, 2008 2:02 PM
03-14-2008 1:04 PM
Hi LB,
Can you close the thread if your issue has been resolved?
Reward points for all helpful answers.
Thanks,
Balaji
03-14-2008 1:11 PM
it is written "Your question is answered. " so i guess the thread is closed.
LB
03-14-2008 11:09 AM
The BAPI you are using changes only inbound deliveries which can be changed via VL32N transaction.
So try BAPI_OUTB_DELIVERY_CHANGE for changing outbound delivery change.
Hope it helps.
Thanks
Balaji