SAP Function HU_GET_HUS - Handling Units are Returned from GM as TABLES

Parameter Reference Type Length Default Optional Text
IF_LOCK_HUS XFELD C 1 SPACE X Block HUs
IF_MARA_PACKMITTEL XFELD C 1 SPACE X If DB Select - Also Read Weight/Vol
IF_MORE_HUS XFELD C 1 X Should be Read Iteratively
IF_NO_DB_SELECT XFELD C 1 SPACE X Access Database if not in Global Table?
IF_NO_LOOP XFELD C 1 'X' X No HUs from other Objects Present in Global Table
IF_OBJECT VPOBJ C 2 X Object Currently Being Processed
IF_WITH_TEXT XFELD C 1 SPACE X If Database Select - Also Read Material Short Text?
IS_OBJECTS HUM_OBJECT u 22 X Object for which HUs Should be Read
IT_HANDLE HUM_HANDLE_T h 22 X Table with HU Identifiers
IT_HUS HUM_EXIDV_T h 20 X HU Identifications
IT_OBJECTS HUM_OBJECT_T h 22 X Objects for which HUs Should be Read
IT_VENUM HUM_VENUM_T h 10 X Internal HU Numbers

Parameter Reference Type Length Text
ET_HEADER HUM_HU_HEADER_T h 1500 HU Headers
ET_HIGHEST_LEVELS HUM_VENUM_T h 10 Numbers of the Highest-level HUs
ET_HISTORY HUM_HISTORY_T h 67 HU History
ET_ITEMS HUM_HU_ITEM_T h 400 HU Items
ET_ITEM_SERIALNO VSEP_T_RSEROB 0 Serial Numbers for Items in ET_ITEMS
ET_MESSAGES HUITEM_MESSAGES_T h 276 Table Type for Returning Output for Packing

Exception Text
FATAL_ERROR An Internal Error Occurred
HUS_LOCKED HUs that were Selected are Blocked
NO_HU_FOUND No HUs Were Found

Functionality
This function module determines HU data and returns it.
If the required data exists, it is determined from the internal packingtables or from the database. HUs that are read from the database arebuffered in the internal tables.

Notes
The import parameters IS_OBJECT, IT_OBJECTS, IT_HUS, IT_VENUM searchfor HU data according to different selection criteria. However, notmore than one of these import parameters can be filled. The result isreturned for only one import parameter per call.
The interface parameters are documented.

Further information
The import and export tables are tables without header lines.

Description
Table of HU headers in the VEKPVB structure.

Description
Table with internal HU numbers of the HUs that are no longer packed inother HUs.

Description
History records of the required HUs in the VEVWVB structure.

Description
Table with HU items in the VEPOVB structure.

Description
Serial numbers for the material items in the ET_ITEMS table thatrequire a serial number and have a serial number object list.

Description
When the IF_LOCK_HUS parameter is set to "X", the handling units readfrom the database are locked. If the handling unit is in a storagelocation that is HU-managed and WM-managed, then the related storageunit is also locked.
If the HUs are already in the internal tables, this parameter is nottaken into account.

Notes
If the affected handling units are to be processed later, then theparameter must be transferred with "X".

Value range
Space, "X"

Default
Space

Description
The entire hierarchy is to be read.
This parameter for reading handling units for objects (for theIS_OBJECT and IT_OBJECTS parameters) must only be set when deliveriesthat can be packed in a shipment are involved and for the shipmentobject if the corresponding delivery numbers were not included.
When reading handling units for internal or external identification,the parameter is taken into consideration only when the internal tablesare read and dictates whether the system returns only the requestedheaders with their items or the entire hierarchy in which the handlingunit is found. For database accesses, the system sets this parameter to"X".

Value range
space, "X"

Default
space

Description
If this parameter is not transferred, then handling units that are notin the internal tables are read from the database.
When the parameter is set to "X", only handling units that are alreadyread from the database, and therefore are in the internal tables, arereturned.

Value range
Space, "X"

Default
Space

Description
This parameter can only be used in connection with the importparameters IS_OBJECT and IT_OBJECTS and is used to improve performance.
This parameter must be called up with an initial value if the callingprogram has called up the object for more objects than it is nowrequesting.

Example
Several documents are to be processed. At the start of processing, theHUs for all these documents are read from the database into theinternal tables for packing. The parameter has no effect at this point,because the internal tables are empty.
While one of these documents is being processed, the HU data for thatdocument is requested. The IF_NO_LOOP field must be transferredcontaining a space, because the requested HUs must be sorted out.
If the calling program is sure that only handling units for therequested object are in the global tables (this is ensured if themodule has not already been called up with other import parameters inthe same transaction), then the parameter must be transferred with thevalue "X".

Value range
space, "X"

Default
"X"

Description
Object that is requesting information. If the request isobject-independent, the object is to be used for non-assigned handlingunits.

Description
This parameter improves performance if the handling units that are tobe read are not displayed. During the database selection, thisparameter prevents the material short texts from being read from thetext tables.

Value range

  • space - Material short texts will be read

  • 'X' - Text tables are not accessed
  • Default
    space

    Description
    Classification of the current object for which the handling units havebeen read.

    Example
    is_objects-object = '01', is_objects-objkey = '0080004711 '.
    All HUs for delivery 80004711 are returned.

    Default
    Initial

    Description
    Table containing HU identifications (EXIDV) of the HUs that arerequired.

    Default
    Initial

    Description
    Table with several object keys.
    For an example of how to fill the structure, refer to the descriptionfor parameter IS_OBJECTS.

    Default
    Initial

    Description
    Table containing internal HU numbers for which the HU data is required.

    Default
    Initial