SAP RS_FIND_REPLACE_GLOBAL Function Module for Global search in programs, components, screens, function modules etc.









RS_FIND_REPLACE_GLOBAL is a standard rs find replace global SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Global search in programs, components, screens, function modules etc. 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 find replace global FM, simply by entering the name RS_FIND_REPLACE_GLOBAL into the relevant SAP transaction such as SE37 or SE38.

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



Function RS_FIND_REPLACE_GLOBAL 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_FIND_REPLACE_GLOBAL'"Global search in programs, components, screens, function modules etc.
EXPORTING
* ACTUAL_INCLUDE = ' ' "
* REPLACESTRING_LENGTH = '0' "
* I_FIND_OR_REPLACE = 'FIND' "
* MONITOR_ACTIVATION = ' ' "
* ACTUAL_VERSION_NO = '0' "
* ACTUAL_IS_MODIFIABLE = 'X' "
OBJECTTYPE = "Object category: R/M/O/U/E/Y/T/F/G
* FINDSTRING = ' ' "Search string
FINDSTRING_LENGTH = "
* METHOD = ' ' "STRING/WORD/LITERAL/FORM/PBO/PAI/DATA/TABLES/...
* EXACT_SPELLING = ' ' "Search for exact spelling
* REPLACESTRING = ' ' "

IMPORTING
ACTUAL_INCL_MODIFIED = "
ACTUAL_CHANGED_MIN = "
ACTUAL_CHANGED_MAX = "

TABLES
OBJECTTAB = "Table of objects to be scanned
* ACTUAL_SOURCE = "

EXCEPTIONS
NOT_EXECUTED = 1 NOT_FOUND = 2
.



IMPORTING Parameters details for RS_FIND_REPLACE_GLOBAL

ACTUAL_INCLUDE -

Data type: SY-REPID
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

REPLACESTRING_LENGTH -

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

I_FIND_OR_REPLACE -

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

MONITOR_ACTIVATION -

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

ACTUAL_VERSION_NO -

Data type: TRDIR-VERN
Default: '0'
Optional: Yes
Call by Reference: No ( called with pass by value option)

ACTUAL_IS_MODIFIABLE -

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

OBJECTTYPE - Object category: R/M/O/U/E/Y/T/F/G

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

FINDSTRING - Search string

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

FINDSTRING_LENGTH -

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

METHOD - STRING/WORD/LITERAL/FORM/PBO/PAI/DATA/TABLES/...

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

EXACT_SPELLING - Search for exact spelling

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

REPLACESTRING -

Data type: RSEUR-TDREPLACE
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for RS_FIND_REPLACE_GLOBAL

ACTUAL_INCL_MODIFIED -

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

ACTUAL_CHANGED_MIN -

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

ACTUAL_CHANGED_MAX -

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

TABLES Parameters details for RS_FIND_REPLACE_GLOBAL

OBJECTTAB - Table of objects to be scanned

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

ACTUAL_SOURCE -

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

EXCEPTIONS details

NOT_EXECUTED -

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

NOT_FOUND - Search unsuccessful

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

Copy and paste ABAP code example for RS_FIND_REPLACE_GLOBAL 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_objecttab  TYPE STANDARD TABLE OF STRING, "   
lv_not_executed  TYPE STRING, "   
lv_actual_include  TYPE SY-REPID, "   SPACE
lv_actual_incl_modified  TYPE S38E-BUF_VARIED, "   
lv_replacestring_length  TYPE S38E, "   '0'
lv_i_find_or_replace  TYPE S38E, "   'FIND'
lv_monitor_activation  TYPE S38E, "   ' '
lv_not_found  TYPE S38E, "   
lt_actual_source  TYPE STANDARD TABLE OF S38E, "   
lv_actual_version_no  TYPE TRDIR-VERN, "   '0'
lv_actual_changed_min  TYPE SY-TABIX, "   
lv_actual_changed_max  TYPE SY-TABIX, "   
lv_actual_is_modifiable  TYPE SY, "   'X'
lv_objecttype  TYPE SY, "   
lv_findstring  TYPE SY, "   SPACE
lv_findstring_length  TYPE SY, "   
lv_method  TYPE SY, "   SPACE
lv_exact_spelling  TYPE SY, "   SPACE
lv_replacestring  TYPE RSEUR-TDREPLACE. "   SPACE

  CALL FUNCTION 'RS_FIND_REPLACE_GLOBAL'  "Global search in programs, components, screens, function modules etc.
    EXPORTING
         ACTUAL_INCLUDE = lv_actual_include
         REPLACESTRING_LENGTH = lv_replacestring_length
         I_FIND_OR_REPLACE = lv_i_find_or_replace
         MONITOR_ACTIVATION = lv_monitor_activation
         ACTUAL_VERSION_NO = lv_actual_version_no
         ACTUAL_IS_MODIFIABLE = lv_actual_is_modifiable
         OBJECTTYPE = lv_objecttype
         FINDSTRING = lv_findstring
         FINDSTRING_LENGTH = lv_findstring_length
         METHOD = lv_method
         EXACT_SPELLING = lv_exact_spelling
         REPLACESTRING = lv_replacestring
    IMPORTING
         ACTUAL_INCL_MODIFIED = lv_actual_incl_modified
         ACTUAL_CHANGED_MIN = lv_actual_changed_min
         ACTUAL_CHANGED_MAX = lv_actual_changed_max
    TABLES
         OBJECTTAB = lt_objecttab
         ACTUAL_SOURCE = lt_actual_source
    EXCEPTIONS
        NOT_EXECUTED = 1
        NOT_FOUND = 2
. " RS_FIND_REPLACE_GLOBAL




ABAP code using 7.40 inline data declarations to call FM RS_FIND_REPLACE_GLOBAL

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 REPID FROM SY INTO @DATA(ld_actual_include).
DATA(ld_actual_include) = ' '.
 
"SELECT single BUF_VARIED FROM S38E INTO @DATA(ld_actual_incl_modified).
 
DATA(ld_replacestring_length) = '0'.
 
DATA(ld_i_find_or_replace) = 'FIND'.
 
DATA(ld_monitor_activation) = ' '.
 
 
 
"SELECT single VERN FROM TRDIR INTO @DATA(ld_actual_version_no).
DATA(ld_actual_version_no) = '0'.
 
"SELECT single TABIX FROM SY INTO @DATA(ld_actual_changed_min).
 
"SELECT single TABIX FROM SY INTO @DATA(ld_actual_changed_max).
 
DATA(ld_actual_is_modifiable) = 'X'.
 
 
DATA(ld_findstring) = ' '.
 
 
DATA(ld_method) = ' '.
 
DATA(ld_exact_spelling) = ' '.
 
"SELECT single TDREPLACE FROM RSEUR INTO @DATA(ld_replacestring).
DATA(ld_replacestring) = ' '.
 


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!