2009 Nov 23 5:06 PM
Deal All,
Could any one provide the BAPI/FM that can change "TransptnPlanng" date/time in inbound/outbound delivery documents?
I need to update the dates only in ABAP program based on external information.
I tried WS_DELIVERY_UPDATE with the following parameters setup:
VBKOK_WA-VBELN_VL = target delivery number
VBKOK_WA-TDDAT = "12/12/2009"
VBKOK_WA-TDUHR = "12:12:12"
(for the other fields in structure VBKOK_WA, I leave them blank)
DELIVERY = target delivery number
After run the FM in test mode, no error returns but no data updated in the delivery... (dates not change)
Do I need to specify all the other fields for the delivery (like delivery date, line item details etc) even though I just want to update two fields in the header of the delivery?
Thanks & Regards,
Wenling
2009 Nov 23 5:29 PM
This Function module should work. you need to call 'COMMIT WORK' after successful execution of this FM or set Commit flag while calling this FM.
rgds,
PB
2009 Nov 23 5:29 PM
You don't need to specify the other fields. Make sure you use the INTERNAL date and time formats. Did you specify the commit parameter in the interface when using the test workbench?
2009 Nov 23 7:35 PM
Thank you all for your reply.
Yes I did "commit work" after calling the FM, but it looks like the field LIKP-TDDAT was not changed for the value...
2009 Nov 23 10:48 PM
Didn't catch this before - you didn't set the flag field for changing the value (KZTDDAT). Your date format is OK, as long as you're using the test workbench.
2009 Nov 23 11:01 PM
BAPI_OUTB_DELIVERY_CHANGE works in this case (just to change the date)
Need to put "X" on the date field on structure BAPIOBDLVHDRCTRLCHG and need to use table BAPIDLVDEADLN with correct date type to update.
Thank you all for your replies.
2009 Nov 24 3:06 PM
So does WS_DELIVERY_UPDATE if you use the correct parameters .