02-02-2010 6:12 AM
Hi Experts,
I have created an outbound delivery.
I have to update the fields Picking date, Transportation loading date, Planned GI date and Delivery date.
These fields are at the header level.
I tried using the BAPI BAPI_OUTB_DELIVERY_CHANGE.
These dates are to be provided in the table HEADER_DEADLINES.
However, it seems like I am making some mistake due to which the dates are not getting updated.
Can you please tell me what values are to be passed in the table as an example?
The delivery shows theses dates as the schedule line date and not the one passed to the BAPI.
Please help.
Thanks,
Anusha
02-02-2010 6:28 AM
Hi Anusha,
The values to be passed to internal table looks like below....
HEADER_DEADLINES-DELIV_NUMB = <delivery no>.
HEADER_DEADLINES-TIMETYPE = 'WSHDRWADAT'. "Planned goods issue date
HEADER_DEADLINES-TIMESTAMP_UTC = '20100202115500'. "YYYYMMDDhhmmss
HEADER_DEADLINES-TIMEZONE = 'CST'. "Central Time (Dallas) USA
append HEADER_DEADLINES.
Please check, it should work.
Thanks,
Savitha
02-02-2010 6:28 AM
Hi Anusha,
The values to be passed to internal table looks like below....
HEADER_DEADLINES-DELIV_NUMB = <delivery no>.
HEADER_DEADLINES-TIMETYPE = 'WSHDRWADAT'. "Planned goods issue date
HEADER_DEADLINES-TIMESTAMP_UTC = '20100202115500'. "YYYYMMDDhhmmss
HEADER_DEADLINES-TIMEZONE = 'CST'. "Central Time (Dallas) USA
append HEADER_DEADLINES.
Please check, it should work.
Thanks,
Savitha
02-02-2010 6:52 AM
Hi Savitha,
Thanks for the answer.
The solution you gave works for Planned GI date.
However, when I try to apply that to picking date with time type as 'WSHDRKODAT' , loading date as 'WSHDRLDDAT', transportation planning date as 'WSHDRTDDAT' with other fields (timestamp and time zone) as same, it doesn't update these dates.
Am I using wrong field names for these dates?
02-02-2010 6:55 AM
Hi,
Please use the following types(available in FM documententation).
Delivery date (WSHDRLFDAT)
Planned goods issue date (WSHDRWADAT)
Actual goods issue date (WSHDRWADTI)
Loading date (WSHDRLDDAT)
Transportation planning date (WSHDRTDDAT)
Picking date (WSHDRKODAT)
You are using the correct types. Please check in debugging what is happening with the other dates.
Put a break point in include LV50IF04, line no 1050 in FORM vbkok_obdlv_fill_chg and debug.
Regards,
Savitha
Edited by: Savitha Madhavagiri on Feb 2, 2010 1:56 AM
Edited by: Savitha Madhavagiri on Feb 2, 2010 2:01 AM
02-02-2010 6:34 AM
Hi,
Use the FM "WS_DELIVERY_UPDATE" and the structure u need to fill is VBKOK_WA... It has all the fields you require...
Regards,
Nagaraj
07-18-2011 4:00 PM
Hi guys,
if you want to update the field "wadat_ist" with the FM "WS_DELIVERY_UPDATE" you have to code:
et_vbkok-vbeln_vl = p_vbeln.
et_vbkok-vbtyp_vl = 'J'
et_vbkok-borgr_kzwad = 'X'
et_vbkok-wadat_ist = sy-datum.
et_delivery = p_entrega_head-vbeln.
CALL FUNCTION 'WS_DELIVERY_UPDATE'
EXPORTING
vbkok_wa = et_vbkok
delivery = et_delivery
cheers,
JP
02-02-2010 8:45 AM
04-10-2010 6:04 AM
Hi,
How u solved this problem, Iam getting the same error.
iam using,
it_header_deadlines-timetype = 'WSHDRWADTI'
IT_HEADER_DEADLINES-TIMESTAMP_UTC = 20100410101500
IT_HEADER_DEADLINES-TIMEZONE = CST
Convert into CS_VBKOK-WADAT_IST = 20100410
But after that it is not getting updated into Delivery header as "Actual GI date" .
GS_VBKOK is updating correct with "Actual GI Date (WADAT_IST) = 20100410 and planned date (WADAT) = 20100409
with KZWAD = 'X' and using FM "WS_DELIVERY_UPDATE" updating delivery with the table GS_VBKOK.
Can u help me reagrding this.
Regards,
Vamsy
07-18-2011 5:01 PM
If you are using BAPI_OUTB_DELIVERY_CHANGE then apart from passing the dates in the HEADER_DEADLINES parameter you also need to pass 'X' in the HEADER_CONTROL parameter for those dates.
This should solve the issue.
Abhi