SAP Function Modules

RH_SEARCH_TREE_SEL_OBJECTS SAP Function module







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

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


Pattern for FM RH_SEARCH_TREE_SEL_OBJECTS - RH SEARCH TREE SEL OBJECTS





CALL FUNCTION 'RH_SEARCH_TREE_SEL_OBJECTS' "
  EXPORTING
    col_key =                   " tv_itmname
    tree_handle =               " cl_gui_column_tree
*   begda =                     " dats
*   endda =                     " dats
  TABLES
    tree_objects =              " tree_objec    Structure objec with Node Key for Tree Control
    tree_structure =            " tree_struc    Structure struc with Node Key for Tree Control
    column_content =            " orgnodecon    HR-CA Tree framework: Column content
*   legend_icon_text =          " treelegend    Entries for HR tree framework legend
    .  "  RH_SEARCH_TREE_SEL_OBJECTS

ABAP code example for Function Module RH_SEARCH_TREE_SEL_OBJECTS





The ABAP code below is a full code listing to execute function module RH_SEARCH_TREE_SEL_OBJECTS 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:
it_tree_objects  TYPE STANDARD TABLE OF TREE_OBJEC,"TABLES PARAM
wa_tree_objects  LIKE LINE OF it_tree_objects ,
it_tree_structure  TYPE STANDARD TABLE OF TREE_STRUC,"TABLES PARAM
wa_tree_structure  LIKE LINE OF it_tree_structure ,
it_column_content  TYPE STANDARD TABLE OF ORGNODECON,"TABLES PARAM
wa_column_content  LIKE LINE OF it_column_content ,
it_legend_icon_text  TYPE STANDARD TABLE OF TREELEGEND,"TABLES PARAM
wa_legend_icon_text  LIKE LINE OF it_legend_icon_text .

DATA(ld_col_key) = 'Check type of data required'.
DATA(ld_tree_handle) = 'Check type of data required'.
DATA(ld_begda) = 'Check type of data required'.
DATA(ld_endda) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_tree_objects to it_tree_objects.

"populate fields of struture and append to itab
append wa_tree_structure to it_tree_structure.

"populate fields of struture and append to itab
append wa_column_content to it_column_content.

"populate fields of struture and append to itab
append wa_legend_icon_text to it_legend_icon_text. . CALL FUNCTION 'RH_SEARCH_TREE_SEL_OBJECTS' EXPORTING col_key = ld_col_key tree_handle = ld_tree_handle * begda = ld_begda * endda = ld_endda TABLES tree_objects = it_tree_objects tree_structure = it_tree_structure column_content = it_column_content * legend_icon_text = it_legend_icon_text . " RH_SEARCH_TREE_SEL_OBJECTS
IF SY-SUBRC EQ 0. "All OK 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_col_key  TYPE TV_ITMNAME ,
it_tree_objects  TYPE STANDARD TABLE OF TREE_OBJEC ,
wa_tree_objects  LIKE LINE OF it_tree_objects,
ld_tree_handle  TYPE CL_GUI_COLUMN_TREE ,
it_tree_structure  TYPE STANDARD TABLE OF TREE_STRUC ,
wa_tree_structure  LIKE LINE OF it_tree_structure,
ld_begda  TYPE DATS ,
it_column_content  TYPE STANDARD TABLE OF ORGNODECON ,
wa_column_content  LIKE LINE OF it_column_content,
ld_endda  TYPE DATS ,
it_legend_icon_text  TYPE STANDARD TABLE OF TREELEGEND ,
wa_legend_icon_text  LIKE LINE OF it_legend_icon_text.

ld_col_key = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_tree_objects to it_tree_objects.
ld_tree_handle = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_tree_structure to it_tree_structure.
ld_begda = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_column_content to it_column_content.
ld_endda = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_legend_icon_text to it_legend_icon_text.

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