Start of Content Area

TEXT_SYMBOL_REPLACE   Locate the document in its SAP Library structure

The function module replaces the symbols contained in the text lines with their respective values. The text is not formatted for printing, but the symbols are replaced in the ITF format. Symbols that occur on comment or raw lines remain unchanged, as well as symbols enclosed by the character formats <(> and <)>.

The system interprets DEFINE statements in text lines and changes the values of text symbols accordingly. It also executes the control statements SET DATE MASK, SET TIME MASK, SET SIGN LEFT, and SET SIGN RIGHT.

 

Function call:

 

CALL FUNCTION 'TEXT_SYMBOL_REPLACE'

EXPORTING

ENDLINE = 99999

HEADER =

INIT = ' '

OPTION_DIALOG = ' '

PROGRAM = SPACE

REPLACE_PROGRAM = 'X'

REPLACE_STANDARD = 'X'

REPLACE_SYSTEM = 'X'

REPLACE_TEXT = 'X'

STARTLINE = 1

IMPORTING

CHANGED =

NEWHEADER =

TABLES

LINES =

 

Export parameters:

ENDLINE

Enter the index of the last text line on which to execute the function module. If you omit the parameter or specify an invalid value, the system ends with the last text table line.

Reference field: SY-TABIX

Default value: 99999

HEADER

The parameter contains the header of the text module whose symbols you want to replace.

Structure: THEAD

INIT

Use INIT to specify whether you want to initialize the symbol administration of SAPscript before replacing.

Possible values:

'X' initialize

' ' do not initialize

Default value: ' '

OPTION_DIALOG

The parameter determines whether to display a dialog box before replacing, where the user can select the symbol types to be replaced.

Possible values:

'X' display dialog box

' ' do not display dialog box

Default value: ' '

PROGRAM

Use this parameter to determine the program whose work areas the system uses to replace the values of the program symbols. If you omit this parameter, the system uses the first program called to search for the field values (SY-CPROG).
This assignment is valid for the current call of the funtion module only.

Reference field: SY-REPID

Default value: SPACE

REPLACE_PROGRAM

The parameter specifies whether to resolve program symbols during replacing.

Possible values:

'X' replace program symbols

' ' do not replace program symbols

Default value: 'X'

REPLACE_STANDARD

This parameter specifies whether to resolve standard symbols during replacing.

Possible values:

'X' replace standard symbols

' ' do not replace standard symbols

Default value: 'X'

REPLACE_SYSTEM

The parameter specifies whether to resolve system symbols during replacing. The system symbols &PAGE& and &NEXTPAGE& are not replaced, since the text is not formatted for printing.

Possible values:

'X' replace system symbols

' ' do not replace system symbols

Default value: 'X'

REPLACE_TEXT

The parameter specifies whether to resolve text symbols during replacing.

Possible values:

'X' replace text symbols

' ' do not replace text symbols

Default value: 'X'

STARTLINE

Enter the index of the table line from which to start the function module. If you omit the parameter or specify an invalid value, the system starts on the first text table line.

Reference field: SY-TABIX

Default value: 1

 

Import parameters:

CHANGED

The parameter indicates whether the symbols were replaced with their respective values, thus changing the contents of the text table.

Possible values:

'X' symbols replaced

' ' symbols not replaced

NEWHEADER

The parameter returns the text header with the fields changed according to the executed action.

Structure: THEAD

 

Table parameters:

LINES

The table contains the text lines, in which to replace the SAPscript symbols.

Structure: TLINE