SAPscript Control Commands

The functionality of the SAPscript editor is made available through a set of commands. These commands give you full editing control over your text. They are executed immediately when called.

There is, however, another kind of SAPscript command, namely the control commands. The purpose of these is to allow control of the output formatting. These commands are not interpreted by the SAPscript editor, but are passed through to the SAPscript Composer for processing. The Composer is the program that converts text from the form displayed in the editor to the form used for printing. This includes, for example, line and page formatting, the replacement of symbols with their current values and the formatting of text according to the paragraph and character formats specified.

The SAPscript control commands are described in the following sections.

Syntax of Control Commands

Explicit Page Break: NEW-PAGE

Preventing Page Breaks: PROTECT

Next Main Window: NEW-WINDOW

Assigning a Value to a Text Symbol: DEFINE

Formatting Date Fields: SET DATE MASK

Formatting Time Fields: SET TIME MASK

Country-Dependent Formatting: SET COUNTRY

Position of the Leading Sign: SET SIGN

Initializing Numbered Paragraphs: RESET

Including Other Texts: INCLUDE

Changing the Style: STYLE

Formatting Addresses: ADDRESS

Setting a Header Text in the Main Window: TOP

Setting a Footer Text in the Main Window: BOTTOM

Conditional Text: IF

Finding a Match: CASE

Calling ABAP Subroutines: PERFORM

Inserting Print Controls: PRINT-CONTROL

Boxes, Lines, Shading: BOX, POSITION, SIZE

Hexadecimal Data: HEX, ENDHEX

Summing a Program Symbol: SUMMING