You can identify only one window of a form as main window. You use the main window to spread output over several print pages, which is a prerequisite for printingtables. The output control of the main window triggers an automatic page break as soon as the main window is full, that is as soon as in the main window no space is left for printing outout.
However, the main window "keeps in mind" the exact location at which the output was interrupted. On the next page, the output control resumes printing at exactly this position as soon as in the processing tree the main window is reached again. The subsequent print pages may also include other windows or output areas; they are printed unless a condition suppresses them.
Depending on your needs, it may make sense to use the main window either only on one draft page or on several draft pages.
Main Window on One Draft Page
This is the default. The main window appears only on one draft page, which points to itself using the Next page attribute of the page node. The system processes this draft page again and again until it reaches the end of the main window. Depending on the size of the output in the main window, SAP Smart Forms then produces one or several print pages.
In this case, form printing ends at the end of the main window. If you want to print more pages, you must use the command node to include adynamic page break as the last inferior node of the main window.
Main Window on Several Draft Pages
Even though only one main window per form is allowed, you can copy it to several draft pages. Each main window then points to the same output control. You use this technique if you want the pages on which a table with items is printed to have different layouts. Height and position of the main window may differ on the different pages, but the width must remain the same throughout.
There are two ways to reach the second draft page:
The draft page to which you branched is processed from the beginning. As soon as it starts processing the main window, SAP Smart Forms resumes printing at the break location (after an automatic page break) or directly after the executed command node (after a dynamic page break).