:PRINT
Use the :PRINT script statement to write a text to the Requests view or to the activation report. Texts are either displayed as lines in the activation report of the object, or as lines in the request shown to the user. The context in which you use the :PRINT statement determines the result:
-
Use the :PRINT statement on its own to write texts in the activation report. Writing texts in the activation report can be useful in the following ways:
- Display the results of processing in the activation report.
- Check if script variables have been replaced correctly.
-
Include the :PRINT statement in :BEGINREAD ...:ENDREAD statements to display the text in the Requests view. The :PRINT statement lets you provide information to the user in the request by defining an input mask. The request is displayed in the AWI when the object is activated or generated. For more information about the timing, see Script Processing.
Syntax
:P[RINT] Text1 [,Text2]
Parameters
-
:PRINT
Writes a text in the activation report or request -
Text1, Text 2
Text to display in the activation report or request
Format: script literal or script variable
Maximum characters: 1024 (Text1 + Text2)
Notes:
- Blanks at the end of the text are truncated.
- Script variables are replaced. The value of the variable is written in the output.
For activation reports, specify your text as follows to display the texts in separate lines:
- Specify Text1 in single or double quotation marks to write the text in a line of its own in the report.
- You do not need to use quotation marks for Text2.
- If you specify Text1 and Text2, the texts are written in two separate lines.
For the Requests view, the text is displayed as follows:
- Text2 is appended to Text1.
- If a :READ statement follows the script statement, Text1 is placed before the input request, and Text2 is placed before the text field.
Examples
The following example writes a phrase containing the current date in the activation report:
:SET &DATE# = SYS_DATE(DD.MM.YY)
:PRINT "The daily evaluation of &DATE# is activated."
The following example displays an instruction (Enter here) above the input field in the request:
:BEGINREAD
:PRINT "", "Enter here:"
:READ &ANR#,,"Account
number"
:ENDREAD
See also: