cancel
Showing results for 
Search instead for 
Did you mean: 

SAPSCRIPT symbols

Former Member
0 Kudos

hi,

what are the different types of SAPSCRIPT symbols?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

hi,

Symbols are placeholders for values that are inserted during print formatting.

Symbols are indentified by name surrounded by "&" and are not case sensitive

Types of symbols :

System symbols

DATE Date

DAY Day

NAME_OF_DAY Name of day

MONTH Month

YEAR Year

TIME Time

HOURS Hours

MINUTES Minutes

SECONDS Seconds

PAGE Page number

NEXTPAGE Number of next pagre

DEVICE Output device

SPACE Blank space

ULINE Underline

VLINE Vertical line

Standard symbols :

Standard symbols are user defined and are maintained in table TTDG. You use transaction SM30 to change or display standard symbols.

An examples of standard symbols is &MFG&

Program symbols :

Program symbols are for contents of database fields or global program symbols. When you print the form, data from the database tables are

printed instead of the symbols.

In the print program:

TABLES: kna1.

In the form:

&KNA1-NAME1&

Text symbols: All the symbols, which do not correspond to one of three types of symbol are described above are Text symbols.

Edited by: Rajyalakshmi Attili on May 22, 2008 5:39 PM

Former Member
0 Kudos

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 symbols draw their values from global SAP System variables.

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

Program symbols draw data from tables in the program that you need to retrieve the data for the SAPscript document you want to print. In addition, you can include all globally defined data as program symbols. Therefore, the tables must be defined in the ABAP Dictionary. This type of symbol is used to make data from the SAP applications available in such SAPscript documents as checks and correspondence.

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 maintained centrally in SAPscript (table TTDTG) and are available in all SAPscript documents. They generally contain static texts. For example, symbol &SGDH& is defined with the text "Dear Ladies and Gentlemen."

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.

Text symbols are defined locally in your own document and are usable only in the document in which they are defined.

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 Text.

Reward Points, if helpful.

Regards

- Rishika Bawa

Former Member
0 Kudos

Hi,

Welcome To SDN!!.

Check this

https://forums.sdn.sap.com/click.jspa?searchID=12068513&messageID=5379943

Regards

Kiran Sure

Former Member
0 Kudos

Hi,

A variable in SAPscript is called a symbol. There are the following types.

u2022 System symbol (e.g. the number of the current page)

u2022 Standard symbol (usable in any document)

u2022 Program symbol (value from the print program)

u2022 Text symbol (u201Clocal variableu201D)

The value of a symbol is text for using within SAPscript code and is represented by the symbol-name enclosed by ampersands. On seeing the tell-tale ampersands in SAPscript code, you sometimes need to figure out the symbol type.

goto any PAGEWINDOW's Text elements in Script (SE71)

from the Menu-> INSERT-> Symbols

you find all symbols here

System symbols

System symbols in a SAPscript form are comparable to system fields like SY-UZEIT in an ABAP program, and include these. The graphical editor offers three types of system symbol.

1. General system symbols

See the table TTSXY. PAGE is the most widely used. The list given in our BC460 training manuals is out of date.

2. SAPscript system symbols

See the dictionary structure SAPSCRIPT. SAPSCRIPT-FORMPAGES is the most widely used.

3. ABAP system symbols

For the ABAP system field SY-UNAME, say, the symbol is SYST-UNAME. http://SYST is the dictionary structure for ABAP system fields.

Sample code:

User: &SYST-UNAME&

Page &PAGE& of &SAPSCRIPT-FORMPAGES(C3)&

Standard symbols

Standard symbols are maintained centrally (in the table TTDTG via transaction SE75) for use in any document. Menu path:

Tools

Form Printout

Administration

Settings

Some standard symbols are SAP-standard and others are custom. Curiously, table TTDTG is cross-client although SAPscript forms are not.

The value of a standard symbol has to be defined for each language used. This gives a way to make a single SAPscript form multi-lingual.

We can take advantage to an extent of the central maintenance, though there is no guarantee that the available standard symbols will used in every appropriate context.

Standard symbols complicate searching a SAPscript form, since text like u2018Charity registration 211581u2019 may be hiding in a standard symbol.

Text symbols

A text symbol is declared and assigned to within the SAPscript code, and so obviously applies only to the current document. The command DEFINE is used, requiring /: in the tag column, as in the following examples.

/: DEFINE &COMP_NAME& = u2018University of Warwicku2019

/: DEFINE &WS_RATE& = &TAX_SUMM_C&

SCRIPT COMMANDS

ADDRESS : Formatting of Address

BOTTOM, ENDBOTTOM : Define Footer text in a window

BOX, POSITION, SIZE : Boxes, Lines and Shading

CASE, ENDCASE : Case Distinction

DEFINE : Value assignment to text symbols

HEX, ENDHEX : Hexadecimal values

IF, ENDIF : Conditional text output

INCLUDE : Include other texts

NEW-PAGE : Explicit forms feed

NEW-WINDOW : Next window main

PRINT-CONTROL : Insert print control character

PROTECT...ENDPROTECT : Protect from page break

RESET : Initialize outline paragraphs

SET COUNTRY : Country-specific formating

SET DATE MASK : Formating of date fields

SET SIGN : Position of +/- sign

SET TIME MASK : Formating of time fields

STYLE : Change style

SUMMING : Summing variables

TOP : Set header text in window MAIN

CHECK

Regards,

Shiva Kumar