SAP HIER_DISPLAY Function Module for Display a hierarchy on the screen
HIER_DISPLAY is a standard hier 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 a hierarchy on the screen 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 hier display FM, simply by entering the name HIER_DISPLAY into the relevant SAP transaction such as SE37 or SE38.
Function Group: SHIE
Program Name: SAPLSHIE
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function HIER_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 'HIER_DISPLAY'"Display a hierarchy on the screen.
EXPORTING
APPL = "Two-digit application (for PF status...)
* APPLICATION = 'SO70' "Table DSYDS application
* FISHEYE_PERFORMED = ' ' "
* DISP_LINE_INFORMATION = ' ' "
* INDEX_FIRST = 1 "First entry of the hierarchy table to be shown
* LAYER_SHIFT = 3 "
MAX_LAYER = "
TITLE_STRING = "
* VIEWNAME = 'STANDARD' "
IMPORTING
CHANGED = "
TABLES
INT_EXCLUDES = "
INT_HIER = "
EXCEPTIONS
NO_HIERARCHY_GIVEN = 1
IMPORTING Parameters details for HIER_DISPLAY
APPL - Two-digit application (for PF status...)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
APPLICATION - Table DSYDS application
Data type: DSYDS-APPLDefault: 'SO70'
Optional: Yes
Call by Reference: No ( called with pass by value option)
FISHEYE_PERFORMED -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DISP_LINE_INFORMATION -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
INDEX_FIRST - First entry of the hierarchy table to be shown
Data type: SY-TABIXDefault: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)
LAYER_SHIFT -
Data type:Default: 3
Optional: Yes
Call by Reference: No ( called with pass by value option)
MAX_LAYER -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TITLE_STRING -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
VIEWNAME -
Data type: DSYAD-VIEWNAMEDefault: 'STANDARD'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for HIER_DISPLAY
CHANGED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for HIER_DISPLAY
INT_EXCLUDES -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INT_HIER -
Data type: HITABOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_HIERARCHY_GIVEN -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for HIER_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_appl | TYPE STRING, " | |||
| lv_changed | TYPE STRING, " | |||
| lt_int_excludes | TYPE STANDARD TABLE OF STRING, " | |||
| lv_no_hierarchy_given | TYPE STRING, " | |||
| lt_int_hier | TYPE STANDARD TABLE OF HITAB, " | |||
| lv_application | TYPE DSYDS-APPL, " 'SO70' | |||
| lv_fisheye_performed | TYPE DSYDS, " SPACE | |||
| lv_disp_line_information | TYPE DSYDS, " ' ' | |||
| lv_index_first | TYPE SY-TABIX, " 1 | |||
| lv_layer_shift | TYPE SY, " 3 | |||
| lv_max_layer | TYPE SY, " | |||
| lv_title_string | TYPE SY, " | |||
| lv_viewname | TYPE DSYAD-VIEWNAME. " 'STANDARD' |
|   CALL FUNCTION 'HIER_DISPLAY' "Display a hierarchy on the screen |
| EXPORTING | ||
| APPL | = lv_appl | |
| APPLICATION | = lv_application | |
| FISHEYE_PERFORMED | = lv_fisheye_performed | |
| DISP_LINE_INFORMATION | = lv_disp_line_information | |
| INDEX_FIRST | = lv_index_first | |
| LAYER_SHIFT | = lv_layer_shift | |
| MAX_LAYER | = lv_max_layer | |
| TITLE_STRING | = lv_title_string | |
| VIEWNAME | = lv_viewname | |
| IMPORTING | ||
| CHANGED | = lv_changed | |
| TABLES | ||
| INT_EXCLUDES | = lt_int_excludes | |
| INT_HIER | = lt_int_hier | |
| EXCEPTIONS | ||
| NO_HIERARCHY_GIVEN = 1 | ||
| . " HIER_DISPLAY | ||
ABAP code using 7.40 inline data declarations to call FM HIER_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 APPL FROM DSYDS INTO @DATA(ld_application). | ||||
| DATA(ld_application) | = 'SO70'. | |||
| DATA(ld_fisheye_performed) | = ' '. | |||
| DATA(ld_disp_line_information) | = ' '. | |||
| "SELECT single TABIX FROM SY INTO @DATA(ld_index_first). | ||||
| DATA(ld_index_first) | = 1. | |||
| DATA(ld_layer_shift) | = 3. | |||
| "SELECT single VIEWNAME FROM DSYAD INTO @DATA(ld_viewname). | ||||
| DATA(ld_viewname) | = 'STANDARD'. | |||
Search for further information about these or an SAP related objects