SAP RS_TREE_CONTROL_PREPARE Function Module for









RS_TREE_CONTROL_PREPARE is a standard rs tree control prepare SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 control prepare FM, simply by entering the name RS_TREE_CONTROL_PREPARE into the relevant SAP transaction such as SE37 or SE38.

Function Group: SEUT
Program Name: SAPLSEUT
Main Program: SAPLSEUT
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function RS_TREE_CONTROL_PREPARE 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_CONTROL_PREPARE'"
EXPORTING
* CONTROL_PATTERN = STREE_CTL_GENERIC "Pattern
* CALLBACK_ITEM_DISPLAY = "
* COLOR_MAPPING = "
* TYPE_MAPPING = "
* HIERARCHY_HEADER = "
* INITIAL_HEADER_WIDTH = "
* LIST_ITEM_HEADER = "
* MULTIPLE_SELECTION = STREE_FALSE "
* ITEM_SELECTION = STREE_FALSE "
* SUPPRESS_NODE_ICON = STREE_FALSE "
* SUPPRESS_FOLDER_ICON = STREE_FALSE "
* CALLBACK_PROGRAM = "

IMPORTING
SUBSCREEN_PROGRAM = "
SUBSCREEN_DYNNR = "

EXCEPTIONS
NOT_AVAILABLE = 1
.



IMPORTING Parameters details for RS_TREE_CONTROL_PREPARE

CONTROL_PATTERN - Pattern

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

CALLBACK_ITEM_DISPLAY -

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

COLOR_MAPPING -

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

TYPE_MAPPING -

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

HIERARCHY_HEADER -

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

INITIAL_HEADER_WIDTH -

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

LIST_ITEM_HEADER -

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

MULTIPLE_SELECTION -

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

ITEM_SELECTION -

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

SUPPRESS_NODE_ICON -

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

SUPPRESS_FOLDER_ICON -

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

CALLBACK_PROGRAM -

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

EXPORTING Parameters details for RS_TREE_CONTROL_PREPARE

SUBSCREEN_PROGRAM -

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

SUBSCREEN_DYNNR -

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

EXCEPTIONS details

NOT_AVAILABLE -

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

Copy and paste ABAP code example for RS_TREE_CONTROL_PREPARE 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_not_available  TYPE STRING, "   
lv_control_pattern  TYPE STREE_CTL_PATTERN, "   STREE_CTL_GENERIC
lv_subscreen_program  TYPE SYREPID, "   
lv_callback_item_display  TYPE SYREPID, "   
lv_color_mapping  TYPE STREE_CTL_COL_MAPPING_TAB, "   
lv_type_mapping  TYPE STREE_CTL_TYPE_MAPPING_TAB, "   
lv_subscreen_dynnr  TYPE SYDYNNR, "   
lv_hierarchy_header  TYPE TV_HEADING, "   
lv_initial_header_width  TYPE I, "   
lv_list_item_header  TYPE TV_HEADING, "   
lv_multiple_selection  TYPE STREE_BOOL, "   STREE_FALSE
lv_item_selection  TYPE STREE_BOOL, "   STREE_FALSE
lv_suppress_node_icon  TYPE STREE_BOOL, "   STREE_FALSE
lv_suppress_folder_icon  TYPE STREE_BOOL, "   STREE_FALSE
lv_callback_program  TYPE SYREPID. "   

  CALL FUNCTION 'RS_TREE_CONTROL_PREPARE'  "
    EXPORTING
         CONTROL_PATTERN = lv_control_pattern
         CALLBACK_ITEM_DISPLAY = lv_callback_item_display
         COLOR_MAPPING = lv_color_mapping
         TYPE_MAPPING = lv_type_mapping
         HIERARCHY_HEADER = lv_hierarchy_header
         INITIAL_HEADER_WIDTH = lv_initial_header_width
         LIST_ITEM_HEADER = lv_list_item_header
         MULTIPLE_SELECTION = lv_multiple_selection
         ITEM_SELECTION = lv_item_selection
         SUPPRESS_NODE_ICON = lv_suppress_node_icon
         SUPPRESS_FOLDER_ICON = lv_suppress_folder_icon
         CALLBACK_PROGRAM = lv_callback_program
    IMPORTING
         SUBSCREEN_PROGRAM = lv_subscreen_program
         SUBSCREEN_DYNNR = lv_subscreen_dynnr
    EXCEPTIONS
        NOT_AVAILABLE = 1
. " RS_TREE_CONTROL_PREPARE




ABAP code using 7.40 inline data declarations to call FM RS_TREE_CONTROL_PREPARE

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.

 
DATA(ld_control_pattern) = STREE_CTL_GENERIC.
 
 
 
 
 
 
 
 
 
DATA(ld_multiple_selection) = STREE_FALSE.
 
DATA(ld_item_selection) = STREE_FALSE.
 
DATA(ld_suppress_node_icon) = STREE_FALSE.
 
DATA(ld_suppress_folder_icon) = STREE_FALSE.
 
 


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!