SAP RS_TREE_GET_CURRENT_LAYOUT Function Module for Get layout information for displayed hierarchy









RS_TREE_GET_CURRENT_LAYOUT is a standard rs tree get current layout SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get layout information for displayed 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 get current layout FM, simply by entering the name RS_TREE_GET_CURRENT_LAYOUT into the relevant SAP transaction such as SE37 or SE38.

Function Group: SEUT
Program Name: SAPLSEUT
Main Program: SAPLSEUT
Appliation area: S
Release date: 03-Nov-1994
Mode(Normal, Remote etc): Normal Function Module
Update:



Function RS_TREE_GET_CURRENT_LAYOUT 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_GET_CURRENT_LAYOUT'"Get layout information for displayed hierarchy
IMPORTING
CURSOR_COLUMN = "Current column line of the cursor
CURSOR_LINE = "Current line item of the cursor
FIRST_NODE = "Root node of the displayed list
FIRST_NODE_TYPE = "Cat. of the root node (for consistency check)
LIST_COLUMN = "First displayed column of the list
LIST_LINE = "First displayed line of the list
LAYOUT_MODE = "Layout mode

TABLES
* LAYOUT = "Layout of the hierarchy (amortization degree)
.



EXPORTING Parameters details for RS_TREE_GET_CURRENT_LAYOUT

CURSOR_COLUMN - Current column line of the cursor

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

CURSOR_LINE - Current line item of the cursor

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

FIRST_NODE - Root node of the displayed list

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

FIRST_NODE_TYPE - Cat. of the root node (for consistency check)

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

LIST_COLUMN - First displayed column of the list

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

LIST_LINE - First displayed line of the list

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

LAYOUT_MODE - Layout mode

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

TABLES Parameters details for RS_TREE_GET_CURRENT_LAYOUT

LAYOUT - Layout of the hierarchy (amortization degree)

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

Copy and paste ABAP code example for RS_TREE_GET_CURRENT_LAYOUT 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:
lt_layout  TYPE STANDARD TABLE OF SEUTEXPAND, "   
lv_cursor_column  TYPE SY-CUCOL, "   
lv_cursor_line  TYPE SY-CUROW, "   
lv_first_node  TYPE STREENODE-ID, "   
lv_first_node_type  TYPE STREENODE-TYPE, "   
lv_list_column  TYPE SY-STACO, "   
lv_list_line  TYPE SY-STARO, "   
lv_layout_mode  TYPE STREE_LAYOUT_MODE. "   

  CALL FUNCTION 'RS_TREE_GET_CURRENT_LAYOUT'  "Get layout information for displayed hierarchy
    IMPORTING
         CURSOR_COLUMN = lv_cursor_column
         CURSOR_LINE = lv_cursor_line
         FIRST_NODE = lv_first_node
         FIRST_NODE_TYPE = lv_first_node_type
         LIST_COLUMN = lv_list_column
         LIST_LINE = lv_list_line
         LAYOUT_MODE = lv_layout_mode
    TABLES
         LAYOUT = lt_layout
. " RS_TREE_GET_CURRENT_LAYOUT




ABAP code using 7.40 inline data declarations to call FM RS_TREE_GET_CURRENT_LAYOUT

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 CUCOL FROM SY INTO @DATA(ld_cursor_column).
 
"SELECT single CUROW FROM SY INTO @DATA(ld_cursor_line).
 
"SELECT single ID FROM STREENODE INTO @DATA(ld_first_node).
 
"SELECT single TYPE FROM STREENODE INTO @DATA(ld_first_node_type).
 
"SELECT single STACO FROM SY INTO @DATA(ld_list_column).
 
"SELECT single STARO FROM SY INTO @DATA(ld_list_line).
 
 


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!