Intro

The responsive table is the default table in SAP Fiori. It contains a set of line items and is fully responsive. Depending on the scenario, users can also navigate from the line items to further details.

Usage

Use the responsive table if:

Do not use the responsive table if:

Don't

Don't: Do not use a responsive table as a form

Don't: Do not use a responsive table as a form

See the table overview to decide which SAP Fiori table is most suitable for your needs.

Responsiveness

The responsiveness of a responsive table is optimized for viewing one line item at a time with no or only vertical scrolling, irrespective of the display width.

On smartphones, only the most important data remains in the one-column or two-column table, while all other data is moved to the space between two item rows, known as the “pop-in area”. In this area, data of the corresponding cell is provided as a label, or value pair, which is defined by the column header. The pop-in area itself is responsive, so labels can be shown next to or above the corresponding data.

A responsive table displayed on a smartphone

A responsive table displayed on a smartphone

A responsive table displayed on a tablet

A responsive table displayed on a tablet

A responsive table displayed in compact mode on a desktop computer

A responsive table displayed in compact mode on a desktop computer

To ensure responsiveness, you must configure each column. Depending on the screen width (in pixels), the column needs to know which of the following responses is required:

Since you have to define this for each column, you can also handle more than one column at a single breakpoint, such as moving three columns to the pop-in area at once.

Each of the three device types has a predefined value for the screen width. However, you will get better results if you offer more breakpoints by using pixel values instead of the predefined values.

For the smallest screen width, keep the following information in the table layout:

The examples in the following tables help to illustrate this:

A typical responsive table.

A typical responsive table

A typical responsive table

Hide the Information column for a screen width smaller than 570 px:

Hiding the Information column

Hiding the Information column

Move the Vendor column to the pop-in area for a screen width smaller than 460 px (sap.m.Column, properties: demandPopin, minScreenWidth):

Moving the Vendor column to the pop-in area

Moving the Vendor column to the pop-in area

Move the Limit column to the pop-in area for a screen width smaller than 350 px (sap.m.Column, properties: demandPopin, minScreenWidth):

Moving the Limit column to the popin area

Moving the Limit column to the popin area

Move the Price column to the pop-in area for a screen width smaller than 270 px (sap.m.Column, properties: demandPopin, minScreenWidth):

Moving the Price column to the pop-in area

Moving the Price column to the pop-in area

If you need to support even smaller screens, values can be moved below the corresponding labels inside the pop-in area. In the example below, this has been done for a screen width smaller than 220 px (sap.m.Column, property: popinDisplay):

Pop-in area – Moving the data below the labels

Pop-in area – Moving the data below the labels

Layout

The optional title bar contains the title of the responsive table, an item counter, the variant management, and the toolbar.

The filter info bar appears when the responsive table is filtered, and it shows information on the filter settings.

The column header shows the label for each column.

The collection of items, or rows, occupies the main part of the responsive table.

You can add aggregation information (such as totals) to the footer.

A More button can be shown if you do not want all items to be loaded at the start (known as “lazy loading”). Ideally, you should use scrolling to load more items instead of choosing the More button.

Schematic visualization of the responsive table

Schematic visualization of the responsive table

Components

The title bar consists of a toolbar.

The toolbar can contain entry points for the view settings dialog and the table personalization dialog, as well as view switches in the form of a segmented button, and buttons for Add, Edit, and other actions.

Beneath the toolbar, display a filter info bar (which itself is a special toolbar) if the responsive table is filtered.

To format data as part of items, apply the guidelines for formatting data. Controls commonly used inside items are the object identifier and the object number. For more information about these, please see object display components.

Behavior and Interaction

The responsive table is quite flexible in regards to its content.

Table Level

Scroll

The height of the table is defined by the number of items it contains. It does not have its own scroll container, but is scrolled together with the app.

Same table, different number of items

Same table, different number of items

Merge Duplicates

To simulate the behavior of row spanning, you can merge cells of consecutive rows inside a column automatically if they contain the same value (sap.m.Column, properties: mergeDuplicates, mergeFunctionName).

