SAP Function Modules

GET_UNPACK_HU SAP Function module - Validation of HU by external ID for unpacking







GET_UNPACK_HU is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name GET_UNPACK_HU into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: LMGT
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM GET_UNPACK_HU - GET UNPACK HU





CALL FUNCTION 'GET_UNPACK_HU' "Validation of HU by external ID for unpacking
  EXPORTING
    i_hu_son_id =               " rlmob-clenum  Internal sub SU number
  TABLES
    t_hu_header =               "               VEKP + desc of pack material from MAKT
    t_hu =                      "               VEPO + desc of material from MAKT
    t_hu_items =                "
  EXCEPTIONS
    HU_NOT_FOUND = 1            "               Handling unit not found
    HU_IN_LIST = 2              "               Handling unit already in the list
    HU_NOT_INSIDE = 3           "               Handling unit not inside
    .  "  GET_UNPACK_HU

ABAP code example for Function Module GET_UNPACK_HU





The ABAP code below is a full code listing to execute function module GET_UNPACK_HU including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
it_t_hu_header  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_t_hu_header  LIKE LINE OF it_t_hu_header ,
it_t_hu  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_t_hu  LIKE LINE OF it_t_hu ,
it_t_hu_items  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_t_hu_items  LIKE LINE OF it_t_hu_items .


DATA(ld_i_hu_son_id) = some text here

"populate fields of struture and append to itab
append wa_t_hu_header to it_t_hu_header.

"populate fields of struture and append to itab
append wa_t_hu to it_t_hu.

"populate fields of struture and append to itab
append wa_t_hu_items to it_t_hu_items. . CALL FUNCTION 'GET_UNPACK_HU' EXPORTING i_hu_son_id = ld_i_hu_son_id TABLES t_hu_header = it_t_hu_header t_hu = it_t_hu t_hu_items = it_t_hu_items EXCEPTIONS HU_NOT_FOUND = 1 HU_IN_LIST = 2 HU_NOT_INSIDE = 3 . " GET_UNPACK_HU
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_i_hu_son_id  TYPE RLMOB-CLENUM ,
it_t_hu_header  TYPE STANDARD TABLE OF STRING ,
wa_t_hu_header  LIKE LINE OF it_t_hu_header,
it_t_hu  TYPE STANDARD TABLE OF STRING ,
wa_t_hu  LIKE LINE OF it_t_hu,
it_t_hu_items  TYPE STANDARD TABLE OF STRING ,
wa_t_hu_items  LIKE LINE OF it_t_hu_items.


ld_i_hu_son_id = some text here

"populate fields of struture and append to itab
append wa_t_hu_header to it_t_hu_header.

"populate fields of struture and append to itab
append wa_t_hu to it_t_hu.

"populate fields of struture and append to itab
append wa_t_hu_items to it_t_hu_items.

SAP Documentation for FM GET_UNPACK_HU


This function checks if handling units specified by an external identification number can be unpacked . ...See here for full SAP fm documentation








Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name GET_UNPACK_HU or its description.