SAP RS_EDTR_REPLACE2 Function Module for
RS_EDTR_REPLACE2 is a standard rs edtr replace2 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 edtr replace2 FM, simply by entering the name RS_EDTR_REPLACE2 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_EDTR_REPLACE2 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_EDTR_REPLACE2'".
EXPORTING
* ACTUAL_INCLUDE = ' ' "file just edited
* DDICTABLE = ' ' "Type of objects in OBJECTTAB
* ACTUAL_LINE = '000000' "Type of objects in OBJECTTAB
* CONFIRM = 'X' "
* DYNPRO_PART = 'B' "'L'-flow logic / 'F'-field list / B-both
* EXACT_SPELLING = ' ' "Type of objects in OBJECTTAB
* FINDSTRING = ' ' "Search string
* METHOD = ' ' "
OBJECTTYPE = "Category of the objects: R/M/O/U/E/Y/T/F/G
* REPLACESTRING = ' ' "Type of objects in OBJECTTAB
TABLES
OBJECTTAB = "Table of the objects to be scanned
EXCEPTIONS
NOT_EXECUTED = 1 NOT_FOUND = 2
IMPORTING Parameters details for RS_EDTR_REPLACE2
ACTUAL_INCLUDE - file just edited
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DDICTABLE - Type of objects in OBJECTTAB
Data type: DD02L-TABNAMEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ACTUAL_LINE - Type of objects in OBJECTTAB
Data type:Default: '000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
CONFIRM -
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
DYNPRO_PART - 'L'-flow logic / 'F'-field list / B-both
Data type:Default: 'B'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXACT_SPELLING - Type of objects in OBJECTTAB
Data type:Default: SPACE
Optional: Yes
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)
METHOD -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJECTTYPE - Category of the objects: R/M/O/U/E/Y/T/F/G
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
REPLACESTRING - Type of objects in OBJECTTAB
Data type: RSTXP-TDREPLACEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RS_EDTR_REPLACE2
OBJECTTAB - Table of the objects to be scanned
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_EXECUTED - Type of objects in OBJECTTAB
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_FOUND - Search was unsuccessful
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RS_EDTR_REPLACE2 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 STRING, " SPACE | |||
| lv_ddictable | TYPE DD02L-TABNAME, " SPACE | |||
| lv_not_found | TYPE DD02L, " | |||
| lv_actual_line | TYPE DD02L, " '000000' | |||
| lv_confirm | TYPE DD02L, " 'X' | |||
| lv_dynpro_part | TYPE DD02L, " 'B' | |||
| lv_exact_spelling | TYPE DD02L, " SPACE | |||
| lv_findstring | TYPE DD02L, " SPACE | |||
| lv_method | TYPE DD02L, " SPACE | |||
| lv_objecttype | TYPE DD02L, " | |||
| lv_replacestring | TYPE RSTXP-TDREPLACE. " SPACE |
|   CALL FUNCTION 'RS_EDTR_REPLACE2' " |
| EXPORTING | ||
| ACTUAL_INCLUDE | = lv_actual_include | |
| DDICTABLE | = lv_ddictable | |
| ACTUAL_LINE | = lv_actual_line | |
| CONFIRM | = lv_confirm | |
| DYNPRO_PART | = lv_dynpro_part | |
| EXACT_SPELLING | = lv_exact_spelling | |
| FINDSTRING | = lv_findstring | |
| METHOD | = lv_method | |
| OBJECTTYPE | = lv_objecttype | |
| REPLACESTRING | = lv_replacestring | |
| TABLES | ||
| OBJECTTAB | = lt_objecttab | |
| EXCEPTIONS | ||
| NOT_EXECUTED = 1 | ||
| NOT_FOUND = 2 | ||
| . " RS_EDTR_REPLACE2 | ||
ABAP code using 7.40 inline data declarations to call FM RS_EDTR_REPLACE2
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_actual_include) | = ' '. | |||
| "SELECT single TABNAME FROM DD02L INTO @DATA(ld_ddictable). | ||||
| DATA(ld_ddictable) | = ' '. | |||
| DATA(ld_actual_line) | = '000000'. | |||
| DATA(ld_confirm) | = 'X'. | |||
| DATA(ld_dynpro_part) | = 'B'. | |||
| DATA(ld_exact_spelling) | = ' '. | |||
| DATA(ld_findstring) | = ' '. | |||
| DATA(ld_method) | = ' '. | |||
| "SELECT single TDREPLACE FROM RSTXP INTO @DATA(ld_replacestring). | ||||
| DATA(ld_replacestring) | = ' '. | |||
Search for further information about these or an SAP related objects