SAP REPORT_TEXT_REPLACE_STRING Function Module for









REPORT_TEXT_REPLACE_STRING is a standard report text replace string 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 report text replace string FM, simply by entering the name REPORT_TEXT_REPLACE_STRING into the relevant SAP transaction such as SE37 or SE38.

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



Function REPORT_TEXT_REPLACE_STRING 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 'REPORT_TEXT_REPLACE_STRING'"
EXPORTING
APPLICATION = "Application
* LANGU = SY-LANGU "Language
* REPORTING_TABLE = ' ' "
* EDIT_PROGRAM = ' ' "
* MF_DATE = SY-DATLO "Master Data Date
* I_INIT = "General Flag
* I_MAX_RECURSIONS = 0 "

CHANGING
C_STRING = "

TABLES
* COMMON_SYMBOLS = "Structure for Standard Text Variables
* FIELDS = "Fields for Text Variables
* VARIABLES = "Report Variables for Text Variables

EXCEPTIONS
INVALID_APPLICATION = 1
.



IMPORTING Parameters details for REPORT_TEXT_REPLACE_STRING

APPLICATION - Application

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

LANGU - Language

Data type: SY-LANGU
Default: SY-LANGU
Optional: Yes
Call by Reference: Yes

REPORTING_TABLE -

Data type: RTXCS-REP_TABLE
Default: SPACE
Optional: Yes
Call by Reference: Yes

EDIT_PROGRAM -

Data type: SY-REPID
Default: SPACE
Optional: Yes
Call by Reference: Yes

MF_DATE - Master Data Date

Data type: SY-DATLO
Default: SY-DATLO
Optional: Yes
Call by Reference: Yes

I_INIT - General Flag

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

I_MAX_RECURSIONS -

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

CHANGING Parameters details for REPORT_TEXT_REPLACE_STRING

C_STRING -

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

TABLES Parameters details for REPORT_TEXT_REPLACE_STRING

COMMON_SYMBOLS - Structure for Standard Text Variables

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

FIELDS - Fields for Text Variables

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

VARIABLES - Report Variables for Text Variables

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

EXCEPTIONS details

INVALID_APPLICATION -

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

Copy and paste ABAP code example for REPORT_TEXT_REPLACE_STRING 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_c_string  TYPE C, "   
lv_application  TYPE APPLCLASS, "   
lt_common_symbols  TYPE STANDARD TABLE OF RTXCSYMS, "   
lv_invalid_application  TYPE RTXCSYMS, "   
lv_langu  TYPE SY-LANGU, "   SY-LANGU
lt_fields  TYPE STANDARD TABLE OF RTXFLDS, "   
lt_variables  TYPE STANDARD TABLE OF RTXVARS, "   
lv_reporting_table  TYPE RTXCS-REP_TABLE, "   SPACE
lv_edit_program  TYPE SY-REPID, "   SPACE
lv_mf_date  TYPE SY-DATLO, "   SY-DATLO
lv_i_init  TYPE FLAG, "   
lv_i_max_recursions  TYPE I. "   0

  CALL FUNCTION 'REPORT_TEXT_REPLACE_STRING'  "
    EXPORTING
         APPLICATION = lv_application
         LANGU = lv_langu
         REPORTING_TABLE = lv_reporting_table
         EDIT_PROGRAM = lv_edit_program
         MF_DATE = lv_mf_date
         I_INIT = lv_i_init
         I_MAX_RECURSIONS = lv_i_max_recursions
    CHANGING
         C_STRING = lv_c_string
    TABLES
         COMMON_SYMBOLS = lt_common_symbols
         FIELDS = lt_fields
         VARIABLES = lt_variables
    EXCEPTIONS
        INVALID_APPLICATION = 1
. " REPORT_TEXT_REPLACE_STRING




ABAP code using 7.40 inline data declarations to call FM REPORT_TEXT_REPLACE_STRING

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 LANGU FROM SY INTO @DATA(ld_langu).
DATA(ld_langu) = SY-LANGU.
 
 
 
"SELECT single REP_TABLE FROM RTXCS INTO @DATA(ld_reporting_table).
DATA(ld_reporting_table) = ' '.
 
"SELECT single REPID FROM SY INTO @DATA(ld_edit_program).
DATA(ld_edit_program) = ' '.
 
"SELECT single DATLO FROM SY INTO @DATA(ld_mf_date).
DATA(ld_mf_date) = SY-DATLO.
 
 
 


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!