sapui5tutors SAPUI5 • Fiori • SAP BTP Step-by-step tutorials Real project examples Interview Q&A
Practical SAPUI5 • Fiori • SAP BTP tutorials and interview prep

sap.ui.table.Table vs sap.m.List: Choosing the Right Control for Large Datasets in SAPUI5

Pick the wrong list control in SAPUI5 and your app pays for it. A sap.m.List rendering ten thousand rows will stutter, scroll badly, and eat memory. A sap.ui.table.Table used for a simple five-item menu looks clunky and over-engineered. Both controls display collections — but they're built for very different jobs.

This post walks through when to reach for each one, with working code for both, and the performance habits that keep large datasets smooth.


The short answer

Use sap.m.List when the dataset is small (dozens of items), the layout is simple, and the app runs mostly on phones. Think inboxes, notification feeds, master lists in a master-detail app.

Use sap.ui.table.Table when the dataset is large (hundreds to thousands of rows), users need columns, and sorting, filtering, or resizing columns matters. Think ALV-style reports, worklists, data-heavy back-office screens.

The rule of thumb: sap.m.List is for browsing, sap.ui.table.Table is for working with data. If users sort, filter, or compare values across rows, you want the table.

sap.m.List in practice

The sap.m.List control renders items in a single column. Each item can carry a title, description, icon, counter, and info states. It's the mobile-first control — it looks native on phones and adapts well to narrow screens.

<List id="orderList"
      items="{/Orders}"
      mode="SingleSelectMaster"
      selectionChange="onSelectOrder">
  <StandardListItem title="{OrderID}"
                      description="{CustomerName}"
                      info="{Status}"
                      infoState="{= ${Status} === 'Open' ? 'Warning' : 'Success' }"
                      icon="sap-icon://sales-order"/>
</List>

That's it — bound, rendered, done. The mode property gives you selection behavior for free, and growing="true" adds lazy loading so the list fetches more items as the user scrolls:

<List items="{/Orders}"
      growing="true"
      growingThreshold="20"
      growingScrollToLoad="true">
  ...
</List>

With growing enabled, the list only renders what's visible plus a small buffer. That handles a few hundred items gracefully. Beyond that — a thousand or more — even growing lists start to feel heavy, because every rendered item is a full control instance in the DOM.


sap.ui.table.Table in practice

The table control renders a true grid: fixed header row, scrollable body, resizable columns, built-in sorting and filtering per column. It's the spiritual successor to the classic ALV grid, and it shows.

<t:Table id="orderTable"
         rows="{/Orders}"
         visibleRowCount="12"
         selectionMode="MultiToggle"
         rowSelectionChange="onSelectRows">
  <t:columns>
    <t:Column sortProperty="OrderID" filterProperty="OrderID" width="8rem">
      <Label text="Order"/>
      <t:template>
        <Text text="{OrderID}"/>
      </t:template>
    </t:Column>
    <t:Column sortProperty="CustomerName" filterProperty="CustomerName">
      <Label text="Customer"/>
      <t:template>
        <Text text="{CustomerName}"/>
      </t:template>
    </t:Column>
    <t:Column sortProperty="NetAmount" hAlign="End" width="10rem">
      <Label text="Net Value"/>
      <t:template>
        <ObjectNumber number="{NetAmount}" unit="{Currency}"/>
      </t:template>
    </t:Column>
  </t:columns>
</t:Table>

Notice what's free here: clicking a column header sorts. The filter icon in the header opens a filter dialog. Users resize columns by dragging. None of that needs custom code — set sortProperty and filterProperty and the control does the rest.

The table also virtualizes rows aggressively. With visibleRowCount="12", only about a dozen row controls exist in the DOM no matter how many rows the binding holds. Ten thousand rows? The DOM doesn't care. That's the fundamental performance difference from sap.m.List.

If the dataset can grow without bound — search results, log viewers, line-item reports — sap.ui.table.Table is the safe default. Its row virtualization keeps the DOM small regardless of data volume.

Side-by-side comparison

It helps to see the trade-offs lined up:

Layout. List is single-column and stacks vertically; it shines on phones. Table is multi-column and wants horizontal space; on phones it scrolls sideways, which is workable but not delightful.

Sorting and filtering. Table has them built in per column. List has none — you'd build custom sort/filter controls above it.

Selection. Both support single and multi selection. Table adds range selection patterns familiar from spreadsheets.

Row virtualization. Table virtualizes by design. List virtualizes only with growing, and even then each item is heavier.

Look and feel. List follows the Fiori mobile aesthetic — comfortable touch targets, swipe actions. Table follows the desktop grid aesthetic — dense, precise, keyboard-friendly.

Responsive behavior. Neither control is magically responsive. A table with eight columns on a phone needs horizontal scrolling or a column-hiding strategy (the minScreenWidth on columns helps — columns below the threshold hide automatically).

<t:Column minScreenWidth="Tablet" demandPopin="true">
  <!-- This column collapses into a pop-in on phones -->
</t:Column>

The demandPopin property is worth knowing: instead of vanishing on small screens, the column's values pop into the row as stacked labels. Users on phones still see the data, just reformatted.


Performance habits for large datasets

Choosing the table is step one. These habits matter just as much:

Page at the OData layer, not in the browser. Set $top and use $skip via the binding's growing or the table's threshold. Pulling 50,000 entities into a JSONModel and binding the table to it defeats the purpose — the browser now holds all that data in memory.

// Let the backend page: the table requests only visible ranges
oTable.bindRows({
  path: "/Orders",
  parameters: { $top: 100 }  // initial chunk; more fetched on scroll
});

Keep row templates light. Every control inside t:template is cloned per visible row. A template with five nested layouts and three formatted texts multiplies fast. Prefer sap.m.Text over heavy composites inside cells.

Defer expensive formatters. A formatter that runs per row per render adds up across thousands of rows. If the value rarely changes, format it once in the model instead of in a binding formatter.

Use visibleRowCountMode="Auto" thoughtfully. Auto mode fills available height, which is nice — but inside a scrolling page it can request hundreds of rows. Fixed visibleRowCount inside a DynamicPage content area is usually more predictable.


When the answer is "both"

Plenty of apps legitimately use both. The classic Fiori master-detail pattern: a sap.m.List as the master (dozens of orders, phone-friendly), and a sap.ui.table.Table on the detail page showing that order's hundreds of line items with sortable columns.

Another common split: list for the mobile experience, table for the desktop experience, toggled by device. UI5's Device API makes this a few lines:

if (Device.system.phone) {
  // show the List variant
} else {
  // show the Table variant
}

That's more maintenance, so reserve it for screens where the mobile and desktop experiences genuinely diverge.


Bottom line

Small data, simple layout, mobile-first: sap.m.List. Large data, columns, sorting and filtering: sap.ui.table.Table. When in doubt about data volume, pick the table — its virtualization forgives growth, while a list chokes on it.

The deeper principle: match the control to what the user does with the data, not just what the data looks like. Browsing is a list job. Analyzing is a table job.