Table
Use
In a Web Dynpro table data is displayed two dimensionally in table cells arranged in rows and columns. Tables are scrollable.
The Web Dynpro table consists of the higher-level Table UI element and several view elements for table columns, TableColumn. The Table contains properties that apply to the whole table, such as one to determine whether entries can be made in the table or not (readOnly=true). Some properties can also be changed row by row (for example, rowSelectable). In a Table, the properties of the aggregated Header-Caption determine the column heading. The TableColumn contains properties that apply to the entire column as well as properties that apply to cells and whose values can vary in each row depending on the binding.
The column heading is implemented by the Header aggregation using a Caption UI element. The second aggregation of TableColumn with the name TableCellEditor contains a UI element that is used to display the cell contents in the column. If the relevant UI elements are bound to readOnly attributes, data cannot be entered in them in the Table.
The Table represents the elements of the context node bound to dataSource. All the properties of a TableCellEditor that are bound to an attribute of dataSource or to context nodes within the dataSource, do not assume the value of the lead selection of the node as is usual, instead they have the value of the selected row.
You can find information about issues you must consider when setting the column width for the layout of a Table or TableColumn in SAP Note 1253282
.
Visualization
A Table consists of the following:
-
Table header (Table header)
This aggregation is optional and can be filled in SE80 using the Insert Header context menu entry.
-
ToolBar
This aggregation is optional and can be filled in SE80 using the Insert Toolbar context menu entry.
-
Column headers/hierarchy of column headers (TableColumn header)
If the header is set to Caption.visibility=none for all columns (including hidden ones), the row with the column headers is hidden.
-
Data rows with TableCellEditors (Insert Cell Editor)
The content of the data rows is determined by:
-
TableColumns and cell variants
-
Content of Table.dataSource
-
TableCellEditors
-
-
Scroll bars
A scroll bar is displayed on the right edge of each Table.
When you scroll through a Table, a tooltip is displayed. You can specify the texts for these scroll tips using the SCROLL_TIP_PROVIDER aggregation. If new data needs to be loaded, releasing the mouse triggers the round trip to the server. There are also various ways to scroll in columns .
In addition to these standard functions, a Table can also contain more complex features:
|
Feature |
Description |
|---|---|
|
Drag and drop rows in a Table or cell contents |
|
|
TreeByKeyTableColumn and TreeByNestingTableColumn |
|
|
Popins at cell and row level |
|
|
Collection of identical headers for multiple rows or columns |
|
|
Collection of identical fields in a column |
|
|
TableCellVariants |
|
|
Selection and selection column, selection menu and hierarchy menu |
|
|
You can define a Table or the single columns (TableColumn) as sortable. |
|
|
You can filter individual TableColumns in a Table according to specific criteria. |
|
|
Various options for column scrolling |
|
|
Connection between properties and context |
|
|
Method Handler |
Special functions can be accessed from the method handler IF_WD_TABLE_METHOD_HNDL. You can find more information about the interface in the system under the relevant object. |
|
Support for the development of accessible applications through the use of special properties |
|
|
Note that aggregation is available only for the SAP List Viewer Integration. |

