SapScripts Commands – Control commands

Details and syntax of control command used in sapscript

The function module OPEN_FORM opens form printing. You must call this function module before you can use any other form function (WRITE_FORM, START_FORM, CONTROL_FORM…).
You need not specify a form name. If you omit the name, you must use the function module START_FORM to open a form before starting the output.
You must end form printing by using the function module CLOSE_FORM. Otherwise, the system does not print or display anything.
Within a program, you can use several OPEN_FORM.. CLOSE_FORM pairs. This allows you to write output to several different spool requests from within one program.
The function module closes the form opened using OPEN_FORM. The system executes any terminating processing steps for the last opened form.
You must use this function module to close form printing. Otherwise,
no output appears on printer or screen.
In-between the function modules OPEN_FORM and CLOSE_FORM, you can use different forms. This allows you to combine several different forms into one print output. However, you can combine only those forms that have the same page format.
To switch forms, use the function module START_FORM. If another form is still open, you must close it first using END_FORM.
If you specify no form name when calling START_FORM, the system restarts the last open form. If after OPEN_FORM no form was activated yet, the system leaves the function module with the exception UNUSED.
END_FORM ends the currently open form and executes the required termination processing. After calling this function module, no more form is active. For further output, you must start a new form using START_FORM.
 END_FORM does not replace CLOSE_FORM, that is, you must always close any SAPscript output using CLOSE_FORM
READ_TEXT provides a text for the application program in the specified work areas.
The function module reads the desired text from the text file, the text memory, or the archive. You must fully specify the text using OBJECT, NAME, ID, and LANGUAGE. An internal work area can hold only one text; therefore, generic specifications are not allowed with these options.
After successful reading, the system places header information and text lines into the work areas specified with HEADER and LINES.
If a reference text is used, SAPscript automatically processes the reference chain and provides the text lines found in the text at the end of the chain. If an error occurs, the system leaves the function module and triggers the exception REFERENCE_CHECK.

Print Friendly, PDF & Email

[ FREE ] SUBSCRIBE
RECEIVE UPDATES & SAP ARTICLES RIGHT IN YOUR INBOX.