Start of Content Area

Overview documentation Output Areas in the Main Window  Locate the document in its SAP Library structure

For outputting texts in the main window, or, more correctly, in a page window of type MAIN, you can choose one of three different areas (see figure below). The upper margin of the main window is called TOP area; the lower margin is called BOTTOM area. The area in-between is called BODY of the main window. The sizes of the TOP and BOTTOM areas depend on the sizes of their text contents. The BODY area varies accordingly.

This graphic is explained in the accompanying text

The different areas in the main window

TOP, BODY, and BOTTOM Areas of a Main Window

You can determine or modify the contents of the three areas TOP, BODY, and BOTTOM dynamically during the output of the form. SAPscript automatically outputs these areas on each page of a form that contains a main window. When calling the function modules WRITE_FORM or WRITE_FORM_LINES, the parameter TYPE determines into which of the three areas to output the text. If this parameter is missing in the call, the system positions the output in the BODY area.

Example

A definition of a text element in the main window could look like this:

 

This graphic is explained in the accompanying text

The call in the print program then looks like this:

Example

loop at bookings where...

call function 'WRITE_FORM'
exporting
element = 'BOOKING'
type = 'BODY'
window = 'MAIN'.

endloop.

Note

The parameter TYPE of WRITE_FORM has the default value BODY, that is, the system automatically uses this value if the parameter is not explicitly set to another value.

When calling WRITE_FORM, the composer replaces the program symbols in the text element BOOKING (such as &SBOOK-CARRID&) with the contents of the corresponding table fields in the print program. As said before, you can use only fields from Dictionary tables that are defined with TABLES in the print program.

 

TOP Area

BOTTOM Area