SAP Fiori Elements & Floorplans

SAP Fiori Elements

SAP Fiori elements is a SAPUI5 framework that renders SAP Fiori apps from OData service metadata, UI annotations and an app descriptor, using predefined floorplans such as the list report and the object page instead of hand-written views and controllers. SAP Fiori elements trades layout freedom for consistent design, built-in enterprise features and less UI code to maintain.

Quick facts

Type
Metadata-driven UI framework built on SAPUI5
Layer
UI applications
Inputs
OData V2 or V4 service, UI annotations (CDS or XML), manifest.json settings
Floorplans
List report, object page, worklist, analytical list page, overview page
Typical back ends
RAP services in ABAP, CAP services on SAP BTP
Who works with it
SAP Fiori developers, ABAP and CAP developers, UX designers
Applies to
SAP S/4HANA (all editions), SAP BTP
Layer: UI applicationsWhere it sits ▾
Where it sits: L3 · UI applicationsLayer: UI applications.L1L2L3L4L5L6BTP

Layer: UI applications

Open the architecture map →

How does SAP Fiori elements work?

SAP Fiori elements moves UI decisions from code into metadata:

  1. An OData service exposes the business entities, for example purchase orders and their items.
  2. Annotations describe how the UI should present them: UI.SelectionFields for filter fields, UI.LineItem for table columns, UI.HeaderInfo for object titles, UI.Facets for object page sections.
  3. The app descriptor (manifest.json) selects a floorplan template for each page and sets options such as initial loading or mass edit.
  4. At runtime, the framework reads metadata, annotations and descriptor and builds the pages, including filter bar, variants, tables, forms, messages and navigation.
  5. Where the generated page falls short, developers add extensions instead of rewriting the page.

The developer's main work is therefore in the service and its annotations, not in JavaScript. SAP Fiori elements turns a well-annotated service into a working app, and a poorly annotated one into a poor app.

Which floorplans does SAP Fiori elements offer?

FloorplanPurposeOData V2OData V4
List reportFind, filter and act on many objectsFloorplanFloorplan
Object pageDisplay, edit and create one objectFloorplanFloorplan
WorklistProcess a known set of items without complex filteringOwn floorplanConfiguration of the list report
Analytical list pageAnalyze with charts and act on the itemsOwn floorplanConfiguration of the list report
Overview pageCards that summarize a domainFloorplanFloorplan

OData V4 adds building blocks and custom pages, so developers can combine standard elements with their own SAPUI5 code inside the same app. The list report paired with the object page is the classic combination, often abbreviated LROP. Choosing a floorplan in SAP Fiori elements means choosing an interaction pattern, not a visual template.

OData V2 or V4: which should you use with SAP Fiori elements?

SAP recommends SAP Fiori elements for OData V4 for new applications and states that the OData V2 variant remains fully supported. In practice the choice depends on three factors:

  • Back end: RAP service bindings can publish a UI service as OData V2 or V4, and CAP serves OData V4 by default. Services built in SEGW are typically OData V2.
  • Extension needs: building blocks and the flexible programming model are available only with OData V4.
  • Existing apps: an app that works on V2 does not need migration to keep running; configuration settings differ between the two, for example initialLoad in V4 versus loadDataOnAppLaunch in V2.

For a new custom app on a current SAP S/4HANA or SAP BTP back end, OData V4 is the default choice in SAP Fiori elements, and V2 is the pragmatic choice when the service already exists.

When should you use SAP Fiori elements instead of freestyle SAPUI5?

SAP Fiori elements fits when the task follows a standard pattern: search a list, open an object, edit it, run actions. The framework delivers filter bars, variant management, tables, drafts, messages, accessibility and translation support without custom code, and SAP keeps those features current across SAPUI5 releases.

Freestyle SAPUI5 fits when the interaction itself is unusual: a planning board, a guided scanner flow, a highly visual layout, or data from sources that are not OData. Freestyle code gives full control and full responsibility for maintenance.

