Show TOC

WRITE_FORM_LINESLocate this document in the navigation structure

Use

The text lines contained in table LINES are output in the specified layout set window. The text lines must have the SAPscript ITF format. From the data in the text header, the system uses only the field TDSTYLE to apply the formatting attributes defined in the specified style for this text. If the field is empty, the system uses the identically named formatting attributes (character and paragraph formats) of the form.

Use parameter WINDOW to specify into which of the windows defined in the form you want to output the text. You can specify any window used in the form. The parameter FUNCTION determines how to merge the text lines to be output with any existing contents in the window. There are differences between the different window types or areas.

Function call:

CALL FUNCTION 'WRITE_FORM_LINES'
        EXPORTING
                HEADER          = ?...
                WINDOW          = 'MAIN'
                FUNCTION        = 'SET'
                TYPE            = 'BODY'
        IMPORTING
                PENDING_LINES   =
                FROMPAGE        =
        TABLES
                LINES           = ?...
        EXCEPTIONS FUNCTION     =
                TYPE            =
                UNOPENED        =
                UNSTARTED       =
                WINDOW          =
            

Export parameters:

HEADER

The parameter contains the header of the text module you want to output in the current form. For the formatting process, the system uses only the entries in the header fields TDSTYLE and TDFORM.

Structure: THEAD

WINDOW

Enter the name of the window into which you want to output the form element specified in parameter ELEMENT.

Default value: 'MAIN'

FUNCTION

The parameter determines how to output the text element into the respective window. The output type depends on the window type and area:

  • Window type: MAIN, area BODY

  • 'SET' append to previous output

  • 'APPEND' same as SET

  • 'DELETE' no effect

  • Window type MAIN, areas TOP and BOTTOM; all other windows:

  • 'SET' delete old window or area contents and output the element

  • 'APPEND' append the element to the existing elements

  • 'DELETE' no effect

Default value: 'SET'

TYPE

The system interprets this parameter only for output to the main window (WINDOW = 'MAIN').

The parameter determines the area of the main window into which you want to output the element.

Possible values:

  • 'TOP' header area

  • 'BODY' main area

  • 'BOTTOM' footer area

  • Default value: 'BODY'

Import parameter:

PENDING_LINES

If a corresponding text is output to the BOTTOM area of the main window (TYPE = BOTTOM), it is possible that this will have no space left on the current output page. It is therefore marked internally only for the BOTTOM output of the next page. The actual output is therefore still due (hangs).

If output is pending, the parameter PENDING_LINES contains 'X', and the print program can react accordingly. For example, an explicit page break at the text end (NEW-PAGE) could implicitly trigger the pending BOTTOM output on the next page.

FROMPAGE

Use FROMPAGE to determine on which form page the output of the text starts.

Table parameters:

LINES

Enter the name of the table that contains the text lines you want to print.

Structure: TLINE

Exceptions:

FUNCTION

The function specified in parameter FUNCTION is unknown.

For this parameter, the following values are allowed:

  • SET

  • APPEND

  • DELETE

TYPE

The type of window area specified in parameter TYPE is invalid.

Depending on the window type, these entries are valid:

  • BODY for all windows

  • TOP only for the MAIN window

  • BOTTOM only for the MAIN window

UNOPENED

The current form function could not be executed as the form output was not initialized with OPEN_FORM.

UNSTARTED

A layout set was not opened.

Possible causes:

  • The form processing was started using OPEN_FORM without specifying a form name, but no form was opened yet using START_FORM.

  • The layout set last used was concluded with END_FORM but a new layout set was not opened with START_FORM.

  • The last filled page of the current form has no subsequent page. In this case, the system automatically terminates form printing after this page. You need no explicit END_FORM call.

  • In the current form, no page contains a main window, but a text element shall be output in the main window. However, a call to output a text element in the MAIN window is nevertheless made.

WINDOW

The form window specified in the parameter WINDOW does not exist in the current form.

Possible causes:

  • The window name was entered incorrectly.

  • The form version with the specified window is not active.