SAP RSDM_F4_GET_SEARCH_TREE Function Module for Provides Subtree That Corresponds to Search String









RSDM_F4_GET_SEARCH_TREE is a standard rsdm f4 get search 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 Provides Subtree That Corresponds to Search String 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 rsdm f4 get search tree FM, simply by entering the name RSDM_F4_GET_SEARCH_TREE into the relevant SAP transaction such as SE37 or SE38.

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



Function RSDM_F4_GET_SEARCH_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 'RSDM_F4_GET_SEARCH_TREE'"Provides Subtree That Corresponds to Search String
EXPORTING
* I_HIERKEY = "
I_PATTERN = "
* I_PARENT = "
* I_MAXTLEVEL = 99 "Level of a hierarchy node
* I_SEARCH_TEXT = RS_C_TRUE "Boolean
* I_SEARCH_KEY = RS_C_TRUE "Boolean
* I_WITH_RESTNODE = RS_C_FALSE "Find in Remainder?

IMPORTING
E_T_SEARCH_RESULT = "
E_T_HIERNODE = "

EXCEPTIONS
X_MESSAGE = 1
.



IMPORTING Parameters details for RSDM_F4_GET_SEARCH_TREE

I_HIERKEY -

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

I_PATTERN -

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

I_PARENT -

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

I_MAXTLEVEL - Level of a hierarchy node

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

I_SEARCH_TEXT - Boolean

Data type: RS_BOOL
Default: RS_C_TRUE
Optional: Yes
Call by Reference: Yes

I_SEARCH_KEY - Boolean

Data type: RS_BOOL
Default: RS_C_TRUE
Optional: Yes
Call by Reference: Yes

I_WITH_RESTNODE - Find in Remainder?

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

EXPORTING Parameters details for RSDM_F4_GET_SEARCH_TREE

E_T_SEARCH_RESULT -

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

E_T_HIERNODE -

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

EXCEPTIONS details

X_MESSAGE - X Message

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for RSDM_F4_GET_SEARCH_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_hierkey  TYPE RSD_SID, "   
lv_x_message  TYPE RSD_SID, "   
lv_e_t_search_result  TYPE RSDM4_T_NODEKEY, "   
lv_i_pattern  TYPE RS_TXTLG, "   
lv_e_t_hiernode  TYPE RSDM4_T_HIERNODE, "   
lv_i_parent  TYPE RSDM4_NODEKEY, "   
lv_i_maxtlevel  TYPE RSTLEVEL, "   99
lv_i_search_text  TYPE RS_BOOL, "   RS_C_TRUE
lv_i_search_key  TYPE RS_BOOL, "   RS_C_TRUE
lv_i_with_restnode  TYPE RS_BOOL. "   RS_C_FALSE

  CALL FUNCTION 'RSDM_F4_GET_SEARCH_TREE'  "Provides Subtree That Corresponds to Search String
    EXPORTING
         I_HIERKEY = lv_i_hierkey
         I_PATTERN = lv_i_pattern
         I_PARENT = lv_i_parent
         I_MAXTLEVEL = lv_i_maxtlevel
         I_SEARCH_TEXT = lv_i_search_text
         I_SEARCH_KEY = lv_i_search_key
         I_WITH_RESTNODE = lv_i_with_restnode
    IMPORTING
         E_T_SEARCH_RESULT = lv_e_t_search_result
         E_T_HIERNODE = lv_e_t_hiernode
    EXCEPTIONS
        X_MESSAGE = 1
. " RSDM_F4_GET_SEARCH_TREE




ABAP code using 7.40 inline data declarations to call FM RSDM_F4_GET_SEARCH_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_maxtlevel) = 99.
 
DATA(ld_i_search_text) = RS_C_TRUE.
 
DATA(ld_i_search_key) = RS_C_TRUE.
 
DATA(ld_i_with_restnode) = RS_C_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!