Use the merge feature if you expect the column to contain duplicate entries, and it makes sense to group them. In the example screenshot, the Supplier, Product, and Dimensions columns reflect a hierarchical structure: Suppliers have products, which in turn have dimensions. Because suppliers typically have multiple products, merging duplicate entries for the supplier column makes the table easier to read. Note, however, that when the user sorts the table by another field, the hierarchy changes and the merged items are regrouped accordingly.

Do not use the merge feature if duplicate entries are not part of the design. If consecutive table rows happen to have the same values at runtime, this alone is not a valid reason to group them.

Supplier column merges duplicates in consecutive rows

Supplier column merges duplicates in consecutive rows

Select

A responsive table can have one of the following selection types (sap.m.Table/ sap.m.ListBase, property: mode):

  • None: Items cannot be selected (sap.m.ListMode.None).
    Beware: Line items can, nevertheless, use the sap.m.ListType “navigation” which allows click handling on specific line items. This should only be used when the click triggers a navigation to a corresponding line item details page.
  • Single select master: One item of the responsive table can be selected. To select an item, the whole row can be clicked. Single select master does not add any visual indication and can therefore not be differentiated from none-selection tables. For single selection, this it the preferred mode. (sap.m.ListMode.SingleSelectMaster)
  • Single select left: One item of the responsive table can be selected. For this, the responsive table provides radio buttons on the left side of each line item. Use this selection mode only if clicking on the row shoud trigger something else, such as navigation. Ideally, always keep one item selected, even in initial state (sap.m.ListMode.SingleSelectLeft).
  • Multi-select: Allows the selection of one or more items. For this, the responsive table provides checkboxes on the left side of each line item. Select All works via a checkbox on the left of the column header. Select All (de-)selects all items which the user can reach via scrolling (sap.m.ListMode.MultiSelect). With multiselection, responsive tables avoid having checkboxes in the first column.

Responsive table without selectable items

Responsive table without selectable items

Single selection

Single selection

Single selection with radio buttons. Use only if row clicks are used for something else, such as navigation.

Single selection with radio buttons. Use only if row clicks are used for something else, such as navigation.

Multiselection

Multiselection

Group

To group items, a group header is displayed (sap.m.GroupHeaderLisItem). The group header is not interactive.

Group headers

Group headers

Show Aggregations

To show aggregations, such as totals, use the table footer (sap.m.Column, aggregation: footer).

Do not show aggregations in growing mode. It is not clear whether an aggregation only aggregates the items loaded into the front end, or all items.

Showing totals on the table footer

Showing totals on the table footer

Load Items

To show more than 200 items, use growing mode (sap.m.Table/ sap.m.ListBase, properties: growing, growingThreshold, growingScrollToLoad, growingTriggerText). Growing mode allows only the first few items to be loaded. Additional items are only loaded (and rendered) on request, which improves performance. The request can be submitted via scrolling, which is the preferred method, or by clicking the More button.

If you use the More button, show the number of items already loaded and the total number items below the word More if possible.

Do not show more than 1,000 items overall, even in growing mode. Since the responsive table renders all items, showing more than 1,000 items can lead to performance issues.

Do not show aggregations if growing mode is used. Do not display an item count on the table toolbar if growing mode is used. Use the count below the More button instead.

More button is permissible, but scrolling is preferred

More button is permissible, but scrolling is preferred

Keyboard

The responsive table knows two different modes for keyboard interaction:

  1. The navigation mode allows fast navigation on the whole screen (sap.m.Table/ sap.m.ListBase, property: keyboardMode, value: Navigation). This is the default keyboard mode of the responsive table. In this mode, the focus moves to one line item and to the controls inside this item before if leaves the table. The tab chain is kept short. If the focus is on the line item, it can be moved to other items using the arrow keys. In addition, F7 toggles the focus between item level and control level.

Use the navigation mode if:

2. The edit mode allows fast editing of the whole table (sap.m.Table/ sap.m.ListBase, property: keyboardMode, value: Edit). In this mode, focus moves to each interactive control inside all items before it leaves the table. The tab chain gets very long.

