Skip to Content
0
Former Member
Apr 10, 2013 at 06:10 AM

Inserting a new Partner/Deadline in Outbound Delivery using 'BAPI_OUTB_DELIVERY_CHANGE'

931 Views

Hello Everyone,

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'

EXPORTING

HEADER_DATA = t_hdr_data

HEADER_CONTROL = t_hdr_ctrl

DELIVERY = 'VBELN'

TABLES

HEADER_PARTNER = header_partner

HEADER_DEADLINES = header_deadlines

ITEM_DATA = t_item_data

RETURN = t_return.


Kindly assist me in achieving the solution.

Warm Regards,

Yogesh