In SAPscript, you can use control commands to control the output formatting handled by the SAPscript composer. The composer converts the text from the form displayed in the editor to the form used for printing.
Control commands are placed in the text editor in the same way as the normal line of text. Following structure is used for control commands −
Control commands are entered in paragraph format /:
You should enter only one control command in each line.
Control commands are entered in text.
You have to ensure that Control Command and its parameters doesn’t take more than one line.
When a control command contains an error, the line containing the control command is considered as the comment line and it is not printed.
Following are the common Control commands that can be used in SAPscript −
You can use this control command to force a page break in the text at any point.
/: NEW-PAGE [page_name]
Note that there shouldn’t be any implicit page break occurrences within the blank lines, otherwise an unexpected blank page may be printed.
With this page protect control command, you can print a complete paragraph on one page.
This control command is used when one of the main window fills up. Then, the next main window on that page is taken.
Following are some other common Control commands that you can use in SAPscript for controlling the output −
SET DATE MASK − To format the Date Fields
DEFINE − To assign a Value to a Text Symbol
SET TIME MASK − To format Time Fields
SET COUNTRY − Country Dependent Formatting
SET SIGN − To position the Leading Sign
RESET − To initialize Numbered Paragraphs
TOP − To set a Header Text in the Main Window
BOTTOM − To set a Footer Text in the Main Window
IF − To add a conditional Text
STYLE − To change the Style
INCLUDE − To include other texts
INCLUDE MYTEXT OBJECT TEXT ID ST
INCLUDE name OBJECT name ID name PARAGRAPH name LANGUAGE name