Sub topic 14
SAP Fiori as the User Interface Layer
Prerequisites and scope
This chapter assumes you know what an ERP system is, you have seen the module landscape from the earlier chapters (Finance, Procurement, Sales, Inventory, Manufacturing), and you understand basic relational concepts such as tables, keys, and joins. You do not need to know JavaScript. A few OData and CDS terms appear here. The chapter on embedded analytics covers CDS in depth.
SAP Fiori is the user experience layer of S/4HANA. It does not add business functions. It decides how users reach the functions that the modules already provide. Everything in the earlier chapters, such as creating a purchase order or posting a billing document, can be done through a Fiori app.
What Fiori is
Fiori is a set of design guidelines, a UI technology, and a catalog of ready-made apps. These three parts are easy to confuse.
- SAP Fiori design system. Rules for layout, navigation, colors, and behavior, so that apps from different modules look and act alike.
- SAPUI5. The JavaScript UI framework that runs in the browser and renders Fiori apps. SAPUI5 is delivered with the S/4HANA front-end server and is also available as open-source OpenUI5.
- Fiori apps. Individual applications such as "Manage Purchase Orders" or "Post Goods Movement", delivered by SAP and grouped by business role.
The older interface was SAP GUI, a desktop client built around transaction codes such as ME21N (create purchase order) or VA01 (create sales order). SAP GUI still works in on-premise and Private Edition systems, and many Fiori apps wrap or replace the same business logic. Cloud Public Edition is designed around Fiori and does not offer SAP GUI for normal business use.
Architecture: browser, front end, back end
A Fiori app is a thin client. The browser loads the UI, and the UI talks to the back end through services.
The steps are:
- The user opens the app from the Fiori launchpad. The browser downloads the SAPUI5 code.
- The app calls an OData service. OData is a standard REST-style protocol for reading and changing data over HTTP.
- The service reads data through a CDS view (a modeled database view, covered later) or calls business logic such as the RAP business objects used for transactional apps.
- HANA runs the query and returns the result. The app shows it.
Because the data model is exposed through services, a Fiori app never reads tables such as ACDOCA directly. It consumes a CDS view that sits on top of the table. This is why the same Finance data can power a list report, an analytical tile, and an external integration without duplicating logic.
The Fiori launchpad
The Fiori launchpad is the single entry point. It shows tiles, each of which starts an app or displays a live number, such as the count of open purchase orders.
Launchpad content is organized in layers.
| Concept | What it is | Example |
|---|---|---|
| Business role | A set of authorizations and content for a job | Accounts Payable Accountant |
| Catalog | A technical collection of apps a role may use | Apps for supplier invoices |
| Group or space and page | How tiles are arranged for the user | A "Procurement" space with a page of purchasing tiles |
| Tile | A visible shortcut to one app, optionally with a KPI | "Overdue Supplier Invoices: 14" |
| Target mapping | Links a tile to the actual app and its parameters | Semantic object and action `PurchaseOrder-manage` |
Newer releases use spaces and pages to arrange content by role. Older ones use groups. In both models the launchpad shows only what the user's roles allow. If a tile is missing, the cause is almost always a missing role or catalog assignment, not a broken app.
Types of Fiori apps
Fiori apps fall into three broad types, and the type tells you what to expect from them.
- Transactional apps let users create or change business documents, such as entering a sales order or posting a goods receipt.
- Analytical apps show KPIs and drill-down data built on CDS views, such as a cash position overview.
- Fact sheets show a read-only view of one object, such as a supplier, with links to related objects like open orders and invoices.
SAP also provides Fiori elements. These apps are generated from metadata (annotations on CDS views) instead of hand-written UI code. Common floorplans are the list report with object page, the worklist, and the overview page. When an app is built with Fiori elements, a change to the CDS annotations changes the screen, with no front-end coding.
How Fiori maps to the modules
Fiori does not change which module owns the process. It reorganizes access around roles rather than around module menus.
| Module area | Example Fiori app | Underlying process step |
|---|---|---|
| Procurement | Manage Purchase Orders | Create and change purchase orders in procure-to-pay |
| Inventory | Post Goods Movement | Goods receipt that updates stock and triggers Finance postings |
| Sales | Manage Sales Orders | Create and track sales orders in order-to-cash |
| Finance | Manage Journal Entries | Review postings in the Universal Journal |
| Manufacturing | Manage Production Orders | Plan-to-produce execution |
Exact app names and IDs vary by release, so check the SAP Fiori apps reference library for your version. The library lists, for each app, the required roles, the OData services, and whether it runs on-premise, in Cloud Public Edition, or both.
Deployment considerations
Where the Fiori front-end server runs depends on the deployment option.
- On-premise and Private Edition. The administrator activates OData services, assigns catalogs and roles, and applies SAP Notes. The front-end server can be embedded in the S/4HANA system or run as a separate hub. The embedded setup is the usual choice for recent releases because it has fewer moving parts.
- Cloud Public Edition. SAP runs the stack. Customers assign business roles and arrange spaces and pages, but they do not install front-end components.
Common errors
Most Fiori problems fall into a few patterns.
- Tile is missing. The user lacks the business role, or the catalog is not assigned to a space or page. Check role assignment first.
- Tile shows but the app fails with "no authorization". The catalog is present, but the user lacks authorization for the back-end object or OData service.
- Service not found, or HTTP 404 on an OData call. The OData service is not activated or registered on the gateway. Activate it in the service maintenance transaction (
/IWFND/MAINT_SERVICE). - Old data after configuration change. The launchpad and front-end metadata are cached. Clear the caches with the launchpad cache cleanup report, then retest.
- App behaves differently in two systems. The releases differ. Compare the app versions, not only the app names.
Fiori and the clean core
Fiori also matters for extensibility, which a later chapter covers. Because the UI is built on services and annotations, many changes are made without touching SAP code. Key users can adapt apps through built-in tools: hide fields, add fields, rearrange sections, and change labels. These adaptations are stored separately and survive upgrades. This keeps the core clean, since the change lives in a managed layer rather than in modified SAP objects.
Reading Fiori data with ABAP
Under the app, the data is the same data you queried in earlier chapters. The following query reads sales order headers and items, the data that the "Manage Sales Orders" app shows in its list.
SELECT FROM vbak
INNER JOIN vbap ON vbap~vbeln = vbak~vbeln
FIELDS vbak~vbeln, vbak~kunnr, vbap~posnr, vbap~matnr, vbap~netwr
WHERE vbak~vkorg = '1010'
INTO TABLE @DATA(order_items)
UP TO 100 ROWS.A real app reads through a CDS view instead of the tables. The view applies authorization checks, currency conversion, and text lookups, which a raw query like this one does not.
Exercise
A purchasing clerk reports that the "Manage Purchase Orders" tile does not appear on her launchpad, although her colleague sees it. Name the first two things you check, and explain why checking the OData service activation is not the first step.
Show answer
First check that the clerk has the business role that contains the purchasing catalog, then check that the catalog is assigned to a space and page that her role uses. Her colleague can open the same app, so the OData service is working for at least one user. Service activation is a system-wide setting, and a missing tile for only one user points to role or catalog assignment instead.
Exercise
Describe the path of a request from a Fiori list report to the data in the database, and say why the app does not read the table directly.
Show answer
The browser runs a SAPUI5 app. It calls an OData service on the gateway. The service reads a CDS view or runs business object logic, and HANA executes the query and returns the result to the app. The app uses the CDS view instead of the table so that authorization checks, currency handling, and texts are applied in one place, and so the same logic can be reused by other apps and integrations.