SAP HU_DISPLAY Function Module for Display Selected Handling Units









HU_DISPLAY is a standard hu display SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Display Selected Handling Units processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for hu display FM, simply by entering the name HU_DISPLAY into the relevant SAP transaction such as SE37 or SE38.

Function Group: V51E
Program Name: SAPLV51E
Main Program: SAPLV51E
Appliation area: V
Release date: 27-Sep-1999
Mode(Normal, Remote etc): Normal Function Module
Update:



Function HU_DISPLAY pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'HU_DISPLAY'"Display Selected Handling Units
EXPORTING
* IF_DISPLAY = 'X' "Either Display Only (X) or Change HUs
* IF_COMMIT = ' ' "Should a Commit be Transmitted
* IT_HUS = "External HU Identification
* IT_OBJECTS = "Objects to be Displayed - Changes Not Allowed
* IT_VENUM = "HU Numbers
* IF_AR_HUS = ' ' "Also Read Archived HUs
* IF_EXIDV_FOR_DELETED = ' ' "Read Access with EXIDV of Deleted HUs

IMPORTING
EF_FCODE = "Function Code for End of Processing
EF_DATA_CHANGED = "Indicator: Data was Changed
ET_MESSAGES = "Table with Messages that Occurred
ET_HEADER = "Table Type for Handling Units
ET_ITEMS = "Table Type for Handling Unit Items

EXCEPTIONS
NO_HUS_FOUND = 1 NOT_ALLOWED = 2 FATAL_ERROR = 3
.



IMPORTING Parameters details for HU_DISPLAY

IF_DISPLAY - Either Display Only (X) or Change HUs

Data type: XFELD
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IF_COMMIT - Should a Commit be Transmitted

Data type: XFELD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_HUS - External HU Identification

Data type: HUM_EXIDV_T
Optional: Yes
Call by Reference: Yes

IT_OBJECTS - Objects to be Displayed - Changes Not Allowed

Data type: HUM_OBJECT_T
Optional: Yes
Call by Reference: Yes

IT_VENUM - HU Numbers

Data type: HUM_VENUM_T
Optional: Yes
Call by Reference: Yes

IF_AR_HUS - Also Read Archived HUs

Data type: XFELD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IF_EXIDV_FOR_DELETED - Read Access with EXIDV of Deleted HUs

Data type: XFELD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for HU_DISPLAY

EF_FCODE - Function Code for End of Processing

Data type: SY-UCOMM
Optional: No
Call by Reference: No ( called with pass by value option)

EF_DATA_CHANGED - Indicator: Data was Changed

Data type: XFELD
Optional: No
Call by Reference: No ( called with pass by value option)

ET_MESSAGES - Table with Messages that Occurred

Data type: HUITEM_MESSAGES_T
Optional: No
Call by Reference: No ( called with pass by value option)

ET_HEADER - Table Type for Handling Units

Data type: HUM_HU_HEADER_T
Optional: No
Call by Reference: Yes

ET_ITEMS - Table Type for Handling Unit Items

Data type: HUM_HU_ITEM_T
Optional: No
Call by Reference: Yes

EXCEPTIONS details

NO_HUS_FOUND - No HUs were Found

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NOT_ALLOWED - Changes Not Allowed

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

FATAL_ERROR - Error

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for HU_DISPLAY Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_ef_fcode  TYPE SY-UCOMM, "   
lv_if_display  TYPE XFELD, "   'X'
lv_no_hus_found  TYPE XFELD, "   
lv_if_commit  TYPE XFELD, "   SPACE
lv_not_allowed  TYPE XFELD, "   
lv_ef_data_changed  TYPE XFELD, "   
lv_it_hus  TYPE HUM_EXIDV_T, "   
lv_et_messages  TYPE HUITEM_MESSAGES_T, "   
lv_fatal_error  TYPE HUITEM_MESSAGES_T, "   
lv_et_header  TYPE HUM_HU_HEADER_T, "   
lv_it_objects  TYPE HUM_OBJECT_T, "   
lv_et_items  TYPE HUM_HU_ITEM_T, "   
lv_it_venum  TYPE HUM_VENUM_T, "   
lv_if_ar_hus  TYPE XFELD, "   SPACE
lv_if_exidv_for_deleted  TYPE XFELD. "   SPACE

  CALL FUNCTION 'HU_DISPLAY'  "Display Selected Handling Units
    EXPORTING
         IF_DISPLAY = lv_if_display
         IF_COMMIT = lv_if_commit
         IT_HUS = lv_it_hus
         IT_OBJECTS = lv_it_objects
         IT_VENUM = lv_it_venum
         IF_AR_HUS = lv_if_ar_hus
         IF_EXIDV_FOR_DELETED = lv_if_exidv_for_deleted
    IMPORTING
         EF_FCODE = lv_ef_fcode
         EF_DATA_CHANGED = lv_ef_data_changed
         ET_MESSAGES = lv_et_messages
         ET_HEADER = lv_et_header
         ET_ITEMS = lv_et_items
    EXCEPTIONS
        NO_HUS_FOUND = 1
        NOT_ALLOWED = 2
        FATAL_ERROR = 3
. " HU_DISPLAY




ABAP code using 7.40 inline data declarations to call FM HU_DISPLAY

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single UCOMM FROM SY INTO @DATA(ld_ef_fcode).
 
DATA(ld_if_display) = 'X'.
 
 
DATA(ld_if_commit) = ' '.
 
 
 
 
 
 
 
 
 
 
DATA(ld_if_ar_hus) = ' '.
 
DATA(ld_if_exidv_for_deleted) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!