Using SAPscript Symbols

You can use SAPscript symbols to include program or system data or predefined texts in your document.

To use a symbol, enter the name of the symbol in your text enclosed in & characters :

&DATE&

You can insert a symbol anywhere in your text. When you print or display your document, SAPscript substitutes the current value of the symbol for the symbol name in your document.

If you do not know the name of a symbol, choose Include ® Symbols to find the symbols available and select one. In this case, you can also specify how to process and format the symbol (pushbutton OPTIONS).

You can use the DATE symbol to have the current date inserted in your document when the document is displayed or printed. You set symbols off from normal text by enclosing the symbol name in ampersands (&):

For example, Walldorf, &DATE& is displayed or printed as Walldorf, 08.08.1998. The exact date formatting depends on the option set in System ® User profile ® Fixed values.

If you choose Include ® Symbol to insert a symbol into your text, the system automatically supplies the & characters.

Using the Four Types of Symbols

SAPscript offers four types of symbols that draw their values from different sources. These symbols are system symbols, program symbols, standard SAPscript symbols, and local text symbols. You access each type of symbol by way of a different Include submenu.

Here is more information on each type of symbol:

System symbol

Contains

DATE

current date

DAY

day from current date

DEVICE

output device: PRINTER, SCREEN, TELEX, FAX

HOURS

hours from time of day

MINUTES

minutes from time of day

MONTH

month from current date

NAME_OF_MONTH

name of the month from current date

NEXTPAGE

page number of the next page

PAGE

page number of a SAPscript text

SECONDS

seconds from time of day

SPACE

blank

TIME

time of day

ULINE

underline

VLINE

vertical line

YEAR

year from current date

 

To access these symbols, choose Include ® Symbols ® Program.

PC Editor:

To include program symbols in the PC editor, see Inserting Program Symbols.

Standard symbols are language-dependent. If a symbol has been translated, then it is inserted in your document in the language that you have chosen for the document.

To access these symbols, choose Include ® Symbols ® Standard.

You can, for example, define a standard term or text passage once in your document and then include it where it is needed by way of its symbol name.

Define a text symbol with the DEFINE command:

/: DEFINE <symbolname>='Symbol text'

PC Editor

To enter the DEFINE command together with the desired symbol name, choose Edit ® Include command

Syntax: DEFINE &MYSYMBOL& = '100'

Line Editor

In the line editor, you must mark the command in the format tag column with /: :

The following line defines a symbol that you can use elsewhere in your text:

/: DEFINE &OBJECT&='my country'

The text God save &OBJECT& would be printed or displayed as God save my country.

For more information, see the documentation BC Style and Form Maintenance.

Once you have defined a text symbol, you can include it by typing its name into your text or by choosing Include ® Symbols ® Text.