Use the edit mode if:

To provide better accessibility support, please ensure that your tab chain is kept short. If you use the keyboard mode “edit”, make sure that there is also a possibility to switch to the keyboard mode “navigation”.
Exception: The table is very short and contains only a very limited number of interactive controls, where the tab chain is anyway short.

Line Item Level

Delete Single Item Rows

To delete single item rows, use the table in the mode “delete” (sap.m.Table/ sap.m.ListBase, property: mode, value: sap.m.ListMode.Delete). This adds Delete buttons to each line item. Clicking this button triggers the deletion of the corresponding line item.

Do not use this mode if deleting multiple lines at once is the preferred use case.

Delete is a mode of the responsive table and can therefore not be used together with single selection or multiselection.

Responsive table in delete mode

Responsive table in delete mode

Because the controls inside line items are handled by the corresponding control behaviors, clicking on an interactive control within a line item does not trigger the navigation event.

To allow navigation from a line item, set sap.m.ListType to “navigation” within the corresponding item (sap.m.ColumnListItem/ sap.m.ListItemBase, property: type, value: sap.m.ListType.Navigation). This will create indicator at the end of the line (“>”) and the entire line item will become clickable. Clicking on the line triggers the navigation event. Use this to navigate to a new page containing line item details. In rare cases, you can also use the navigation mode for category navigation without navigating to another page.

If no navigation is possible, set sap.m.ListType to “inactive”.

Navigation is a list item type and can therefore not be used together with “edit”, or in combination with click events for the entire item (“active”).

Navigation indicator

Navigation indicator

Edit Line Items

To allow editing a line item details page, set sap.m.ListType to “detail” within the corresponding item (sap.m.ColumnListItem/ sap.m.ListItemBase, property: type, value: sap.m.ListType.Detail or sap.m.ListType.DetailAndActive). This will create an Edit button at the end of the line. Clicking the button triggers the edit event. Use this event to switch the corresponding line item to edit mode.

Edit is a list item type and can therefore not be used together with “navigation” or in combination with click events for the entire item (“active”).

Edit button

Edit button

Click an Item

Items as a whole can be clickable. An event is fired by clicking on the item (anywhere where there is no interactive control inside the item). Apps can react on the event, such as by opening a dialog(sap.m.ColumnListItem/ sap.m.ListItemBase, property: type, value: sap.m.ListType.Active or sap.m.ListType.DetailAndActive).

Active elements do not have a visual indication and can therefore not be differentiated from non-active elements.

Active is a list item type and can therefore not be used together with “navigation” or “edit”. In addition, “active” uses the whole item as a clickable area and therefore cannot be used together with a single-selection table.

Active element

Active element

Cell Level

Show Information

In contrast to traditional tables, such as an analytical table or a tree table, a cell can contain more than just one line of text.

Several lines of text within one cell

Several lines of text within one cell

Add Controls

Beside textual elements, you can add any control to a table cell.

Controls inside cells

Controls inside cells

Any control can be placed inside a cell

Any control can be placed inside a cell

A cell can contain more than one control and more than one data point.

The view settings dialog allows you to sort, filter, and group by each of these data points.

Several controls per cell

Several controls per cell

Guidelines

Table Title

Implement the table title by using a toolbar control.

Use a table title if the title of a responsive table is not indicated in the surrounding area. Do not use a table title if it would just repeat text that is already above the responsive table.

Use a table title if you need the table toolbar. To avoid repeating text, feel free to use generic text as a table title, such as Items.

If you use a table title, be sure to include one of the following:

Table title

Table title

  • Or an item count using the following format: Items (Number of Items). For example, Items: 2. You can combine an item count with variant management.
  • Do not use an item count together with “growing mode”.

Table title with item count

Table title with item count

Loading Data

To indicate that the table is currently loading items, use the busy state. (sap.m.Table, property: busy). Do not show any items or text. As soon as the data is loaded, remove the busy state and show all items.

Table in busy state while loading data

Table in busy state while loading data

Columns – Best Practices

