I am trying to insert a new partner (in 'Partner' tab) and a new deadline (in 'Dates' tab) in the header of the Outbound Delivery using 'BAPI_OUTB_DELIVERY_CHANGE'.
Neither errors nor non-zero return-code (sy-subrc) was encountered post execution.
But the partner and deadline details were not updated.
Please find the code which I used:
HEADER_PARTNER-UPD_MODE_PARTN = 'I'. " Insert new partner
HEADER_PARTNER-DELIV_NUMB = 'VBELN'. " (Outbound Delivery No.)
HEADER_PARTNER-PARTN_ROLE = 'SP'.
HEADER_PARTNER-PARTNER_NO = 'LIFNR'. " (Partner No.)
HEADER_DEADLINES-DELIV_NUMB = 'VBELN'.
HEADER_DEADLINES-TIMETYPE = ' '. (The value disapperas as soon as I enter something)
Even I have tried the below mentioned values in the field 'TIMETYPE':
Delivery date (WSHDRLFDAT)
Planned goods issue date (WSHDRWADAT)
Actual goods issue date (WSHDRWADTI)
Loading date (WSHDRLDDAT)
Transportation planning date (WSHDRTDDAT)
Picking date (WSHDRKODAT)
I have filled ITEM_DATA, HEADER_DATA and HEADER_CONTROL values as well.
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CONFIRM_DEC'
HEADER_DATA = t_hdr_data
HEADER_CONTROL = t_hdr_ctrl
DELIVERY = 'VBELN'
HEADER_PARTNER = header_partner
HEADER_DEADLINES = header_deadlines
ITEM_DATA = t_item_data
RETURN = t_return.
Kindly assist me in achieving the solution.