Table Details
|
Runtime class: |
CL_WD_TABLE |
Properties in View Designer
|
Name |
Type |
Initial Value |
Bindable |
|---|---|---|---|
|
STRING |
(automatic) |
No |
|
|
Translatable text |
Yes |
||
|
WDY_BOOLEAN |
false |
No |
|
|
WDR_CELL_STYLE_CLASS_NAMES |
Yes |
||
|
WDUI_TABLE_COLUMN_RESIZE_MODE |
preserveTableWidth |
No |
|
|
WDUI_CONTEXT_MENU_BEHAVIOUR |
inherit |
No |
|
|
WDY_MD_UI_ELEMENT_REFERENCE |
No |
||
|
Context Node |
Mandatory |
||
|
WDY_MD_UI_ELEMENT_REFERENCE |
Yes |
||
|
WDUI_TABLE_DESIGN |
standard |
Yes |
|
|
WDY_BOOLEAN |
true |
Yes |
|
|
STRING |
Yes |
||
|
Translatable text |
Yes |
||
|
WDY_BOOLEAN |
true |
Yes |
|
|
I |
0 |
Yes |
|
|
I |
0 |
Yes |
|
|
STRING |
Yes |
||
|
WDY_BOOLEAN |
false |
Yes |
|
|
WDY_BOOLEAN |
true |
Yes |
|
|
WDUI_TABLE_GRID_MODE |
both |
Yes |
|
|
WDY_BOOLEAN |
false |
No |
|
|
WDY_MD_UI_ELEMENT_REFERENCE |
Yes |
||
|
WDY_BOOLEAN |
false |
Yes |
|
|
WDY_BOOLEAN |
false |
Yes |
|
|
I |
-1 |
Yes |
|
|
WDY_BOOLEAN |
true |
Yes |
|
|
I |
-1 |
Yes |
|
|
STRING |
Yes |
||
|
WDUI_TABLE_SEL_CHNG_BEHVR |
auto |
No |
|
|
WDUI_TABLE_SEL_COL_DESIGN |
default |
Yes |
|
|
WDUI_TSMODE |
auto |
Yes |
|
| styleClassName | STRING | Yes | |
|
Translatable text |
Yes |
||
|
WDUI_VISIBILITY |
visible |
Yes |
|
|
I |
5 |
Yes |
|
|
STRING |
Yes |
Aggregations in the View Designer
|
Name |
Cardinality |
Type |
|---|---|---|
|
0..n |
||
|
0..1 |
||
|
0..n |
||
|
0..1 |
||
|
0..n |
||
|
0..1 |
||
|
0..1 |
||
|
0..1 |
||
|
0..1 |
||
|
0..1 |
TableRowArrangement |
|
|
0..1 |
||
|
0..1 |
TableSelectionMenuConfiguration |
|
|
0..1 |
Events in View Designer
Dynamic Programming
For dynamic programming, the same properties, events, and aggregations as in the View Designer are available. But note that the spelling format and use of upper/lower case is different.
Dynamic Programming of Properties
|
View Designer Name |
Runtime Name |
Type |
|---|---|---|
|
ACCESSIBILITY_DESCR |
WDY_MD_TRANSLATABLE_TEXT |
|
|
ACTIVATE_ACCESS_KEY |
WDY_BOOLEAN |
|
|
CELL_STYLE_CLASS_NAMES |
WDR_CELL_STYLE_CLASS_NAMES |
|
|
COLUMN_RESIZE_MODE |
WDUI_TABLE_COLUMN_RESIZE_MODE |
|
|
columnResizeMode: preserveOtherColumnWidths |
CL_WD_TABLE=>E_COLUMN_RESIZE_MODE-PRESERVE_OTHER_COLUMN_WIDTHS |
|
|
columnResizeMode: preserveTableWidth |
CL_WD_TABLE=>E_COLUMN_RESIZE_MODE-PRESERVE_TABLE_WIDTH |
|
|
CONTEXT_MENU_BEHAVIOUR |
WDUI_CONTEXT_MENU_BEHAVIOUR |
|
|
contextMenuBehaviour: inherit |
CL_WD_TABLE=>E_CONTEXT_MENU_BEHAVIOUR-INHERIT |
|
|
contextMenuBehaviour: provide |
CL_WD_TABLE=>E_CONTEXT_MENU_BEHAVIOUR-PROVIDE |
|
|
contextMenuBehaviour: suppress |
CL_WD_TABLE=>E_CONTEXT_MENU_BEHAVIOUR-SUPPRESS |
|
|
CONTEXT_MENU_ID |
WDY_MD_UI_ELEMENT_REFERENCE |
|
|
DATA_SOURCE |
OBJECT |
|
|
DEFAULT_BUTTON_ID |
WDY_MD_UI_ELEMENT_REFERENCE |
|
|
DESIGN |
WDUI_TABLE_DESIGN |
|
|
design: alternating |
CL_WD_TABLE=>E_DESIGN-ALTERNATING |
|
|
design: standard |
CL_WD_TABLE=>E_DESIGN-STANDARD |
|
|
design: transparent |
CL_WD_TABLE=>E_DESIGN-TRANSPARENT |
|
|
design: transparentWithGrid |
CL_WD_TABLE=>E_DESIGN-TRANSPARENT_WITH_GRID |
|
|
DISPLAY_EMPTY_ROWS |
WDY_BOOLEAN |
|
|
DROP_ON_ROW_NAME |
STRING |
|
|
EMPTY_TABLE_TEXT |
WDY_MD_TRANSLATABLE_TEXT |
|
|
ENABLED |
WDY_BOOLEAN |
|
|
FIRST_ACTUAL_ROW |
I |
|
|
FIRST_VISIBLE_ROW |
I |
|
|
FIRST_VISIBLE_SCROLL_COL |
STRING |
|
|
FIXED_TABLE_LAYOUT |
WDY_BOOLEAN |
|
|
FOOTER_VISIBLE |
WDY_BOOLEAN |
|
|
GRID_MODE |
WDUI_TABLE_GRID_MODE |
|
|
gridMode: both |
CL_WD_TABLE=>E_GRID_MODE-BOTH |
|
|
gridMode: horizontal |
CL_WD_TABLE=>E_GRID_MODE-HORIZONTAL |
|
|
gridMode: none |
CL_WD_TABLE=>E_GRID_MODE-NONE |
|
|
gridMode: vertical |
CL_WD_TABLE=>E_GRID_MODE-VERTICAL |
|
|
HANDLE_HOTKEYS |
WDY_BOOLEAN |
|
|
LEGEND_ID |
WDY_MD_UI_ELEMENT_REFERENCE |
|
|
MULTI_COL_SORTING |
WDY_BOOLEAN |
|
|
READ_ONLY |
WDY_BOOLEAN |
|
|
ROW_COUNT |
I |
|
|
ROW_SELECTABLE |
WDY_BOOLEAN |
|
|
SCROLLABLE_COL_COUNT |
I |
|
|
SELECTED_POPIN |
STRING |
|
|
SELECTION_CHANGE_BEHAVIOUR |
WDUI_TABLE_SEL_CHNG_BEHVR |
|
|
selectionChangeBehaviour: auto |
CL_WD_TABLE=>E_SELECTION_CHANGE_BEHAVIOUR-AUTO |
|
|
selectionChangeBehaviour: ifNoLoss |
CL_WD_TABLE=>E_SELECTION_CHANGE_BEHAVIOUR-IF_NO_LOSS |
|
|
selectionChangeBehaviour: manual |
CL_WD_TABLE=>E_SELECTION_CHANGE_BEHAVIOUR-MANUAL |
|
|
SELECTION_COLUMN_DESIGN |
WDUI_TABLE_SEL_COL_DESIGN |
|
|
selectionColumnDesign: default |
CL_WD_TABLE=>E_SELECTION_COLUMN_DESIGN-DEFAULT |
|
|
selectionColumnDesign: none |
CL_WD_TABLE=>E_SELECTION_COLUMN_DESIGN-NONE |
|
|
selectionColumnDesign: standard |
CL_WD_TABLE=>E_SELECTION_COLUMN_DESIGN-STANDARD |
|
|
selectionColumnDesign: toggle |
CL_WD_TABLE=>E_SELECTION_COLUMN_DESIGN-TOGGLE |
|
|
SELECTION_MODE |
WDUI_TSMODE |
|
|
selectionMode: auto |
CL_WD_TABLE=>E_SELECTION_MODE-AUTO |
|
|
selectionMode: multi |
CL_WD_TABLE=>E_SELECTION_MODE-MULTI |
|
|
selectionMode: multiNoLead |
CL_WD_TABLE=>E_SELECTION_MODE-MULTI_NO_LEAD |
|
|
selectionMode: none |
CL_WD_TABLE=>E_SELECTION_MODE-NONE |
|
|
selectionMode: single |
CL_WD_TABLE=>E_SELECTION_MODE-SINGLE |
|
|
selectionMode: singleNoLead |
CL_WD_TABLE=>E_SELECTION_MODE-SINGLE_NO_LEAD |
|
| styleClassName | STYLE_CLASS_NAME | STRING |
|
TOOLTIP |
WDY_MD_TRANSLATABLE_TEXT |
|
|
VISIBLE |
WDUI_VISIBILITY |
|
|
visible: none |
CL_WD_TABLE=>E_VISIBLE-NONE |
|
|
visible: visible |
CL_WD_TABLE=>E_VISIBLE-VISIBLE |
|
|
VISIBLE_ROW_COUNT |
I |
|
|
WIDTH |
STRING |
Dynamic Programming of Events
|
View Designer Name |
Runtime Name |
|---|---|
|
ON_COL_SELECT |
|
|
ON_CUSTOM_FILTER |
|
|
ON_DROP |
|
|
ON_FILTER |
|
|
ON_LEAD_SELECT |
|
|
ON_SCROLL |
|
|
ON_SELECT |
|
|
ON_SORT |
Dynamic Programming of Aggregations
|
View Designer Name |
Runtime Name |
Cardinality |
|---|---|---|
|
COLUMNS |
0..n |
|
|
DRAG_SOURCE_INFO |
0..1 |
|
|
DROP_ROW_TRG_INFS |
0..n |
|
|
DROP_TARGET_INFO |
0..1 |
|
|
GROUPED_COLUMNS |
0..n |
|
|
HEADER |
0..1 |
|
|
LEGEND_POPIN |
0..1 |
|
|
MASTER_COLUMN |
0..1 |
|
|
POPIN |
0..1 |
|
|
ROW_ARRANGEMENT |
0..1 |
|
|
SCROLL_TIP_PROVIDER |
0..1 |
|
|
SEL_MENU_CFG |
0..1 |
|
|
TOOLBAR |
0..1 |
Example
You can find examples of this UI element in the system:
-
Web Dynpro Application WDR_TEST_UI_ELEMENTS
-
WDR_TEST_EVENTS component in the Table view
-
WDR_TEST_TABLE component
-
WDR_TEST_TABLE_BTC component if WDUIGUIDELINE=GL20
-
DEMO_TABLE component