Printing Tables

Use

In forms of business procedures you usually want to list details such as open items of an invoice. You can use a Smart Form to display this data in a table. You can design the layout of the table independent of the number of lines it will contain. The size of the table depends on how much data the application program passes to the form at runtime (unlike with templates, where you specify the number of columns and lines explicitly). The table can cover one or more pages, depending on the number of lines. This is why you display tables in the main window.

Integration

Tables cannot be nested. This means that you cannot create a table node as inferior node of a table node. A loop, in contrast, can have several tables as inferior nodes, and vice versa (see: Combining Loops and Tables).

Together with the SAP Web Application Server 6.10 a new table node was introduced that replaces the old table node. You can still edit table nodes of previous releases, but not create new ones.

For reasons of completeness the old table node is still documented. See: Printing Old Tables.

For table output SAP Smart Forms divides a table into a header, a main area, and a footer. These output areas of the table automatically appear as directly inferior nodes of the table node in the navigation tree (see: Output Areas of a Table).

Activities

Application data is usually stored in internal tables. You pass these tables at the form interface. To display this data as a table on the form, proceed as follows:

  1. Create a node of type Table in the navigation tree of the Form Builder.
  2. Access your application data. You can:
    • Read the entire table or parts of it line by line (see: Reading Internal Tables)
    • Sort the table before output to allow, for example, subheadings to be printed before data records (see: Sort Criteria).
    • In addition to the internal tables read in the table node, read other data in the loop node and use it for table output (see: Combining Loops and Tables).
  1. Create line types for your table output (see: Defining Line Types). If desired, you can set boxes and shadings for your line types.
  2. Construct your table using these line types (see: Specifying Table Output)
  3. If your internal table contains a value field that refers to a currency or quality field in a different table, you must introduce this field to the system before displaying it (see: Displaying Fields That Refer to Currencies or Quantities).
  4. Execute your calculations and display the results in the table or at any other position in the form (see: Calculations).