Show TOC

Main Windows (MAIN)Locate this document in the navigation structure

Use

Each form must have one window of type MAIN. Such a window is called the main window of the form. For SAPscript forms, the main window has a central meaning. Important characteristics are:

  • It controls the page break.

  • It contains the text body that may cover several pages.

  • It allows to fix text elements at the upper and lower margins of the allocated page window (for example, for column headings).

Process

As soon as a window of type MAIN is full, SAPscript automatically triggers a page break and continues to output the remaining text in the main window of the subsequent page. Page windows of type MAIN have the same width throughout the form. The SAPscript composer thus avoids reformatting of the text after each page break.

Caution

If a page does not have a main window, the system implicitly processes all other windows of the page and continues with the subsequent page. This page must not call itself as subsequent page (recursive call), since this would produce an endless loop. In such a case, SAPscript terminates the output after three subsequent pages.

For printing header lines or totals, the different output areas of the main window are of special importance.