Creating a Standard Table

Use

Use a standard table if you need a table into which you can place any kind of element, or if you need to place more than one element in each cell.

Constructing standard tables can be runtime-intensive. If you need a large table that contains only texts, icons, and links, you should use a quick table instead.

Prerequisites

You must already have instantiated a dynamic document.

Procedure

  1. Declare a reference variable with the type cl_dd_table_element . You will use this to construct the table.
  2. Decide how many columns your table should have. For each column, declare a reference variable with the type cl_dd_area .
  3. Call the add_table method of your document instance, specifying the number of columns that your table should have. In the CALL METHOD statement, receive the TABLE parameter into a reference variable of type cl_dd_table_element .
  4. Call the method add_column of your table element instance. This returns a reference to the column. Repeat this step for each column in your table.

You now have an object reference for each column of your table.

  1. Use the methods of these object references to insert objects into the columns in the current line.

    You can include forms and further tables in a standard table.

  2. When you have filled the current line, call the new_row method.

You can now create the next row of your table. The reference variables that represent the columns now point to the corresponding column in the new row.

See also:

Coding Example