Minimize the number of columns:

If the responsive table does not fit on the screen width:

At the smallest size, keep the following information in the table layout:

If both of these do not fit on the respective screen width, keep just the column with the line item identifier in the tabular layout.

The responsive table assigns the same width to each column by default. It is recommended that you overwrite this default to provide optimal space for your content (sap.m.Column, property: width).

Optimize column width for its initial content (sap.m.Column, property: width). If the content is dynamic, optimize column width for typical content.

If you need more columns than those that fit on a tablet screen, which is usually five, to fulfill 80% of your main use cases, offer an option to add, remove, and rearrange columns via the table personalization dialog. Before doing so, try to reduce the number of columns, for example, by using several lines per column or by utilizing the pop-in function. See the cheat sheet for an example.

Column Headers – Best Practices

Within the column header, provide a label for each column (sap.m.Column, aggregation: header). The column header label is reused as a label in the pop-in area.

Exception: If the column does not pop in, you can leave out the column header label as long as at least one column still has a column header label.

Use controls that wrap, for example, text. Do not use controls that truncate, such as labels.

Do

Do: wrap column headers

Do: wrap column headers

Don't

Do not: truncate column headers

Do not: truncate column headers

Column headers (sap.m.Column, aggregation: header) usually contain links or text-based controls.

Column headers can also contain other kinds of SAP Fiori controls. However, the column header cannot be aligned vertically, making it difficult to use many controls in the column header. Using other kinds of controls also creates problems with pop-in behavior and could thus lead to accessibility issues. Therefore, exercise caution when using them in a column header.

Accepted: Link as column header text (used rarely)

Accepted: Link as column header text (used rarely)

Content Alignment

For alignment of cell content, follow the guidelines below (sap.m.Column, properties: halgin, valign, sap.m.ColumnListItem, property: VAlign). Align the column header horizontally according to the cells’ content.

Left-align: text, IDs, phone numbers, URLs, passwords, and email addresses.

Left-alignment of text

Left-alignment of text

Right-align: numbers and amounts, except IDs, to ensure comparability of such figures.

Right-alignment of numbers

Right-alignment of numbers

Right-align: dates and times (to ensure comparability for most formats and locales).

Right-alignment of dates

Right-alignment of dates

In general, center one-word status information and icons:

If there is an icon and text, or if the status contains more than two words in the English language, left align the entire status column.

Center-alignment of one-word texts

Center-alignment of one-word texts

Vertical alignment:

Top-align where possible to facilitate reading the content on one line.

Do not use top-alignment if it results in a peculiar layout. This usually happens when controls that need more vertical space are combined with text-only controls, such as input fields. In this case, try center-alignment instead and fine tune it until the layout fits.

Do

Do: use top-alignment where possible

Do: use top-alignment where possible

Don't

Do not: rigidly use top alignment if it does not make sense

Do not: rigidly use top alignment if it does not make sense

Content Formatting

The responsive table provides flexibility, including multiline cells, by enabling every control to be put into a cell.

As a key identifier of an item, use an object identifier. Show the key identifier in the first column. Formore information, see object display components.

If the screen width is small, do not hide this column or move it to the pop-in area.

Object identifier

Object identifier

Strings with IDs: If the responsive table contains more single-line data, show the ID in brackets after the corresponding string.

This minimizes the line height.

For items with a small line height, place the ID in brackets after the corresponding string

For items with a small line height, place the ID in brackets after the corresponding string

Strings with IDs: If line height is already large, show the ID below the corresponding string. Use the object identifier to do so.

For items with a large line height, place the ID below the corresponding string

For items with a large line height, place the ID below the corresponding string

For status information, use semantic colors on the foreground elements.

For status information on text: If the status is actionable, add a transparent icon button next to the text.

Semantic colors on text

Semantic colors on text

Avoid truncation. Use controls that wrap the text.

For example, use text instead of a label.

Do

Do: wrap text

Do: wrap text

Don't

Do not: truncate text

Do not: truncate text

