* Delivery ticket posting
Break-point.
Data:
Hdata like bapiobdlvhdrcon,
Hctrl like bapiobdlvhdrctrlcon,
IPK like table of/SPE/bapiobdlvitemconf with header line,
RET like table of bapiret2 with header line,
HDL like table of bapidlvdeadln with header line.
Hdata-DELIV_NUMB = delno.
Hctrl-DELIV_NUMB = delno.
Hctrl-POST_GI_FLG = 'x '.
"Mark more actual and planned posting time. The time value is added to the header_deadlines parameter.(I did not pay attention to help at the beginning, but I found it only after a lot of detours)
Hctrl-DELIV_DATE_FLG = 'x '.
Hctrl-GDSI_DATE_FLG = 'x '.
Ipk-DELIV_NUMB = delno.
Ipk-DELIV_ITEM = 10.
Ipk-STGE_LOC = 2023.
Append IPK.
"Check the header_deadlines instructions and get the following prompt:
*-Wshdrlfdat delivery date
*-Wshdrwadat goods Issue Date (planned)
*-Wshdrwadti goods Issue Date (actual)
*-Wshdrlddat Loading Date
*-Wshdrtddat Transportation Planning date
*-Wshdrkodat picking date
Hdl-DELIV_NUMB = delno.
HDL-timetype = 'wshdrwadti'. "actual posting date
The hdl-timestamp_utc = date1.
Append HDL.
Hdl-DELIV_NUMB = delno.
HDL-timetype = 'wshdrwadat '. "scheduled date
The hdl-timestamp_utc = date1.
Append HDL.
Call function 'bapi _ outb_delivery_confirm_dec'
Exporting
Header_data = hdata
Header_control = hctrl
Delivery = delno
* Techn_control =
* Header_data_spl =
* Header_control_spl =
Tables
* Header_partner =
* Header_partner_addr =
Header_deadlines = HDL
* Item_data =
* Item_control =
* Item_serial_no =
* Supplier_cons_data =
* Handling_unit_header =
* Handling_unit_item =
* Handling_unit_serno =
* Extension1 =
* Extension2 =
Item_data_spl = IPK []
Return = RET
* Tokenreference =
* Handling_unit_header_cross =
* Item_data_spl =
* Handling_unit_identifiers =
* Handling_unit_item_spl =
.