SAP RS_TREE_LIST_DISPLAY Function Module for Display hierarchy
RS_TREE_LIST_DISPLAY is a standard rs tree list 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 hierarchy 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 rs tree list display FM, simply by entering the name RS_TREE_LIST_DISPLAY into the relevant SAP transaction such as SE37 or SE38.
Function Group: SEUT
Program Name: SAPLSEUT
Main Program: SAPLSEUT
Appliation area: S
Release date: 04-Mar-1998
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RS_TREE_LIST_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 'RS_TREE_LIST_DISPLAY'"Display hierarchy.
EXPORTING
* CALLBACK_PROGRAM = "Program containing the EXIT routines
* CHECK_DUPLICATE_NAME = '1' "Test for duplicate names
* COLOR_OF_NODE = '4' "Node color (standard)
* COLOR_OF_MARK = '3' "Color of a selected node
* COLOR_OF_LINK = '1' "Color of a link node
* COLOR_OF_MATCH = '5' "Color of a found node
* LOWER_CASE_SENSITIVE = ' ' "'X' if case-sensitive
* MODIFICATION_LOG = ' ' "'X' if modification log required
* NODE_LENGTH = 30 "Output length of a node
* TEXT_LENGTH = 75 "Length of text block 1
* TEXT_LENGTH1 = 0 "Length of text block 2
* CALLBACK_USER_COMMAND = "EXIT routine for command handling
* TEXT_LENGTH2 = 0 "Length of text block 3
* RETURN_MARKED_SUBTREE = ' ' "'X' if selected sub-nodes are to be taken into account
* SCREEN_START_COLUMN = 0 "Column where list dialog box begins
* SCREEN_START_LINE = 0 "Line where list dialog box begins
* SCREEN_END_COLUMN = 0 "Column where list dialog box ends
* SCREEN_END_LINE = 0 "Line where list dialog box ends
* SUPPRESS_NODE_OUTPUT = ' ' "'X' suppresses the node display
* LAYOUT_MODE = ' ' "Tree display normal/ compressed
* USE_CONTROL = STREE_USE_LIST "Display as list or tree control
* CALLBACK_TEXT_DISPLAY = "EXIT routine for node display
* CALLBACK_MOREINFO_DISPLAY = "EXIT routine to node supplementary information
* CALLBACK_COLOR_DISPLAY = "EXIT routine for color legend
* CALLBACK_TOP_OF_PAGE = "EXIT routine for TOP-OF-PAGE display
* CALLBACK_GUI_STATUS = "EXIT routine for setting a GUI status
* CALLBACK_CONTEXT_MENU = "EXIT routine for constructing the context menu
* STATUS = 'IMPLICIT' "Status display ('OWN', 'STANDARD', 'IMPLICIT')
IMPORTING
F15 = "Function key F15 pressed
IMPORTING Parameters details for RS_TREE_LIST_DISPLAY
CALLBACK_PROGRAM - Program containing the EXIT routines
Data type: SY-REPIDOptional: Yes
Call by Reference: Yes
CHECK_DUPLICATE_NAME - Test for duplicate names
Data type:Default: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)
COLOR_OF_NODE - Node color (standard)
Data type:Default: '4'
Optional: Yes
Call by Reference: No ( called with pass by value option)
COLOR_OF_MARK - Color of a selected node
Data type:Default: '3'
Optional: Yes
Call by Reference: No ( called with pass by value option)
COLOR_OF_LINK - Color of a link node
Data type:Default: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)
COLOR_OF_MATCH - Color of a found node
Data type:Default: '5'
Optional: Yes
Call by Reference: No ( called with pass by value option)
LOWER_CASE_SENSITIVE - 'X' if case-sensitive
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
MODIFICATION_LOG - 'X' if modification log required
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
NODE_LENGTH - Output length of a node
Data type:Default: 30
Optional: Yes
Call by Reference: No ( called with pass by value option)
TEXT_LENGTH - Length of text block 1
Data type:Default: 75
Optional: Yes
Call by Reference: No ( called with pass by value option)
TEXT_LENGTH1 - Length of text block 2
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
CALLBACK_USER_COMMAND - EXIT routine for command handling
Data type:Optional: Yes
Call by Reference: Yes
TEXT_LENGTH2 - Length of text block 3
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
RETURN_MARKED_SUBTREE - 'X' if selected sub-nodes are to be taken into account
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SCREEN_START_COLUMN - Column where list dialog box begins
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
SCREEN_START_LINE - Line where list dialog box begins
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
SCREEN_END_COLUMN - Column where list dialog box ends
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
SCREEN_END_LINE - Line where list dialog box ends
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
SUPPRESS_NODE_OUTPUT - 'X' suppresses the node display
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LAYOUT_MODE - Tree display normal/ compressed
Data type: STREE_LAYOUT_MODEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
USE_CONTROL - Display as list or tree control
Data type: STREE_USE_MODEDefault: STREE_USE_LIST
Optional: Yes
Call by Reference: No ( called with pass by value option)
CALLBACK_TEXT_DISPLAY - EXIT routine for node display
Data type:Optional: Yes
Call by Reference: Yes
CALLBACK_MOREINFO_DISPLAY - EXIT routine to node supplementary information
Data type:Optional: Yes
Call by Reference: Yes
CALLBACK_COLOR_DISPLAY - EXIT routine for color legend
Data type:Optional: Yes
Call by Reference: Yes
CALLBACK_TOP_OF_PAGE - EXIT routine for TOP-OF-PAGE display
Data type:Optional: Yes
Call by Reference: Yes
CALLBACK_GUI_STATUS - EXIT routine for setting a GUI status
Data type:Optional: Yes
Call by Reference: Yes
CALLBACK_CONTEXT_MENU - EXIT routine for constructing the context menu
Data type:Optional: Yes
Call by Reference: Yes
STATUS - Status display ('OWN', 'STANDARD', 'IMPLICIT')
Data type:Default: 'IMPLICIT'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RS_TREE_LIST_DISPLAY
F15 - Function key F15 pressed
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RS_TREE_LIST_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_f15 | TYPE STRING, " | |||
| lv_callback_program | TYPE SY-REPID, " | |||
| lv_check_duplicate_name | TYPE SY, " '1' | |||
| lv_color_of_node | TYPE SY, " '4' | |||
| lv_color_of_mark | TYPE SY, " '3' | |||
| lv_color_of_link | TYPE SY, " '1' | |||
| lv_color_of_match | TYPE SY, " '5' | |||
| lv_lower_case_sensitive | TYPE SY, " SPACE | |||
| lv_modification_log | TYPE SY, " SPACE | |||
| lv_node_length | TYPE SY, " 30 | |||
| lv_text_length | TYPE SY, " 75 | |||
| lv_text_length1 | TYPE SY, " 0 | |||
| lv_callback_user_command | TYPE SY, " | |||
| lv_text_length2 | TYPE SY, " 0 | |||
| lv_return_marked_subtree | TYPE SY, " SPACE | |||
| lv_screen_start_column | TYPE SY, " 0 | |||
| lv_screen_start_line | TYPE SY, " 0 | |||
| lv_screen_end_column | TYPE SY, " 0 | |||
| lv_screen_end_line | TYPE SY, " 0 | |||
| lv_suppress_node_output | TYPE SY, " SPACE | |||
| lv_layout_mode | TYPE STREE_LAYOUT_MODE, " SPACE | |||
| lv_use_control | TYPE STREE_USE_MODE, " STREE_USE_LIST | |||
| lv_callback_text_display | TYPE STREE_USE_MODE, " | |||
| lv_callback_moreinfo_display | TYPE STREE_USE_MODE, " | |||
| lv_callback_color_display | TYPE STREE_USE_MODE, " | |||
| lv_callback_top_of_page | TYPE STREE_USE_MODE, " | |||
| lv_callback_gui_status | TYPE STREE_USE_MODE, " | |||
| lv_callback_context_menu | TYPE STREE_USE_MODE, " | |||
| lv_status | TYPE STREE_USE_MODE. " 'IMPLICIT' |
|   CALL FUNCTION 'RS_TREE_LIST_DISPLAY' "Display hierarchy |
| EXPORTING | ||
| CALLBACK_PROGRAM | = lv_callback_program | |
| CHECK_DUPLICATE_NAME | = lv_check_duplicate_name | |
| COLOR_OF_NODE | = lv_color_of_node | |
| COLOR_OF_MARK | = lv_color_of_mark | |
| COLOR_OF_LINK | = lv_color_of_link | |
| COLOR_OF_MATCH | = lv_color_of_match | |
| LOWER_CASE_SENSITIVE | = lv_lower_case_sensitive | |
| MODIFICATION_LOG | = lv_modification_log | |
| NODE_LENGTH | = lv_node_length | |
| TEXT_LENGTH | = lv_text_length | |
| TEXT_LENGTH1 | = lv_text_length1 | |
| CALLBACK_USER_COMMAND | = lv_callback_user_command | |
| TEXT_LENGTH2 | = lv_text_length2 | |
| RETURN_MARKED_SUBTREE | = lv_return_marked_subtree | |
| SCREEN_START_COLUMN | = lv_screen_start_column | |
| SCREEN_START_LINE | = lv_screen_start_line | |
| SCREEN_END_COLUMN | = lv_screen_end_column | |
| SCREEN_END_LINE | = lv_screen_end_line | |
| SUPPRESS_NODE_OUTPUT | = lv_suppress_node_output | |
| LAYOUT_MODE | = lv_layout_mode | |
| USE_CONTROL | = lv_use_control | |
| CALLBACK_TEXT_DISPLAY | = lv_callback_text_display | |
| CALLBACK_MOREINFO_DISPLAY | = lv_callback_moreinfo_display | |
| CALLBACK_COLOR_DISPLAY | = lv_callback_color_display | |
| CALLBACK_TOP_OF_PAGE | = lv_callback_top_of_page | |
| CALLBACK_GUI_STATUS | = lv_callback_gui_status | |
| CALLBACK_CONTEXT_MENU | = lv_callback_context_menu | |
| STATUS | = lv_status | |
| IMPORTING | ||
| F15 | = lv_f15 | |
| . " RS_TREE_LIST_DISPLAY | ||
ABAP code using 7.40 inline data declarations to call FM RS_TREE_LIST_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 REPID FROM SY INTO @DATA(ld_callback_program). | ||||
| DATA(ld_check_duplicate_name) | = '1'. | |||
| DATA(ld_color_of_node) | = '4'. | |||
| DATA(ld_color_of_mark) | = '3'. | |||
| DATA(ld_color_of_link) | = '1'. | |||
| DATA(ld_color_of_match) | = '5'. | |||
| DATA(ld_lower_case_sensitive) | = ' '. | |||
| DATA(ld_modification_log) | = ' '. | |||
| DATA(ld_node_length) | = 30. | |||
| DATA(ld_text_length) | = 75. | |||
| DATA(ld_return_marked_subtree) | = ' '. | |||
| DATA(ld_suppress_node_output) | = ' '. | |||
| DATA(ld_layout_mode) | = ' '. | |||
| DATA(ld_use_control) | = STREE_USE_LIST. | |||
| DATA(ld_status) | = 'IMPLICIT'. | |||
Search for further information about these or an SAP related objects