For editable content, use input fields and other interactive controls within the table cells. If you need edit mode, change your text controls, such as labels, text, and links, to input fields or other appropriate controls as soon as you switch to edit mode, but not before.

You can do this by changing the control or, in more complex cases, by exchanging the whole responsive table.

Interactive controls – In line

Interactive controls – In line

If there is no value for a cell, leave it blank. Do not display text as N/A.

Leave empty fields blank

Leave empty fields blank

Numbering items:

  • If the item number has four digits/letters or less and is equally important as the corresponding description, concatenate the item number with the description and show it in one column.
  • If the item number has five digits/letters or more, or if it is more important than the corresponding description, for example, when no description is available, use a separate column for the item number.
  • If the item number is more like an ID in regards to its description, use ID formatting, such as Description (ID).

For short numbers, add the item number to the description

For short numbers, add the item number to the description

Try not to display an empty responsive table. If there is no way around this, provide instructions on how to fill the table with data (sap.m.Table/ sap.m.ListBase, properties: showNoData, noDataText).

Provide meaningful instructions

Provide meaningful instructions

Item States

To show that an item is unread, use the corresponding flag (sap.m.Table, property: showUnread, sap.m.ColumnListItem/ sap.m.ListItemBase, property: unread). This shows most of the content in bold font.

An unread item

An unread item

To show that an item has been modified, for example, within the global edit flow, add the string (Modified) at the bottom of the column that identifies the line item.

A modified item

A modified item

To show that a modified item has an error, for example, within the global edit flow, add the string (Contains errors) at the bottom of the column that identifies the line item. Use an object status control with the error state for it (sap.m.ObjectStatus, property: state, value: sap.ui.core.ValueState.Error).

A modified item with an error

A modified item with an error

To show that an item is locked, use a transparent-style button with the corresponding icon and the text Locked by [name] at the bottom of the identifying column. The user can click or tap the button to open a quick view of the person.

A locked item

A locked item

To show that an item is in a draft state, use a transparent-style button with the text Draft at the bottom of the identifying column. The user can click or tap the button to open a popover showing the timestamp of the last change.

Item in draft state

Item in draft state

Show only one state at any one time.

Numbers and Units

Show the unit of measurement together with the number within the item rows.

Do not put the unit in the column header. Do not use an additional column to show the unit of measurement. This is also valid for prices.

Unit of mesaurement – In line

Unit of mesaurement – In line

For numbers with units, show the correct formatting by using the object number control.

Object number

Object number

For the most important number with its unit, show the correct formatting by using the object number control and the emphasized flag.
Exception: If all numbers are of equal importance, emphasize none of them.

If the screen width is small, do not hide this column or move it to the pop-in area.
Exception: If the column containing the object identifier and the column containing the key attribute do not fit together on the screen, move the column containing the key attribute to the pop-in area.

Object number (emphasized)

Object number (emphasized)

Actions

To trigger actions on multiple items, use a multiselection table (sap.m.Table, property: mode, value: sap.m.ListMode.MultiSelect):

Do not offer action triggering on multiple items if the table is expected to have fewer than 10 items in most cases.

To trigger actions on a single item only (sap.m.Table, property: mode, value: sap.m.ListMode.SingleSelectMaster):

OK: Place actions near to the objects to which they belong

OK: Place actions near to the objects to which they belong

The following actions on single items must always be in-line:

Delete: Use “Delete” table mode (sap.m.Table/ sap.m.ListBase, property: mode, value: sap.m.ListMode.Delete). This places a Delete button at the end of each row.

Delete button

Delete button

Navigation: Use the “Navigation” column list item type (sap.m.ColumnListItem/ sap.m.ListItemBase, property: type, value: sap.m.ListType.Navigation). This places a Navigation indicator at the end of each row.

Use this to navigate to a new page containing line item details. In rare cases, you can also use this for navigation within the table without navigating to another page.

Navigation indicator

Navigation indicator

Edit: Use the “Detail” column list item type (sap.m.ColumnListItem/ sap.m.ListItemBase, property: type, value: sap.m.ListType.Detail). This places an Edit icon at the end of each row.

