SAPSCRIPT: General SAPscript Fields 

You can print the following fields of structure SAPSCRIPT as program symbols in SAPscript forms:

Receives a value after executing an INCLUDE statement. The value shows whether the INCLUDE was found (that is, the INCLUDE text exists) or not. You can query this value in an IF statement.
INCLUDE was found: &SAPSCRIPT-SUBRC& = 0
INCLUDE was not found: &SAPSCRIPT-SUBRC& = 4.

SAPscript formats a text for a specific output device. The initial formatting is independent of the specific language of this device. SAPscript then calls a driver to convert the device-independent format to device-specific control commands. This field contains the name of the driver.

POST Postscript driver

HPL2 HP Laserjet driver for the PCL4/PCL5 languages

PRES Driver for output devices using the PRESCRIBE language

The available drivers are stored in table TSP09.

This field contains a number representing the total number of pages of the currently formatted form (any output between START_FORM and END_FORM). The page counter mode (START, INC, HOLD) of the individual pages is ignored. You can use this symbol to formulate information like

‘Page x of y’ for your output.

This field contains a number representing the total number of pages of all forms contained in the currently formatted print request, in other words, of all forms created using the OPEN_FORM, START_FORM.. ENDFORM, START_FORM.. END_FORM,..., CLOSE_FORM function modules.

When using the SAPSCRIPT-FORMPAGES or SAPSCRIPT-JOBPAGES symbols, SAPscript leads all output pages of the current form or current print request into main memory to replace the symbol by the appropriate value. For large output jobs, this can mean a very large amount of memory.

These fields represent ten counter variables that you can use in your text and forms for any counting purposes. You can use the ‘+’ and ‘-’ formatting options to increment or decrement a counter before its value is printed. You can use the DEFINE control command to assign any specific value to a counter.

This field contains the country key of the fax target address when using fax output via SAPscript (field ITCPO-TDTELELAND of parameter OPTIONS of function module OPEN_FORM).

This field contains the local fax number of the fax target address when using fax output via SAPscript (field ITCPO-TDTELENUM of parameter OPTIONS of function module OPEN_FORM).

This field contains the complete fax number of the fax target address when using fax output via SAPscript (field ITCPO-TDTELENUME of parameter OPTIONS of the function module OPEN_FORM).