SAP's own guidance treats the two as combinable rather than exclusive: start from SAP Fiori elements, use building blocks, and write freestyle code only for the gaps. A useful decision test is whether stakeholders can accept the floorplan's layout for at least the main screens. SAP Fiori elements is the better choice whenever the requirement is a business object, not a bespoke interaction.

How do you extend an SAP Fiori elements app?

Extension options depend on who owns the app:

  • Your own app: extension points let developers add custom columns, actions, sections, header facets and filters; with OData V4, the flexible programming model adds building blocks and custom pages.
  • An SAP-delivered app: adaptation projects, created with SAP Fiori tools, change or extend the app without modifying SAP's code; key user adaptation lets key users rearrange or hide fields at runtime.
  • The data side: a new field usually starts in the service and its annotations, not in the UI.

Availability differs by edition: in SAP S/4HANA Cloud Public Edition, check which of these paths SAP supports for the app in question. Every extension of an SAP Fiori elements app becomes code or configuration that someone must own through upgrades.

What are common mistakes with SAP Fiori elements?

  1. Fighting the floorplan. Large amounts of custom code to force a non-standard layout cancel the maintenance benefit; at that point freestyle SAPUI5 is often more honest.
  2. Treating it as no-code. Annotations are code in another form; they need review, versioning and tests.
  3. Ignoring draft handling. Edit scenarios without a draft-enabled service lose resume, locking and validation behavior that users expect.
  4. Leaving defaults unexamined. Initial loading, mass edit and table types have defaults that can load too much data or too little; set them deliberately.
  5. Annotating in two places. Annotations can live in back-end CDS and in local annotation files; local files override the service metadata, and the last file listed in manifest.json wins, so duplicates make behavior hard to trace.

Most SAP Fiori elements problems are service and annotation design problems that only become visible in the UI.

SAP Fiori elements vs. freestyle SAPUI5 vs. SAPUI5: what is the difference?

SAP Fiori elementsFreestyle SAPUI5 appSAPUI5
What it isFramework that generates pages from metadataApp with hand-written views and controllersThe UI framework both are built on
What developers writeAnnotations, descriptor settings, extensionsJavaScript or TypeScript, XML viewsNot applicable; it is the library
Layout freedomLimited to floorplans and extensionsFullFull
MaintenanceFramework features updated by SAPOwned entirely by the app teamVersioned library maintained by SAP

SAPUI5 is the toolkit; SAP Fiori elements and freestyle SAPUI5 are two ways of building apps with it.

FAQ

Is SAP Fiori elements the same as SAPUI5?

No. SAPUI5 is the JavaScript UI framework. SAP Fiori elements is built on SAPUI5 and generates complete pages from OData metadata and annotations, so developers configure floorplans instead of writing views and controllers. Both run in the same SAPUI5 runtime.

Does SAP Fiori elements require OData?

Yes. SAP Fiori elements reads the service metadata and annotations of an OData V2 or OData V4 service to build its pages. Data from other protocols has to be exposed as OData first, or the app has to use freestyle SAPUI5 for that part.

What were smart templates?

Smart templates is the former name of SAP Fiori elements. SAP documentation from earlier releases still uses the term, and practitioners occasionally do as well, but it refers to the same annotation-driven framework.

Can I add custom code to an SAP Fiori elements app?

Yes. Extension points allow custom columns, actions, sections and filters, and SAP Fiori elements for OData V4 adds building blocks and custom pages. The more custom code an app contains, the more it behaves like a freestyle app in terms of maintenance.

Which tools are used to build SAP Fiori elements apps?

SAP Fiori tools, a set of extensions for SAP Business Application Studio and Visual Studio Code, generates SAP Fiori elements apps, edits annotations and the descriptor, and visualizes page navigation. The back-end service is typically built with RAP or CAP.

Sources

Applies to
SAP S/4HANA on-premise · SAP S/4HANA Cloud Private Edition · SAP S/4HANA Cloud Public Edition · SAP BTP
Last reviewed

Go deeper

SAP, SAP Fiori, SAPUI5, SAP S/4HANA, SAP BTP and other SAP products and services mentioned are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. This guide is independent and is not affiliated with, sponsored or endorsed by SAP SE.