SAP Function Modules

RS_TREE_CONTROL_PREPARE SAP Function module







RS_TREE_CONTROL_PREPARE 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 RS_TREE_CONTROL_PREPARE into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM RS_TREE_CONTROL_PREPARE - RS TREE CONTROL PREPARE





CALL FUNCTION 'RS_TREE_CONTROL_PREPARE' "
* EXPORTING
*   control_pattern = STREE_CTL_GENERIC  " stree_ctl_pattern  Pattern
*   hierarchy_header =          " tv_heading
*   initial_header_width =      " i
*   list_item_header =          " tv_heading
*   multiple_selection = STREE_FALSE  " stree_bool
*   item_selection = STREE_FALSE  " stree_bool
*   suppress_node_icon = STREE_FALSE  " stree_bool
*   suppress_folder_icon = STREE_FALSE  " stree_bool
*   callback_program =          " syrepid
*   callback_item_display =     "
*   color_mapping =             " stree_ctl_col_mapping_tab
*   type_mapping =              " stree_ctl_type_mapping_tab
  IMPORTING
    subscreen_program =         " syrepid
    subscreen_dynnr =           " sydynnr
  EXCEPTIONS
    NOT_AVAILABLE = 1           "
    .  "  RS_TREE_CONTROL_PREPARE

ABAP code example for Function Module RS_TREE_CONTROL_PREPARE





The ABAP code below is a full code listing to execute function module RS_TREE_CONTROL_PREPARE 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:
ld_subscreen_program  TYPE SYREPID ,
ld_subscreen_dynnr  TYPE SYDYNNR .

DATA(ld_control_pattern) = 'Check type of data required'.
DATA(ld_hierarchy_header) = 'Check type of data required'.
DATA(ld_initial_header_width) = 'Check type of data required'.
DATA(ld_list_item_header) = 'Check type of data required'.
DATA(ld_multiple_selection) = 'Check type of data required'.
DATA(ld_item_selection) = 'Check type of data required'.
DATA(ld_suppress_node_icon) = 'Check type of data required'.
DATA(ld_suppress_folder_icon) = 'Check type of data required'.
DATA(ld_callback_program) = 'Check type of data required'.
DATA(ld_callback_item_display) = 'some text here'.
DATA(ld_color_mapping) = 'some text here'.
DATA(ld_type_mapping) = 'some text here'. . CALL FUNCTION 'RS_TREE_CONTROL_PREPARE' * EXPORTING * control_pattern = ld_control_pattern * hierarchy_header = ld_hierarchy_header * initial_header_width = ld_initial_header_width * list_item_header = ld_list_item_header * multiple_selection = ld_multiple_selection * item_selection = ld_item_selection * suppress_node_icon = ld_suppress_node_icon * suppress_folder_icon = ld_suppress_folder_icon * callback_program = ld_callback_program * callback_item_display = ld_callback_item_display * color_mapping = ld_color_mapping * type_mapping = ld_type_mapping IMPORTING subscreen_program = ld_subscreen_program subscreen_dynnr = ld_subscreen_dynnr EXCEPTIONS NOT_AVAILABLE = 1 . " RS_TREE_CONTROL_PREPARE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_subscreen_program  TYPE SYREPID ,
ld_control_pattern  TYPE STREE_CTL_PATTERN ,
ld_subscreen_dynnr  TYPE SYDYNNR ,
ld_hierarchy_header  TYPE TV_HEADING ,
ld_initial_header_width  TYPE I ,
ld_list_item_header  TYPE TV_HEADING ,
ld_multiple_selection  TYPE STREE_BOOL ,
ld_item_selection  TYPE STREE_BOOL ,
ld_suppress_node_icon  TYPE STREE_BOOL ,
ld_suppress_folder_icon  TYPE STREE_BOOL ,
ld_callback_program  TYPE SYREPID ,
ld_callback_item_display  TYPE STRING ,
ld_color_mapping  TYPE STREE_CTL_COL_MAPPING_TAB ,
ld_type_mapping  TYPE STREE_CTL_TYPE_MAPPING_TAB .

ld_control_pattern = 'some text here'.
ld_hierarchy_header = 'some text here'.
ld_initial_header_width = 'some text here'.
ld_list_item_header = 'some text here'.
ld_multiple_selection = 'some text here'.
ld_item_selection = 'some text here'.
ld_suppress_node_icon = 'some text here'.
ld_suppress_folder_icon = 'some text here'.
ld_callback_program = 'Check type of data required'.
ld_callback_item_display = 'some text here'.
ld_color_mapping = 'some text here'.
ld_type_mapping = 'some text here'.

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 RS_TREE_CONTROL_PREPARE or its description.