SAP RSO_SHOW_DATA_AS_TREE Function Module for Displays Data as Tree (with Data in Columns if Required)









RSO_SHOW_DATA_AS_TREE is a standard rso show data as tree SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Displays Data as Tree (with Data in Columns if Required) 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 rso show data as tree FM, simply by entering the name RSO_SHOW_DATA_AS_TREE into the relevant SAP transaction such as SE37 or SE38.

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



Function RSO_SHOW_DATA_AS_TREE 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 'RSO_SHOW_DATA_AS_TREE'"Displays Data as Tree (with Data in Columns if Required)
EXPORTING
I_R_DATA_TREE = "Object with Data for Column Tree
* I_ITEM_CHECKBOX = "Column with Checkbox
* I_T_ITEM_CHECKBOX = "If There Are Multiple Columns with Checkbox
* I_FULL_SCREEN = RS_C_FALSE "Fill Mode Completely
* I_WIDTH = 80 "
* I_HEIGHT = 20 "
* I_INFO_TEXT = "Name of Information Text

IMPORTING
E_NODE_SELECTED = "Selected Node
E_TH_CHECKBOX_SELECTED = "BW Repository: Chosen Checkbox for a Node
E_OK_CODE = "Menu Painter: Object code

EXCEPTIONS
CX_RS_CANCELLED = 1
.



IMPORTING Parameters details for RSO_SHOW_DATA_AS_TREE

I_R_DATA_TREE - Object with Data for Column Tree

Data type: CL_RSO_DATA_TREE
Optional: No
Call by Reference: Yes

I_ITEM_CHECKBOX - Column with Checkbox

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

I_T_ITEM_CHECKBOX - If There Are Multiple Columns with Checkbox

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

I_FULL_SCREEN - Fill Mode Completely

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

I_WIDTH -

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

I_HEIGHT -

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

I_INFO_TEXT - Name of Information Text

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

EXPORTING Parameters details for RSO_SHOW_DATA_AS_TREE

E_NODE_SELECTED - Selected Node

Data type: TV_NODEKEY
Optional: No
Call by Reference: Yes

E_TH_CHECKBOX_SELECTED - BW Repository: Chosen Checkbox for a Node

Data type: RSO_TH_TREE_CHECKBOX_SELECTED
Optional: No
Call by Reference: Yes

E_OK_CODE - Menu Painter: Object code

Data type: GUI_CODE
Optional: No
Call by Reference: Yes

EXCEPTIONS details

CX_RS_CANCELLED - Terminated by User (Dialog)

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

Copy and paste ABAP code example for RSO_SHOW_DATA_AS_TREE 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_i_r_data_tree  TYPE CL_RSO_DATA_TREE, "   
lv_cx_rs_cancelled  TYPE CL_RSO_DATA_TREE, "   
lv_e_node_selected  TYPE TV_NODEKEY, "   
lv_i_item_checkbox  TYPE STRING, "   
lv_e_th_checkbox_selected  TYPE RSO_TH_TREE_CHECKBOX_SELECTED, "   
lv_e_ok_code  TYPE GUI_CODE, "   
lv_i_t_item_checkbox  TYPE RSOC_T_ITEM_CHECKBOX, "   
lv_i_full_screen  TYPE RS_BOOL, "   RS_C_FALSE
lv_i_width  TYPE I, "   80
lv_i_height  TYPE I, "   20
lv_i_info_text  TYPE STRING. "   

  CALL FUNCTION 'RSO_SHOW_DATA_AS_TREE'  "Displays Data as Tree (with Data in Columns if Required)
    EXPORTING
         I_R_DATA_TREE = lv_i_r_data_tree
         I_ITEM_CHECKBOX = lv_i_item_checkbox
         I_T_ITEM_CHECKBOX = lv_i_t_item_checkbox
         I_FULL_SCREEN = lv_i_full_screen
         I_WIDTH = lv_i_width
         I_HEIGHT = lv_i_height
         I_INFO_TEXT = lv_i_info_text
    IMPORTING
         E_NODE_SELECTED = lv_e_node_selected
         E_TH_CHECKBOX_SELECTED = lv_e_th_checkbox_selected
         E_OK_CODE = lv_e_ok_code
    EXCEPTIONS
        CX_RS_CANCELLED = 1
. " RSO_SHOW_DATA_AS_TREE




ABAP code using 7.40 inline data declarations to call FM RSO_SHOW_DATA_AS_TREE

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_i_full_screen) = RS_C_FALSE.
 
DATA(ld_i_width) = 80.
 
DATA(ld_i_height) = 20.
 
 


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!