add_table

Use this method to add a table to your dynamic document. The method returns references to two objects: cl_dd_table_element , which you use to create a standard table, and cl_dd_table_area , which you use to create a quick table.

CALL METHOD valid_reference->add_table
   EXPORTING no_of_columns               = no_of_columns
             with_heading                = with_heading
             cell_background_transparent = cell_background_transparent
             border                      = border
             width                       = width
   IMPORTING table                       = table
             tablearea                   = tablearea

Parameter and Type

Opt.

Description

no_of_columns
TYPE I

 

Number of columns in the table

with_heading
TYPE SDYDO_FLAG

X

Specifies whether the columns should have headings. Possible values:

  • 'X' : Columns have headings
  • ' ' (default): Columns do not have headings

cell_background_
transparent
TYPE SDYDO_FLAG

X

Specifies whether the cells in the table should have a different background color from that of the main document. Possible values:

  • 'X' (default): Table has same background color as the document
  • ' ' : Table has different background color

border
TYPE SDYDO_VALUE

X

Width of the table border. Default value is '1'. Use '0' to create a table without a border.

width
TYPE SDYDO_VALUE

X

Width of the table, expressed as a percentage of the width of the dynamic document. By default, the table width is set to the sum of the widths of its columns.

table
TYPE REF TO CL_DD_TABLE_
ELEMENT

 

A reference variable pointing to an object that you can use to create a standard table.

tablearea
TYPE REF TO CL_DD_TABLE_
AREA

 

A reference variable pointing to an object that you can use to create a quick table.

See also:

Tables