Fonction SAP BAPI_HU_UNPACK - BAPI for Unpacking an Item from an HU

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
HUKEY BAPIHUKEY-HU_EXID C 20 External Handling Unit Identification
ITEMUNPACK BAPIHUITMUNPACK u 177 Handling-Unit Item to Be Unpacked

Paramètre Reférence Type Long. Description
HUHEADER BAPIHUHEADER u 724 Handling Unit Header was Changed

Paramètre Reférence Long. Facultatif Description
RETURN BAPIRET2 548 Return Parameters
SERIALNUMBERS BAPIHUITMSERIAL 90 X Serial Numbers for a Handling Unit Item

Functionality
Unpacking handling units or materials from a handling unit.
Lower-level handling units, material items or auxiliary packagingmaterials can be unpacked. Even partial quantities can be unpacked frommaterial items and auxiliary packaging materials.

Example
Handling unit 4711 contains handling units 4712 and 4713 and 12 piecesof material XY.
1. Unpacking 4712:
ITEMUNPACK-UNPACK_EXID = 4712. HUKEY-HU_EXID = 4711.
2. Unpacking 5 pieces of XY:
HUKEY-HU_EXID = 4711;
ITEMUNPACK-QUANTITY = '5'. ITEMUNPACK-MEINS = 'PC'.
ITEMUNPACK-MATERIAL = 'XY'. ITEMUNPACK-PLANT = .... and so on.
You can also specify the ITEMUNPACK-HU_ITEM_NUMBER, if you knowit.
.
INCLUDE 'BAPI_HU_CREATE HUHEADER' OBJECT DOKU ID FU
INCLUDE 'BAPI_HU_DELETE HUKEY' OBJECT DOKU ID FU

Description
The items that are to be unpacked must be described in this importparameter. The HU_ITEM_TYPE field dictates whether a material item, ahandling-unit item or an auxiliary packaging material is to beunpacked:
- Material item: HU_ITEM_TYPE = '1'. As many fields of the structure aspossible should be filled in (exception: UNPACK_EXID). If the quantitythat is to be unpacked (QUANTITY field) is the same as the totalexisting quantity for this item, the item is deleted.
- HU item: HU_ITEM_TYPE = '3'. If a handling-unit item is to beunpacked, the key for this handling unit must be entered in theUNPACK_EXID field. All other fields are insignificant.
- Auxiliary packaging-material item: HU_ITEM_TYPE = '2'. In order tounpack an auxiliary packaging-material item, you must fill in theMATERIAL and QUANTITY fields.
INCLUDE 'BAPI_HU_CREATE RETURN' OBJECT DOKU ID FU
INCLUDE 'BAPI_HU_PACK SERIALNUMBERS' OBJECT DOKU ID FU

1167867Debugging for handling unit BAPIs