At the interface to its function modules, SAPscript implicitly always checks whether the specified text object, text name, text ID, and text language are valid. To execute such a check independent of a SAPscript processing function, the system provides function modules that allow you to explicitly check the validity of these specifications.
PRINT TEXTS To print a text, you can use the function module PRINT_TEXT. However, you can format only one text with this function module. Formatting occurs according to the formatting information specified in the text header (style and layout set). If no layout set is defined for a text, the system implicitly underlays the layout set SYSTEM. During formatting, the system
• formats the individual text paragraphs according to the definitions in the style or layout set, • replaces variables with their current values,
• interprets and executes the control statements contained in the text, • automatically triggers page breaks according to the page layout specified in the layout set. The function module automatically opens the layout set and closes it after formatting the text lines.
All text lines transferred appear in the main window of the layout set (MAIN). If you want to output a text module in such a way that you can view it in the text editor in ITF format, use the function module PRINT_TEXT_ITF.
The system ignores the style and layout set specifications in the text header and uses the layout set SAPSCRIPT_ITF instead. With each application program, you can specify different formatting parameters by using the parameter OPTIONS.
The user gets a dialog window, in which he can change the default values of certain parameters. You can evaluate these changes by comparing the fields of the parameter OPTION with the corresponding fields of the return parameter RESULT of the program.
The function module PRINT_TEXT internally calls the function modules OPEN_FORM, WRITE_FORM_LINES, and CLOSE_FORM. Therefore, you cannot call PRINT_TEXT after a layout set has been opened using OPEN_FORM. The system then ends the function module with the exception UNCLOSED. If the text module you want to print is not in ITF format, that is, the field TDTEXTTYPE of the text header is not empty, you cannot use the SAPscript composer to format this text. Instead, the system calls the function module PRINT_TEXT_FORMAT_xxx, which calls the word processing program appropriate for processing the specified text format. If this is impossible, PRINT_TEXT ends with an exception.
SAPSCRIPT CONTROL TABLES AND STRUCTURES This topic introduces the control tables SAPscript employs. You also find an overview of the structures used. Control tables: TTXOB Definition of the text objects TTXOT Descriptions of the text objects TTXID Definition of the text IDs TTXIT Descriptions of the text IDs To maintain the above tables, use transaction SE75.
To call Settings SAPscriptà Word processing àthe transaction, choose Tools structures THEAD Structure for storing the text header TLINE Structure for storing a text line ITCPO Control parameter for output formatting ITCPP Return parameter from output formatting ITCED Control parameter for the text editor ITCER Return parameter from the text editor ITCST Structure of the result table that gathers all the symbols appearing in a text ITCWE Structure of the result table that lists all the elements appearing in a layout set CONTROL PRINT OUTPUT With the function modules PRINT_TEXT and OPEN_FORM, you can set output formatting and print control using the parameter OPTIONS.
The data you pass to this parameter must have the structure ITCPO. The fields of this structure come from the areas SAPscript, the spool, and SAPcomm. Some of these fields can be changed by the user on the selection screen, if you requested it using the parameter DIALOG with the above function modules.
RELATED POSTS
SAP SCRIPTS PART 16
No comments :
Post a Comment