Definition
On the pages of a form you determine the page layout and the sequence of pages with different structures. If makes sense to distinguish between draft pages and print pages:
- You use a draft page to determine the layout and the contents of one or several print pages. In SAP Smart Forms, you use the
The page layout includes the page format (for example, DIN A4, Letter, DIN A5 landscape) and the position of the windows on a page.
Start Page
Every form description consists of one or several draft pages. You create draft pages as directly inferior nodes of the root node Pages and Windows. The first child node of the root node is the start page, where the form processing starts.
Processing the Output Areas of a Page
SAP Smart Forms processes a draft page by processing all output areas of this page in the sequence determined in the navigation tree. Output areas in this case are the direct child nodes of the page node, that is, window nodes, graphic nodes, and address nodes with their own output area.
Ending the Processing of a Page
Processing of a draft page ends as soon as the processing of all output areas is finished:
- For graphic and address nodes this means that the graphic or address was printed. If the output area was too small for the address, the remaining output is truncated on the print page.
- For a secondary window, processing ends after all child nodes of this window have been processed. If the secondary window was too small, the remaining output is truncated on the print page.
- For a main window, processing ends as soon as its output area is full. Unlike with the secondary window, the main window output is resumed on the next print page.
There are two ways to specify the next page following the current page:
- Use the Next page list box of the page node to enter the next draft page you want to process. A page that contains a main window can point to itself. If you specify nothing but the next page, SAP Smart Forms triggers an automatic page break (if a page break is triggered, it will automatically continue the content on the next print page ) as soon as the page is full. If the processing ends on this draft page, the next page set here it is not called.
- Use a command node to insert a dynamic page break within a main window. As for any other node type, you can specify conditions to be fulfilled in order to trigger the manual page break. The page to which you branch using this method is called a dynamic next page.
Note the restrictions for using both manual page break and next page:
Method
|
On Page With Main Window
|
On Page Without Main Window
|
Dynamic page break using the command node
|
Allowed,
but only within the main window |
Not allowed
|
Specifying a next page in the page node
|
Required
|
Optional
|
Specifying the current draft page as next page (page pointing to itself)
|
Allowed
|
Not allowed
|
For a page without main window, never specify the same page as next page, because this would trigger an endless loop. In such a case, the system terminates processing after printing three pages.
Last Page
Form processing ends with the last page. The last page is reached if
- on a draft page without main window no static next page is specified (for draft pages with main window, you must specify a static next page)
- the draft page has a main window and
- all inferior nodes of the main window have been processed and
- no further manual page break has been processed in the main window
* Many forms contain only two pages of different structure, for example one for the letter and one for listing the invoice items. For such a form you need two draft pages; the second page, which is defined as next page of the first one, calls itself as next page. If the text does not entirely fit onto the second print page, another print page with identical structure is started automatically. The diagram below illustrates this example:
For draft page 2 the question arises when to start printing a new page, that is, when to trigger a page break. The page break is triggered either automatically by the main window
2. Window:
Definition
On a page, there are two different types of output areas for texts and data: the main window and the secondary window.
Use
You can position windows anywhere on a page, even overlapping. You can position the same window on several pages of a form, so that the same contents are displayed on all these pages. You can choose a different size for the window on each page, except for the main window.
Main Window
In a main window you display text and data, which can cover several pages (flow text). As soon as a main window is completely filled with text and data, the system continues displaying the text in the main window of the next page. It automatically triggers the page break.
- You can define only one window in a form as main window.
- The main window must have the same width on each page, but can differ in height.
- A page without main window must not call itself as next page, since this would trigger an endless loop. In such a case, the system automatically terminates after three pages.
Secondary Windows
In a secondary window you display text and data in a predetermined output area. There is no flow text display with page break, text and data that do not fit into the secondary window are truncated and not displayed (it is different to main window). If you position a secondary window with the same name on several pages, the system displays the contents of this secondary window on each page.
Copied Windows
You use the copies window to define an output area for the print output, whose content you want to appear either only on the copy or only on the original. This allows you to flag copies as copies when the form is printed.
Final Windows
Final Window is called only after all the other windows are called in Smartform.
For example, you may want to name the grand total in the letter text of an invoice. However, this amount is determined only after listing all individual items. Or you may want to query on the first page within a condition the total number of pages, which the system calculates only after processing all pages.
For example, you may want to name the grand total in the letter text of an invoice. However, this amount is determined only after listing all individual items. Or you may want to query on the first page within a condition the total number of pages, which the system calculates only after processing all pages.
In such a case, you use the final window: Processing first skips all windows of this type in the tree and works its way to the end of the tree. Only after the actual processing is finished, the final windows are processed in the order in which they appear in the tree (from top to bottom). Now any information is available that is known only at the end of the form processing.
No comments:
Post a Comment