Edit button

Edit button

From these three actions (delete, navigation, and edit), you can combine delete and edit, or delete and navigation.

Edit and navigation cannot be combined.

To trigger actions that are independent of the selection, show the actions on the table toolbar. Examples of such actions are add, edit (in the sense of changing the whole table to edit mode), sort, filter, group (or view settings), and table personalization.

To trigger a default action on the whole line item, use the “Active” or “DetailAndActive” column list item type (sap.m.ColumnListItem/ sap.m.ListItemBase, property: type, value: sap.m.ListType.Active).

Active items trigger an event when clicked, which can be handled by apps, for example, to open a dialog. Clicks on interactive controls within the item do not trigger the event, but are handled by the interactive control.

Do not use this for navigation, to switch the line item to an edit state, or to delete the item.

Active can be combined with edit and delete, but not with navigation. Do not combine active with single selection.

When you add an item, add the row:

When you add items, ignore the sort, filter, and group settings when the item is added. As soon as the responsive table is sorted, filtered, and grouped again, the new item is handled accordingly, but not before.

Editable Content

For editable content, use input fields and any other interactive controls within the table cells that meet your input needs.

All SAPUI5 controls can be used.

If you need edit mode, change your text controls, such as label, text, and link, to input fields, or other appropriate controls as soon as you switch to edit mode, but not before.

You can do this by exchanging the control or, in more complex cases, by exchanging the whole responsive table.

For mass editing items:

This is similar to mass editing in the split screen app.

View Settings: Sort, Filter, and Group

Sort, filter, and/or group settings are handled in the view settings dialog. This dialog can provide any combination of these three settings, including just one setting, such as sort only.

  • If sorting, filtering, and/or grouping are a common use case in your app, offer one, two, or all three of the corresponding features in one or more view settings dialogs. Note: Do not offer these features if the table is expected to have only a small number of entries (up to 20 in most cases).
  • If filtering is a main use case, do not offer filtering in the view settings dialog. Use the filter bar instead.

To trigger the view settings dialog, provide several buttons, one for each of these view settings. Each button opens a view settings dialog that contains only the relevant page.

You should always use only the view settings you really need. For example, do not offer grouping if it does not support your use case well.

Using the view settings dialog allows you to define several sort, filter, and/or group settings per column. Thus, you can sort, filter, and/or group a column with several data points independently by each data point.

Several triggers for the different view settings (sort, filter, group)

Several triggers for the different view settings (sort, filter, group)

To display the current filter state, use the infobar below the table title. A click on the infobar opens the view settings dialog on the filter page.

Show the infobar only if the filter settings are not shown somewhere else. For example: Do not show the infobar for settings taken in the filter bar or in a select placed in the table toolbar.

If the infobar is shown, provide an option to reset all corresponding filters on the infobar.

Filtered table

Filtered table

To display the current group state, group headers are shown.

On the group header, show the following text (sap.m.GroupHeaderListItem, property: title):

[Label of the grouped column]: [Grouping Value]

Grouped table

Grouped table

Persist the view settings. When a user reopens the app, show the analytical table with the same sort, filter, and group settings as last defined by this user.

Personalization

To add, remove, or rearrange columns, use the table personalization dialog. Trigger the dialog via a button in the table toolbar.

Offer personalization if you need more columns than those that fit on a tablet screen, which is usually five, to fulfill 80% of your main use cases. Before doing so, try to reduce the number of columns, for example, by using several lines per column or by utilizing the pop-in function. See the cheat sheet for an example.

View settings and table personalization icons

View settings and table personalization icons

Persist the column layout settings. When a user reopens the app, show the responsive table with the same column layout as last defined by this user.

Properties

sap.m.Table

The following additional properties are available for the responsive table:

sap.m.Column

The following additional properties are available for sap.m.Column:

sap.m.ColumnListItem

The following additional properties are available for sap.m.ColumnListItem:

Resources

Want to dive deeper? Follow the links below to find out more about related controls, the SAPUI5 implementation, and the visual design.

Elements and Controls

Implementation

Visual Design