Creating a Quick Table
Prerequisites
You must have already instantiated a dynamic document.
Context
If you want to construct a table containing only text, icons, and links, especially if the table is large, you should use a quick table. At runtime, the system can construct a quick table far faster than a standard table.
In a standard table, every column represents an object of its own, that is, the structure of the table table framework is very time-consuming. However, if you use a quick table, the table content is inserted directly into the individial area object.
Procedure
-
Declare a reference variable with the type cl_dd_table_area.
-
If you want to set column styles in your table, declare a reference variable with the type cl_dd_table_element.
-
Call the method add_table of the document instance and specify how many columns the table is to have and whether the columns are to have headers. Assign the tablearea parameter to the reference variable you declared in step 1 and the table parameter to the reference variable you declared in step 2 (if applicable).
-
If you want to set column styles, call the set_column_style method for the object you received from the table parameter.
-
If the table is to have headers, call the method add_heading for every table column.
-
Add the elements to the first row of your quick table. You can use a method call for every column of the table.
-
Conclude the row by calling the new_row method. The next element that you add then appears in the first column of the next row.