Chapter 04 - SAPScript - Output Program
Chapter 04 - SAPScript - Output Program
Objectives
CALL FUNCTION ‘ OPEN_FORM ’
EXPORTING
FORM = ..
LANGUAGE = ..
DEVICE = ..
OPTIONS = ..
DIALOG = ..
APPLICATION = ..
IMPORTING
LANGUAGE = ..
EXCEPTIONS …..
Possible Exceptions :
DEVICE = Device type invalid
FORM = SAPScript Form does not exist
OPTIONS = Options invalid
UNCLOSED = A SAPScript Form is still active
FUNCTION defines how the data specified in the text element is to be written in
the respective WINDOW.
MAIN window
SET = Append to preceding output.
APPEND = Identical with SET.
DELETE = Ineffective.
OTHER window
SET = Delete old contents and output new text.
APPEND = Append to preceding output.
DELETE = Delete the specified text element.
Default is SET
Possible Exceptions :
ELEMENT = Text does not exist.
FUNCTION = Function is invalid.
TYPE = Window area is invalid.
WINDOW = Window does not exist.
UNOPENED = SAPScript Form printing not opened.
An application text can be read from text file. HEADER and LINES contain header
and text information after successful execution.
Work area for header must be defined as a field string.
DATA BEGIN OF HEADER
INCLUDE STRUCTURE THEAD
DATA END OF HEADER
Work area for text lines must be defined as an internal table.
DATA BEGIN OF LINES OCCURS ...
INCLUDE STRUCTURE TLINE
DATA END OF HEADER
Possible Exceptions :
ID = Text ID invalid.
LANGUAGE = Language invalid.
NAME = Text name invalid.
NOT_FOUND = Text not found.
OBJECT = Text object invalid.
REFERENCE_CHECK = Reference sequence interrupted.
Demonstration
Practice
Summary
Questions