Using-Bapi Outb Delivery Confirm Dec-Cross-Hu
Using-Bapi Outb Delivery Confirm Dec-Cross-Hu
Using-Bapi Outb Delivery Confirm Dec-Cross-Hu
Using BAPI_OUTB_DELIVERY_CONFIRM_DEC
for packing several deliveries
into one HU
Submitted By:
Martin Schlegel
BearingPoint
Oberbaumbrücke 1
20457 Hamburg, Germany
http://www.bearingpoint.de/
1.1 Requirement
In SAP, normally one would use the shipment (transaction VT01, German: “Transport”) in order to put
several deliveries into one Handling Unit (“HU”). In our case, the user wants to put several deliveries
into one HU without transport. And he wants to this in any warehouse or storage location.
Put several deliveries into one Handling Unit (HU) without using shipment.
In HEADER_CONTROL:
But the delivery has no HU. Probably we have to send a COMMIT WORK.
*&---------------------------------------------------------------------*
REPORT ZZ_BAPI_OUTB_DELIVERY_CONF_DEC.
parameters:
* Delivery number
p_deliv like BAPIOBDLVHDRCON-DELIV_NUMB default '0080015271',
header_data,
header_control,
delivery,
gs_HANDLING_UNIT_HEADER_CROSS.
refresh:
HANDLING_UNIT_HEADER_CROSS.
header_data-DELIV_NUMB = p_deliv.
header_control-DELIV_NUMB = p_deliv.
delivery = p_deliv.
gs_HANDLING_UNIT_HEADER_CROSS-DELIV_NUMB = p_deliv.
gs_HANDLING_UNIT_HEADER_CROSS-HDL_UNIT_EXID = p_hunr.
gs_HANDLING_UNIT_HEADER_CROSS-SHIP_MAT = p_humat.
append
gs_HANDLING_UNIT_HEADER_CROSS
to
HANDLING_UNIT_HEADER_CROSS.
* Call Function
DELIVERY = p_deliv
TABLES
RETURN = return
HANDLING_UNIT_HEADER_CROSS = HANDLING_UNIT_HEADER_CROSS
.
commit work.
write: 'Fertig'.
Before we start the search, something hits our curiosity: The letters “XHU” in the statement “INCLUDE
/SPE/XHU_LV51SF01.”:
It seems like we can stop searching for vkep-vpobj. Let us check if this form is called from our
BAPI_OUTB_DELIVERY_CONFIRM_DEC.
Form: x_hu_active_check
Include: /SPE/XHU_LV51SF01
This FORM is called when we execute our program.
In SAP standard, several deliveries can only be packed into on HU if EWM is used.
Without EWM, several deliveries can only be packed into one HU using shipments (Transaction VT01)
in SAP standard.