SAP Function HU_CREATE_ONE_HU - Create One HU Including Items

Parameter Reference Type Length Default Optional Text
IF_CREATE_HU XFELD C 1 X Create Handling Units with Stock
IS_HEADER_ADD HUHDR_ADDITIONAL_DATA u 211 X Non-functional Additional Data
IS_HEADER_CAPACITY HUHDR_CAPACITY u 125 X Weight, Volume and Dimension Specifications
IS_HEADER_PROPOSAL HUHDR_PROPOSAL u 79 Mandatory Data for Creating an HU Header
IS_HEADER_TRANSPORT HUHDR_TRANSPORT u 115 X Additional Data that is Relevant for Shipments
IS_WM VSEP_S_WMSP 0 X Creation of an Inventory HU for WM
IT_ITEMS HUITM_PROP h 256 X System Suggestion for Items to be Created
IT_SERIAL_NR HUM_REP_SERNR_T h 96 X Serial Numbers for the Items to be Created

Parameter Reference Type Length Text
ES_HEADER VEKPVB u 1500 HU Header that was Created
ET_ITEMS HUM_HU_ITEM_T h 400 HU Items that were Created
ET_MESSAGES HUITEM_MESSAGES_T h 276 Table with Error Messages

Exception Text
FATAL_ERROR Internal Error
HEADER_ERROR HU Header Data Contains Incorrect Data
INPUT_MISSING Data that is Necessary for Creation is Missing
ITEM_ERROR Items Cannot be Created
NOT_POSSIBLE HU Creation not Possible
SERIAL_NR_ERROR Serial Number Error

Functionality
This function module creates a HU header. The handling unit can becreated with or without items. In addition, serial numbers can alreadybe transferred for each handling unit item.
Nested handling units can be created when a multiple call of thefunction module is carried out.
When creating handling units including items, the calling program canuse a parameter to control whether the created handling unit is toreceive stock information.
In a multiple call, the parameter IF_CREATE_HU must always be set inthe same way. Handling units with and without stock cannot be createdsimultaneously.
Before this function module is called for the first time, the functionmodule HU_INITIALIZE_PACKING should always be called. This functionmodule must be called for the creation of handling units with stockbecause it is required for the creation of the HU-managed storagelocation.
After successfully creating one or more handling units, the packingdata must be posted with the function module "HU_POST".

Example
Creation of a non-assigned handling unit of the Packingmaterial PALLET:
RESET N1
IS_OBJECT: is_object-object = '06'.
IS_HEADER_PROPOSAL: is_header_proposal-exidv = '$1'
is_header_proposal-VHILM = 'PALLET'
is_header_proposal-status = '0001'.

Notes
The IS_WM structure can only be set by Warehouse Management. If it istransferred, no handling units are created in the database.

Further information
For a more detailed description of how to fill the parameters, refer tothe documentation for the individual parameters.

Description
The handling unit header created from the proposal is returned here inthe internal format.

Description
The handling unit items that were created from the item proposals aretransferred here.

Description
If messages have been issued for individual items, the item isspecified. In the case of general messages, only the MSG.. fields arefilled.

Description
Controls whether or not the handling units are to be created withinventory management information.
If handling units are to be created with stock, then the functionmodule "HU_INITIALIZE_PACKING" must have run first, in which theIS_PLANT_STLOC structure was filled.

Value range
Space -> HU without stock, "X" HU with stock.

Description
Additional attributes of the handling units are freely definable andare transferred without a check being carried out.

Default
Space

Description
This parameter cannot be transferred. It is intended for internal useonly in Warehouse Management.
If, nonetheless, the values are filled, then the handling units thatmay have been created are not be updated.

Description
Proposals for handling unit items.
Meaning of the fields:
RESET N1
VENUM: Refers to the internal number that is given to the handling unitto be created and therefore cannot be transferred.
EXIDV: Identification of the handling unit that is to be created. Thisfield must contain the same entry as the EXIDV field in theIS_HEADER_PROPOSAL structure.
VELIN: Describes the contents of the item.
'1' Material item
'2' Auxiliary packaging materials item
'3' Item is a handling unit
BELNR: Can only be set for material items. For the creation of handlingunits for a work order (is_objects-object = '08'), the field mustcontain the reservation number. In all other cases, the transfer is ofno importance.
SUB_HU_VENUM: Can only be set for the packing of handling units thatalready exist. These can have been created in a previous call of thisfunction module, or already exist in the database. If handling unitsthat already exist in the database are to be packed, these must betransferred to the function module HU_INITIALIZE_PACKING that wascalled beforehand.
SUB_HU_EXIDV: Can only be set for packing handling units. They can behandling units that were created in a previous call or handling unitsthat already exist (see SUB_HU_VENUM).
QUANTITY: Can only be set for material items and describes the quantitythat is to be packed in the base unit of measure.
MEINS: Base unit of measure of the material. This is checked againstthe material master and, if necessary, changed.
VEANZ: Can only be set for auxiliary packaging material items anddescribes the number of auxiliary packaging materials in the base unitof measure of the item.
MATNR: Required field for material items and auxiliary packagingmaterial items.
CHARG: Only for material items. The batch must also be transferred formaterials that are to be handled in batches.
ANZSN: In the case of a serialized material, the material serialnumbers can already be specified when the item is created. When serialnumbers are transferred in table "IT_SERIAL_NR", the number of theserial numbers transferred must be specified in this field.
KZBEI: Identifies the item as a supplementary item. This field istransferred without any checks.
All other fields refer to the stock that is packed and that arerequired for the creation of HUs with stock.

Description
Serial numbers for the material items that require a serial number.