Sap Script
Sap Script
Sap Script
Appendix :B Contents
Overview................................................................................................................ A–3
Overview of SAPscript Control Commands........................................................A–4
Overview of Formatting Options..........................................................................A–5
Syntax of Control Commands..............................................................................A–6
ADDRESS: Formatting of addresses......................................................................A–6
BOTTOM: Define footer text in a window................................................................A–8
BOX, POSITION, SIZE: Boxes, lines, shading........................................................A–9
CASE: Case distinction......................................................................................... A–12
DEFINE: Value assignment to text symbols..........................................................A–13
HEX: Hexadecimal Data........................................................................................ A–13
IF: Conditional text output.....................................................................................A–14
INCLUDE: Include other texts...............................................................................A–16
NEW-PAGE: Explicit form feed..............................................................................A–17
NEW-WINDOW: Next window MAIN.....................................................................A–18
PERFORM: Calling ABAP Subroutines.................................................................A–18
PRINT-CONTROL: Insert print control character...................................................A–19
PROTECT: Protect from page break.....................................................................A–20
RESET: Initialize outline paragraphs.....................................................................A–21
SET COUNTRY: Country-specific formatting........................................................A–22
SET DATE MASK: Formatting of date fields..........................................................A–23
SET SIGN: The Position of +/-...............................................................................A–24
SET TIME MASK: Formatting of time fields...........................................................A–24
STYLE: Change style............................................................................................ A–25
SUMMING............................................................................................................. A–25
TOP: Set header text in MAIN...............................................................................A–25
Overview
Formatting options format variables and override the format described in the Dictionary. Formatting
options are always specified within &-& variable brackets.
SAPscript control commands are entered, changed, or deleted in the SAPscript editor in the
same way as other text lines. However, they differ from normal lines in the following ways:
In the tag column, indicate control commands with the paragraph format /:
Enter the command in the line.
All key words and specifications, not defined in quotes as literal, are automatically
converted to upper case.
Enter the complete control command and the necessary parameters on one line.
Enter only one control command per line.
Editor formatting does not affect lines with control commands.
If the control command is unknown or syntactically incorrect, the command line is treated
as a comment line, and is not interpreted or printed.
Some of the control commands are global settings, which are valid until they
are explicitly switched off. Therefore it is important to know that, on a page,
the MAIN window is always processed first. For example, if you want to set
the date format with the control command SET DATE FORMAT and this
format must be valid for the entire form, then specify this command at the
top of MAIN.
Syntax:
/: ADDRESS [DELIVERY] [PARAGRAPH a] [PRIORITY p] [LINES l]
/: TITLE title
/: NAME name1[,name2[,name3[,name4]]]
/: STREET street
/: POBOX PO box [CODE zip code]
/: POSTCODE zip code
/: CITY town1[,town2]
/: REGION region
/: COUNTRY country
/: FROMCOUNTRY from country
/: ENDADDRESS
Both formatting data and address data are parameters. Address data is formatted for output based on the
COUNTRY, PRIORITY and LINES parameters. As the default, the P.O. Box is used, if it is available, rather
than the street address.
DELIVERY defines the street address.
If this parameter is selected, the system prints the street address on the layout output instead of the
P.O. Box.
PARAGRAPH defines in which paragraph format the address is output.
If the parameter is not defined, the address is output in the default paragraph format.
PRIORITY defines which address lines can be omitted if there is not enough space on the output.
You can enter a combination of the following values:
A form of address
P mandatory blank line 1
Q mandatory blank line 2
2 name2
3 name3
4 name4
L country name
S line for the street
O line for the city
LINES define how many lines are available to format the address.
If the address data cannot be completely formatted due to an insufficient number of lines, the data
entered in the parameter PRIORITY is omitted. If the LINES specification is missing and this command
is in a form window whose type is not MAIN, the lines available for the address layout are
automatically calculated with the current output line item and window size.
TITLE is a required form of address.
NAME means that up to four separate names, separated by commas, can be defined.
STREET means the street specification, including address number.
POBOX is the Post Office box number.
CODE is the P.O. box, postal, or zip code, if this code is different from the postal code of the city.
POSTCODE is city’s postal, or zip, code.
CITY means that up to two place names can be defined.
REGION determines the administrative area.
COUNTRY specifies the country based on specific postal standards and the address format.
FROMCOUNTRY defines in which language the destination country’s name is formatted. In EEC
countries, only the international country identification letter is placed, with a hyphen, before the postal
code.
Example:
/: ADDRESS
/: TITLE ‘Company’
/: NAME ‘Widget Technology, Inc.’, ‘All Kind of Widgets’
/: STREET ‘1005 Lido Lane’
/: POBOX ‘2935’ CODE ‘94400’
/: POSTCODE ‘94404’
/: CITY ‘Foster City’
/: REGION ‘CA’
/: COUNTRY ‘USA’
/: FROMCOUNTRY ‘USA’
/: ENDADDRESS
This list generates the following address:
Company
Widget Technology, Inc.
All Kind of Widgets
PO box 2935
Foster City, CA 94400
If the DELIVERY supplement is specified for the ADDRESS command, then the street, not
the P.O. Box, is entered.
Company
Widget Technology, Inc.
All Kind of Widgets
1005 Lido Lane
Foster City, CA 94404
Example:
Erro! Estilo não definido. Erro! Estilo não definido.
Erro! Estilo não definido.
/: BOX FRAME 10 TW
Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT).
/: BOX INTENSITY 10
Fills the window background with shadowing having a gray scale of 10 %.
/: BOX HEIGHT 0 TW FRAME 10 TW
Draws a horizontal line across the complete top edge of the window.
/: BOX WIDTH 0 TW FRAME 10 TW
Draws a vertical line along the complete height of the left hand edge of the window.
/: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15
/: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW
/: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
/: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
Draws two rectangles and two lines to construct a table of three columns with a
highlighted heading.
POSITION
Syntax:
/: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
This command sets the origin for the coordinate system used by the XPOS and YPOS parameters of the
BOX command. When a window is first started, the POSITION value is set to refer to the upper left corner
of the window (default setting). If a parameter value does not have a leading sign, then its value is
interpreted as an absolute value, which is a value that specifies an offset from the upper-left corner of the
output page. If a parameter value is specified with a leading sign, then the new value of the parameter is
calculated relative to the old value. If a parameter specification is missing, then this parameter is
unchanged.
XORIGIN, YORIGIN is the origin of the coordinate system.
WINDOW sets the values for the left and upper edges to be the same of those of the current window
(default setting).
PAGE sets the values for the left and upper edges to be the same as the current output page (XORIGIN
= 0 cm, YORIGIN = 0 cm).
Example:
/: POSITION WINDOW
Sets the origin for the coordinate system to the upper-left corner of the window.
/: POSITION XORIGIN 2 CM YORIGIN '2.5 CM'
Sets the origin for the coordinate system to a point 2 cm from the left edge and 2.5 cm
from the upper edge of the output page.
/: POSITION XORIGIN '-1.5' CM YORIGIN -1 CM
Shifts the origin for the coordinates 1.5 cm to the left and 1 cm up.
SIZE
Syntax:
/: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
This command sets the values of the WIDTH and HEIGHT parameters used in the BOX command. When a
window is first started, the SIZE value is set to the same values as the window (default setting). If one of
the parameter specifications is missing, then no change is made to its current value. If a parameter value
does not have a leading sign, then its value is interpreted as an absolute value. If a parameter value is
specified with a leading sign, then the new value of the parameter is calculated relative to the old value.
WIDTH, HEIGHT sets the dimensions of the rectangle or line.
WINDOW sets the values for the width and height relative to the values of the current window (default
setting).
PAGE sets the values for the width and height to the values of the current output page.
Example:
/: SIZE WINDOW
Sets WIDTH and HEIGHT to the current window dimensions.
/: SIZE WIDTH '3.5' CM HEIGHT '7.6' CM
Sets WIDTH to 3.5 cm and HEIGHT to 7.6 cm.
/: POSITION WINDOW
/: POSITION XORIGIN -20 TW YORIGIN -20 TW
/: SIZE WIDTH +40 TW HEIGHT +40 TW
/: BOX FRAME 10 TW
A frame is added to the current window. The frame edges extends beyond the window
itself, to avoid obscuring the leading and trailing text characters.
Erro! Estilo não definido. Erro! Estilo não definido.
Erro! Estilo não definido.
The assigned value may have a maximum of 60 characters, but it can also contain more symbols. When a
symbol is defined using DEFINE, symbols which occur in the value are not immediately replaced by their
value. They are replaced only when the target symbol is output.
If operator := is used in DEFINE, the symbols that occur in the value to be assigned are immediately
replaced by their current values. The resulting character string is only then assigned to the target symbol
when all occurring symbols have been replaced. The length of the value is limited to 80 characters, and the
target symbol must be a text symbol.
Syntax:
/: DEFINE &symbolname& := ‘value’
Example:
/* Creator: report ZQVNTE30 date 19940705 time 125129 user SAPSCRIPT
/= 1B2A7230461B2A743735521B2A7231411B2A62304D1B2A62343057FFFFFFFFFFFF
/= FF1B2A62343057FFFFFFFFFFFFC0007D00DFC0F7D0000000000000000000000017
/: ENDHEX
This data will be printed only by an HP PCL printer (7.5 cm of space will allocated on the page
for the output of the data and the output cursor will be indented 2.25 cm to the right of the
form window edge).
The RSTXLDMC program uploads correctly formatted pixel data to the R/3
system and prepares it as a HEX-ENDHEX control command. This data can
then be saved as normal SAPscript text.
= or EQ equals
< or LT less than
> or GT greater than
<= or LE less than or equal to
>= or GE greater than or equal to
<> or NE not equal
The sequence of processing the logical operations and the sequence of processing the conditions is always
from left to right. There is no order of binding, and bracketing is not allowed.
Comparison is always carried out as a literal comparison, that is, symbols are compared in their formatted
form as a character string and not with their internal representation. This comparison must be taken into
account for program symbols whose format depends on different parameters. Examples include currency
fields that are output with different number of places after the decimal point depending on the currency
key, or that use a comma or a period as the decimal separator depending on the setting.
The IF command can be extended to make a two-sided case distinction with the ELSE command. If the
specified IF condition is true, then the lines listed between IF and ELSE are formatted, otherwise the lines
between ELSE and ENDIF are formatted.
Syntax:
/: IF Condition
:
/: ELSE
:
/: ENDIF
A multi-level case distinction is possible using the ELSEIF command.
Syntax:
/: IF Condition
:
/: ELSEIF Condition
:
/: ELSE
:
/: ENDIF
Erro! Estilo não definido. Erro! Estilo não definido.
Erro! Estilo não definido.
You can use as many ELSEIF commands as required. The specification of an ELSE command is optional in
this case.
The condition must not extend over several lines, and must be contained
in one line with the IF or ELSEIF command.
IF commands can also be nested.
An IF command must always end with ENDIF. If this command is
forgotten, and if the condition is not true, nothing more is output after
the IF command.
If a syntax error is found when interpreting these commands, the
corresponding command is not executed. This can have various effects
on the following text output. If, for example, the IF statement is
incorrectly structured, since IF is missing, the following ELSEIF or ELSE
commands are ignored. All lines are output.
Example:
/: INCLUDE MYTEXT
The text MYTEXT is included in the language of the calling text.
/: INCLUDE MYTEXT LANGUAGE ‘E’ PARAGRAPH ‘A1’
The text with the name MYTEXT and the language E is included, regardless of the
language in which the calling text is created. The paragraph format A1 is valid as the
standard paragraph for this call.
Optional specifications:
49. LANGUAGE
If a language is unspecified, the calling text’s language or the form is set for the text to be included. If a
language is specified, the text is always loaded in this language, regardless of the language of the
calling text.
50. PARAGRAPH
The text to be included is formatted with its style allocation. With this parameter, the standard
paragraph of this style can be redefined for the current call. All * paragraphs of the inserted text are
formatted with the paragraph specified here.
51. NEW-PARAGRAPH
The first line of the included text has this format flag, provided it is not a command or comment line. If
the optional entry PARAGRAPH (see above) is empty, all * paragraphs of the included text are
formatted with the paragraph np specified with NEW-PARAGRAPH.
52. OBJECT
To completely specify a text, create additional specifications about the text object. There are different
rules and restrictions for this specification that depends on the calling text’s object type. All texts can be
included in a form. If no object is entered here, TEXT is used (standard texts). With a documentation
text (object DOKU), you can only include documentation texts. This object is assumed even if no object
is specified in this environment.
Only hypertext or documentation text can be included into a hypertext (object DSYS). If the OBJECT
specification is missing, DSYS is set as a default value.
Only standard text (object TEXT), documentation text or hypertext can be included in any other type of
text. The default object is TEXT if nothing is entered.
53. ID
The text ID allows further text types within an object, is a further part of the text key. If the ID is not
entered, the default Include ID from table TTXID is used to call text. If the specification is not in this
table, the text ID of the calling text is used.
The ID and the object are now the basis of a further consistency check:
All text IDs are allowed for a form.
Only documentation texts with the text IDs TX (general texts), UO (authorization objects), and
documentation texts (with the same text ID as the calling documentation text) may be included in
documentation texts.
All DSYS texts may be included in DSYS texts, regardless of their ID. Documentation texts that will be
inserted may only have IDs TX and UO.
Standard texts with the allowed text IDs, DSYS texts with IDs, and documentation texts with IDs TX
and UO may be included in the text types.
Example:
/: NEW-PAGE
The current page is completed and the text in the following lines is written on the next
page as determined in the form.
/: NEW-PAGE S1
Same as before, but S1 is accessed as the next page.
If an explicitly specified page for NEW-PAGE is not in the form, this page
specification is ignored. Make sure that there are no blank lines immediately
before a NEW-PAGE command. If an implicit form feed was carried out
within these blank lines, this step could lead to an unwanted empty page
being printed.
Example:
From within a SAPscript form, a subroutine GET_BARCODE in the ABAP program
QCJPERFO is called. Then the simple barcode contained there (‘First page’, ‘Next page’,
‘Last page’) is printed as local variable symbol.
After performing PRINT-CONTROL, SAPscript inserts a blank at the start of the following line. If this is not
required, this line must have the paragraph format “=.”
PROTECT: Protect from page break
You can determine whether a paragraph should or should not be separated by a page break in the style or
form. If the attribute page protection is set, then all the lines of this paragraph are always output together
on one page. This attribute is linked to the respective paragraph.
It is not beneficial to provide all paragraphs with a page protection attribute to neutralize unwanted page
breaks. This event is too dynamic and only results from the current text. Furthermore, you may also want
to protect only parts of a paragraph from a page break.
In principle, this problem could be solved with NEW-PAGE by explicitly starting a new page before the
affected parts of the text. However, it is complicated to change this procedure. Using NEW-PAGE, if your
text is formatted to have no unwanted page breaks, and new lines are inserted and existing ones are
deleted, the NEW-PAGE commands inserted after this point will have to be checked and can result in the
movement of page breaks.
With the command pair PROTECT .. ENDPROTECT, SAPscript offers the option to individually define
protection from a page break. If you parenthesize text with these commands, SAPscript automatically
guarantees that all of its lines are printed on one page. If the lines fit on the current output page, they are
output there, as if PROTECT was not used. If, however, the space is not sufficient, PROTECT works like a
NEW-PAGE and generates a form feed.
So, you can view PROTECT/ENDPROTECT are conditional NEW-PAGE commands, that determine
whether the included lines fit into the current window MAIN or not.
Syntax:
/: PROTECT
:
:
/: ENDPROTECT
The lines to be protected lie between the two commands.
paragraph is entered in RESET, the numbering of this paragraph, is initialized with subordinate outline
levels.
Syntax:
/: RESET paragraph format
The paragraph format specifies the outline paragraph to be initialized.
Example:
Assume that paragraph N1 is defined in the style that you are using. This paragraph
should be used for listings and it each time generates an output of a list number. This is
the SAPscript editor:
AS If you want to work with the SAP R/3 System, proceed as
follows:
N1 Make sure that you have a PC
N1 Switch on the PC
N1 Click on the SAP icon.
AS The SAP logon screen appears. To log on, you must carry out the
following steps:
/: RESET N1
N1 Enter your user ID
N1 Enter your password
N1 Choose the application you require
Result:
If you want to work with the SAP R/3 System, proceed as follows:
1. Make sure that you have a PC
2. Switch on the PC
3. Click on the SAP icon.
The SAP logon screen appears. To log on, you must carry out the following steps:
1. Enter your user ID
2. Enter your password
3. Choose the application you require.
Example:
If the RESET command between the two lines in the previous example is missing, then
both of the listings would be sequentially numbered:
Result:
If you want to work with the SAP R/3 System, proceed as follows:
1. Make sure that you have a PC
2. Switch on the PC
3. Click on the SAP icon.
The SAP logon screen appears. To log on, you must carry out the following steps:
4. Enter your user ID
5. Enter your password
6. Choose the application you require.
Example:
/: SET COUNTRY ‘CAN’
/: SET COUNTRY &country key&
By entering an empty country name, you can return to the values set in the user master
record.
/: SET COUNTRY ‘ ‘
The corresponding ABAP command is called internally by SAPscript.
If the required formats are incorrect, check the settings in table T005X.
Syntax:
/: SET DATE MASK = ‘date mask’
In the date mask, the following edit formats can be used:
DD Day (two-digit)
DDD Day name abbreviated
DDDD Day name in full
MM Month (two-digit)
MMM Month name abbreviated
MMMM Month name in full
YY Year (two-digit)
YYYY Year (four-digit)
All other characters in the mask are interpreted as text and copied correspondingly.
Example:
By specifying an empty string as the date mask, you can switch back to the default display:
/: SET DATE MASK = ‘ ‘
The texts for the month and day names, shortened or in full, are stored language-dependently in table
TTDTG under the following arguments:
Argument Description
Example:
By specifying an empty string as a time mask, you can switch back to the default display:
/: SET TIME MASK = ‘ ‘
SUMMING
Program symbols can be added with the SUMMING command. The command needs to be defined only
once. Each time that the specified symbol is edited, its current value is added to the sum field. Several
program symbols can also be added in a sum field.
Syntax:
/:SUMMING program symbol INTO sum symbol
Since SAPscript can not dynamically define sum fields, the sum symbol must be in a calling program
structure that was declared with TABLES.
If the document window contains text, then the header text is effective
from the next page.
The same applies to deleting a header text. That is, a header text that has
already been output can no longer be canceled on the current page.
Only use header texts in texts that are not printed with application
programs, such as dunning texts and ordering texts. These application
programs can also work with header texts in the form interface, which
can lead to unwanted results.
Erro! Estilo não definido. Erro! Estilo não definido.
Erro! Estilo não definido.
Example:
Assume that &SAPSCRIPT-COUNTER_1& initially has the value 2.
&SAPSCRIPT-COUNTER_1& 2
&SAPSCRIPT-COUNTER_1(+)& 3
&SAPSCRIPT-COUNTER_1(-)& 2
&SAPSCRIPT-COUNTER_1(-)& 1
&SAPSCRIPT-COUNTER_1(+0)&
&SAPSCRIPT-COUNTER_1(+)& 3
Date Mask
To format date fields, use the SAPscript SET DATE MASK command. Executing this command causes all
subsequent date fields to be printed with the specified formatting.
Syntax
/: SET DATE MASK = 'date_mask'
The following table provides templates may be used in the date mask:
Template Description
Any other characters occurring in the mask are interpreted as simple text and are copied directly to the
output.
Erro! Estilo não definido. Erro! Estilo não definido.
Erro! Estilo não definido.
Example:
You can revert to the standard setting by using the SET DATE MASK command again with an empty
string in place of the date mask:
/: SET DATE MASK = ' '
Example:
In this example the PLMK-SOLLWERT field is assumed to have the value 123456.78 and
to be of data type FLTP.
&PLMK-SOLLWERT& +1.23456780000000E+05
&PLMK-SOLLWERT(E3)& +123.456780000000E+03
&PLMK-SOLLWERT(E6)& +0.12345678000000E+06
&PLMK-SOLLWERT(E0)& +123456.780000000
&PLMK-SOLLWERT(E)& +123456.780000000
Fill characters
Leading spaces in a value can be replaced with a fill character. The character immediately following the F
in the specification is used as the fill character.
Syntax:
&symbol(Ff)&
Example:
The figure for customer sales in the KNA1-UMSAT field is $700. The Dictionary
description of the field specifies an output length of eight.
&KNA1-UMSAT& 700.00
&KNA1-UMSAT(F*)& **700.00
&KNA1-UMSAT(F0)& 00700.00
Example:
&ITCDP-TDULPOS& 100.00-
&ITCDP-TDULPOS(<)& -100.00
The SET SIGN LEFT control command specifies that all subsequent symbols
with a numeric value should have a left-justified leading sign. Using this
control command means that there is then no need to repeat the < option for
each individual symbol.
Use the SET SIGN RIGHT control command to switch back to the default
setting to output the leading sign.
Number of decimals
A program symbol of one of the data types DEC, QUAN and FLTP can contain decimal place data. This
option overrides the Dictionary definition for the number of decimal places to format this symbol value.
Syntax:
&symbol(.n)&
Example:
The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies
three decimal places and an output length of 17.
&EKPO-MENGE& 1,234.560
&EKPO-MENGE(.1)& 1,234.6
&EKPO-MENGE(.4)& 1,234.5600
&EKPO-MENGE(.0)& 1,235
Offset
Specifying an offset of “n” causes the “n” left-most characters of the symbol value will not be displayed. If
the offset specified is greater than the length of the value, nothing is output.
Syntax:
&symbol+n&
Example:
Example:
Assuming the current date is 1/1/1994.
&DAY& 01
&DAY(Z)& 1
Example:
The ITCDP-TDULPOS field contains the value -100.00. The ABAP Dictionary definition for
this field includes a leading sign.
&ITCDP-TDULPOS& 100.00-
&ITCDP-TDULPOS(S)& 100.00
Example:
The EKPO-MENGE field contains the value 1234.56. The Data Dictionary definition
specifies three decimal places and the output length is set to 17.
&EKPO-MENGE& 1,234.560
&EKPO-MENGE(T)& 1234.560
Erro! Estilo não definido. Erro! Estilo não definido.
Erro! Estilo não definido.
Output length
If you need only a part of the symbol value, or if the output has to fit in an on-screen box or field without
overlapping the edges of this area, use an output length specification to define how many character
positions should be copied from the value.
If a length is specified that is greater than the current value length, then spaces are appended to the symbol
value.
The character * specifies the program symbol length. This specification causes the symbol value to be
output based on the output length defined in the ABAP Dictionary.
Syntax:
&symbol(l)&
Example:
The SYST-UNAME field contains the logon name of a user called Einstein. The ABAP
Dictionary entry for this field contains an output length of 12.
&SYST-UNAME&... Einstein...
&SYST-UNAME(9)&... Einstein ...
&SYST-UNAME(*)&... Einstein ...
Example:
The KNA1-PFACH field contains a customer PO Box number. Since “PO Box” is not
stored in the field with the value, you would normally write the following for the PO Box
line of an address:
PO Box &KNA1-PFACH&
However, if no “P.O. Box” has been specified then “PO Box” would still appear on its
own in the address. Prevent this step by using pretext and/or posttext (in this case
pretext).
PO Box &KNA1-PFACH& PO Box
&'PO Box 'KNA1-PFACH&
If “P.O. Box” is specified, then this information will be displayed with the appropriate
text in the usual way.
&'PO Box 'KNA1-PFACH& PO Box 123456
Right-justified output
Symbol values other than numeric values are normally formatted to be left-justified. Right-justified
formatting can be specified with the R option. This option has to be used with an output length
specification.
Syntax:
&symbol(R)&
Example:
If symbol has the value 1234.
&symbol& 1234
&symbol(8R)& 1234
Space compression
The symbol value is viewed as a sequence of “words,” each separated from the next by either one or a
string of space characters. The C option replaces each string of space characters with a single space and
Erro! Estilo não definido. Erro! Estilo não definido.
Erro! Estilo não definido.
shifting “words” to the left to close gaps. Leading spaces are completely removed. The results are the same
as if the ABAP command CONDENSE was used.
Syntax:
&symbol(C)&
Example:
Assuming ' Albert Einstein ' is the symbol value.
&symbol& Albert Einstein
&symbol(C)& Albert Einstein
Example:
Time Mask
You can use the SAPscript SET TIME MASK command to format time fields in a way that differs from the
standard setting. Executing this command causes all subsequent time fields to be printed with the specified
formatting.
Syntax:
/: SET TIME MASK = 'time_mask'
The following tables provides templates may be used in the time mask:
Template Description
Example:
Assuming the current time is 10:08:12.
&TIME& -> 10:08:12
/: SET TIME MASK = 'HH:MM'
&TIME& -> 10:08
/: SET TIME MASK = 'HH hours MM minutes'
&TIME& -> 10 hours 08 minutes
&TIME(Z)& -> 10 hours 8 minutes
You can revert to the standard setting by using the SET TIME MASK command
again with an empty string in place of the time mask:
/: SET TIME MASK = ' '
System Variables
Using this symbol impairs performance, since all output data for every form
must be retained internally to fill the symbol.
&SAPSCRIPT-JOBPAGES&
This contains the total number of pages output in a SAPscript print run (all output between the functions
OPEN_FORM and CLOSE_FORM). The state of the page counter on the individual form pages
(START,HOLD,INC) is not taken into account.
Using this symbol impairs performance, since all output data for every print
job must be retained internally to fill the symbol.
&SAPSCRIPT-TELELAND&
This contains the country identifier for the fax destination with fax output with SAPscript (field ITCPO-
TDTELELAND for the parameter OPTIONS of function OPEN_FORM).
&SAPSCRIPT-TELENUM&
This contains the local fax number for the fax destination with fax output with SAPscript (field ITCPO-
TDTELENUM for the parameter OPTIONS of function OPEN_FORM).
&SAPSCRIPT-TELENUME&
This contains the complete fax number for the fax destination with fax output with SAPscript (field ITCPO-
TDTELENUME for the parameter OPTIONS of function OPEN_FORM).
Variables of Structure SYST
All variables of structure SYST, called system variables, can be used in the form. Of particular interest are
the variables for the system date and time. These variables indicate the date and time that the output was
created. For the system date, use SYST-DATUM variable, for the system time, use SYST-UZEIT. Note that
you have the formatting options for date and time variables.