Fiori & OData — The Modern UI in SAP (2026 Guide)

Fiori & OData in SAP: The Modern UI Guide 2026 | ABAP Zero to Hero
ABAP Zero to Hero

Chapter 19  ·  Modern ABAP

Fiori & OData

How your RAP business object becomes a modern, browser-based SAP application — Fiori Elements, OData V4, and UI annotations.

Chapter 19 of 20 21 min read Part 4: Modern ABAP 10 Interview Q&A

In Chapter 17 and 18, you built a RAP business object. It has CDS Views, a Behavior Definition, validations, determinations, and actions. It is functionally complete — but you have not seen it yet. It lives in the backend, invisible.

This chapter makes it visible. Fiori is SAP’s modern UI framework. OData is the protocol that carries data between your RAP business object and the browser. Together, they turn your backend code into a real, usable application — with sorting, filtering, editing, and buttons — all without writing a single line of JavaScript.

The payoff moment This is where everything comes together. You will open a browser, see your Travel app, click a row, edit a field, watch a validation fire, and hit save — all powered by the CDS Views, Behavior, and EML you built in the last three chapters.

🎯 What You Will Learn in This Chapter

  • What SAP Fiori is and why it replaced classic SAP GUI
  • The difference between Fiori Elements and Freestyle apps
  • What OData is and how it carries data over HTTP
  • The difference between OData V2 and OData V4
  • How to create a Service Binding and expose a RAP business object
  • How to add UI annotations to control the Fiori app layout
  • How to preview your app in the browser from Eclipse ADT
  • What SAPUI5 is and where Fiori Elements fits

📘 What is SAP Fiori?

SAP Fiori is SAP’s modern User Experience (UX) framework. It defines how SAP applications should look and behave — consistently across every product, every device, every role.

Before Fiori, users worked in SAP GUI — the classic desktop client with grey screens and T-codes. Fiori replaces all of that with a browser-based, mobile-friendly interface based on modern web standards.

Fiori vs SAP GUI — the mindset shift

AspectSAP GUI (Classic)SAP Fiori (Modern)
InterfaceDesktop client, grey screensBrowser-based, responsive
NavigationT-codes, transaction treesRole-based tiles, search
Device supportDesktop onlyDesktop, tablet, mobile
DesignFunctional, uglyModern, minimalist
User typeTrained professionalsEveryone, including casual users
TechnologyDynpro (ABAP)SAPUI5 (JavaScript/HTML5)
The five Fiori design principles
  1. Role-based — Each user sees only what they need
  2. Responsive — Works on any screen size
  3. Simple — Clean, focused on the task
  4. Coherent — Consistent across all apps
  5. Delightful — Pleasant to use

🎨 Fiori Elements vs Freestyle

There are two ways to build a Fiori app. This is one of the most common interview questions, so understand it clearly.

AspectFiori ElementsFreestyle (SAPUI5)
How it is builtMetadata-driven — from CDS annotationsJavaScript code — hand-written UI
Code writtenZero UI codeFull UI code (JS, XML views)
Time to buildHoursDays or weeks
FlexibilityLimited to predefined templatesUnlimited
ConsistencyGuaranteed by SAPDeveloper’s responsibility
Use case80% of business apps — CRUD scenariosComplex custom dashboards, non-standard UX
Skill requiredABAP + CDS + annotationsABAP + JavaScript + SAPUI5
The rule of thumb If your app is “list of records + view/edit/create” — use Fiori Elements. If your app is a dashboard, a shopping cart, or a chat — use Freestyle. For ABAP developers, Fiori Elements is the primary skill.

Common Fiori Elements templates

TemplateWhat It Shows
List ReportA table of records with filters, sorting, and paging
Object PageDetail view of a single record with sections
Analytical List PageList with charts and KPIs on top
Overview PageCard-based dashboard
WorklistList focused on task processing

🔌 What is OData?

OData (Open Data Protocol) is a REST-based protocol for accessing data over HTTP. It is the standard interface between SAP backends and web frontends.

When your Fiori app calls the backend, it does not use RFC or plain HTTP. It uses OData. The URL looks like a REST API:

// Read all Travel records
GET /sap/opu/odata4/sap/zui_travel/srvd/sap/ztravel/0001/Travel

// Read one Travel by key
GET /sap/opu/odata4/sap/zui_travel/srvd/sap/ztravel/0001/Travel(TravelId='00000001')

// Create a new Travel
POST /sap/opu/odata4/sap/zui_travel/srvd/sap/ztravel/0001/Travel

// Update an existing Travel
PATCH /sap/opu/odata4/sap/zui_travel/srvd/sap/ztravel/0001/Travel(TravelId='00000001')

// Delete a Travel
DELETE /sap/opu/odata4/sap/zui_travel/srvd/sap/ztravel/0001/Travel(TravelId='00000001')
Why OData matters for ABAP developers You do not write these URLs. The RAP framework generates them from your Service Binding. But you need to understand OData because it is the contract between the backend and the frontend — and because half of all interview questions about Fiori are really about OData.

⚖️ OData V2 vs OData V4

There are two versions of OData in SAP. This distinction matters for RAP development.

FeatureOData V2OData V4
StandardOlder OASIS standardLatest OASIS standard
REST-nativePartiallyFully REST-native
Batch requestsSupportedSupported, cleaner syntax
Metadata formatXML onlyXML or JSON
Actions and functionsLimitedFull support, cleaner syntax
RAP supportLegacy scenarios✅ The standard for RAP
Used byS/4HANA classic Fiori appsAll new RAP and Clean Core apps
What to remember For all new RAP development, use OData V4. OData V2 still appears in legacy S/4HANA apps and older Fiori Elements versions, but it is not the target for new work.

🔗 Service Definition & Service Binding

You met these in Chapter 17. Here is what they do at the OData level.

Service Definition

A Service Definition declares which CDS entities of your business object are exposed. It is a short piece of code:

@EndUserText.label: 'Travel Service Definition'
define service ZUI_TRAVEL {
  expose ZC_Travel as Travel;
}

Service Binding

A Service Binding makes the Service Definition accessible as a real OData endpoint. It chooses the protocol version, generates the URL, and provides the preview.

PropertyOptions
ProtocolOData V2 (legacy) or OData V4 (recommended)
Binding typeODATA (standard) or UI (for Fiori preview)
URLGenerated automatically — copyable and shareable
PreviewClick to open in browser — no coding needed
What Fiori gets from a Service Binding The Fiori app does not talk to CDS Views directly. It talks to the OData service. The Service Binding is what makes the business object consumable by external systems, Fiori apps, mobile apps, and any tool that speaks OData.

🏷️ UI Annotations — The Layout Language

Fiori Elements builds its UI by reading annotations from your CDS View. No JavaScript — just annotations. Here are the ones you will use most.

The essential @UI annotations

AnnotationWhere It Shows
@UI.lineItemList report columns
@UI.identificationObject page header fields
@UI.selectionFieldFilter bar on the list report
@UI.facetGrouped sections on the object page
@UI.headerInfoTitle and subtitle of the object page
@UI.hiddenHide a field completely
@UI.dataPointKPI tiles (for analytical apps)

A fully annotated consumption view

@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Travel App'
@UI.headerInfo: {
  typeName: 'Travel',
  typeNamePlural: 'Travels',
  title: { type: #STANDARD, value: 'TravelId' }
}

define view entity ZC_Travel
  as select from ZI_Travel
{
  @UI.lineItem: [{ position: 10 }]
  @UI.identification: [{ position: 10 }]
  key TravelId,

  @UI.lineItem: [{ position: 20 }]
  @UI.selectionField: [{ position: 10 }]
      AgencyId,

  @UI.lineItem: [{ position: 30 }]
      CustomerId,

  @UI.lineItem: [{ position: 40 }]
      BeginDate,

  @UI.lineItem: [{ position: 50 }]
      EndDate,

  @UI.lineItem: [{ position: 60 }]
  @Semantics.amount.currencyCode: 'CurrencyCode'
      TotalPrice,

  @Semantics.currencyCode: true
      CurrencyCode,

  @UI.lineItem: [{ position: 70 }]
      Status
}
Why annotations matter Each @UI.lineItem becomes a column in the list view. Each @UI.identification becomes a field in the detail header. Each @UI.selectionField becomes a filter. The position value controls the order. All without writing a single line of code outside the CDS.

👀 Previewing Your App in the Browser

This is the moment everything comes together. In Eclipse ADT, you can preview the Fiori app directly — no deployment, no configuration.

1 Open the Service Binding

In ADT, navigate to your Service Binding. Double-click to open it.

2 Activate

Click Activate (Ctrl+F3). The service is now live.

3 Click Preview

In the Service Binding editor, click the Preview button. A browser window opens showing the Fiori Elements app.

4 Explore the app

You can now:

  • See all Travel records in the list report
  • Click a row to open the object page
  • Click Create to add a new Travel
  • Edit a field and see the change reflected
  • Click Approve (if you added the action in Chapter 18)
  • Watch a validation fire if you save invalid data
The payoff Everything you built in Chapters 16–18 — CDS Views, Behavior Definition, EML, Validations, Determinations, Actions — is now visible and interactive in the browser. This is why RAP is powerful: the same definitions power the backend and the UI.

🧱 SAPUI5 — What Sits Underneath

SAPUI5 is the JavaScript framework that powers all Fiori apps. It is SAP’s version of React or Angular — a library of UI controls, data binding, and routing.

What SAPUI5 provides

  • UI Controls — Tables, forms, buttons, charts, dialogs
  • Data Binding — Model-View-Controller pattern
  • Routing — Navigation between screens
  • Theming — Consistent look across SAP apps
  • OData Model — Built-in support for OData V2 and V4

The layers

LayerWhat It IsWho Builds It
SAPUI5JavaScript framework — controls, binding, routingSAP provides; developers use
Fiori ElementsTemplates that generate apps from annotationsDevelopers configure via annotations
Freestyle FioriCustom apps built directly on SAPUI5Frontend developers write JavaScript
RAP + CDSBackend that provides the OData serviceABAP developers (you)
As an ABAP developer You will almost never write SAPUI5 code. You provide the CDS Views, annotations, and Service Binding — Fiori Elements does the rest. That is the whole point of RAP + Fiori Elements.

⚖️ Fiori vs Web Dynpro — The Generational Shift

Before Fiori, SAP’s web UI framework was Web Dynpro ABAP. Understanding the difference helps in interviews, especially when someone asks “why are companies moving to Fiori?”

AspectWeb Dynpro ABAPSAP Fiori
TechnologyABAP-basedSAPUI5 (JavaScript/HTML5)
RenderingServer-sideClient-side
DesignFunctionalModern, minimalist
MobilePoorFull support
Still supportedYesYes — the future
Recommended for newNoYes

📝 Chapter Summary

  • SAP Fiori is SAP’s modern UI framework, replacing SAP GUI with browser-based, responsive apps.
  • Fiori Elements generates apps from CDS annotations — no JavaScript needed. It is the primary tool for ABAP developers.
  • Freestyle Fiori uses SAPUI5 code for custom layouts — used for non-standard apps.
  • OData is the REST protocol between Fiori and ABAP backends. RAP generates OData services automatically.
  • OData V4 is the modern standard — always use it for new development.
  • Service Definition exposes CDS entities; Service Binding turns it into a real OData endpoint.
  • UI annotations control the Fiori layout — lineItem for lists, identification for detail pages, selectionField for filters.
  • You can preview the Fiori app directly in Eclipse ADT from the Service Binding.
  • SAPUI5 is the JavaScript framework underneath all Fiori apps.

🎤 Interview Questions & Answers

Fiori and OData questions are asked in almost every modern ABAP interview, especially when the project involves S/4HANA or BTP. Know these cold.

1 What is SAP Fiori?

SAP Fiori is SAP’s modern user experience (UX) framework for building browser-based applications. It provides a consistent, role-based design language across all SAP products. Fiori apps run in any modern browser (Chrome, Edge, Safari), are responsive across devices, and are built on top of the SAPUI5 and OpenUI5 JavaScript frameworks.

2 What is the difference between Fiori Elements and Freestyle?

Fiori Elements apps are generated from metadata (CDS annotations and OData services) — no JavaScript is written. Freestyle apps are built with SAPUI5 code, giving complete control over layout and behavior. Fiori Elements is faster to build and used for 80% of standard apps. Freestyle is used when a truly custom UI is required.

3 What is OData?

OData (Open Data Protocol) is a REST-based protocol for accessing data over HTTP. It provides a standard way to query, create, update, and delete data using URLs and JSON. SAP Fiori apps consume OData services exposed from the ABAP backend. OData is the standard interface between SAP backends and web frontends.

4 What is the difference between OData V2 and V4?

OData V4 is the modern version of the OData standard. It is REST-native, supports batch requests, has better performance, and is what RAP uses. OData V2 is the older version still common in legacy SAP systems. For new development, especially with RAP and S/4HANA, always use OData V4.

5 What is a Service Binding?

A Service Binding in RAP exposes a Service Definition as an OData service. It chooses the protocol (OData V2 or V4), generates a runtime endpoint, and provides a preview URL. Without a Service Binding, a RAP business object cannot be consumed by Fiori apps or external systems.

6 What are UI annotations?

UI annotations are CDS annotations prefixed with @UI that control how a RAP business object is rendered in a Fiori app. Examples: @UI.lineItem puts a field in the list view, @UI.identification puts a field in the detail header, @UI.selectionField adds a filter, and @UI.facet groups fields into sections. UI annotations replace the need to write JavaScript UI code.

7 What is the difference between @UI.lineItem and @UI.identification?

@UI.lineItem controls which fields appear in the list view (the main table). @UI.identification controls which fields appear in the detail header (the object page). Both accept a position property that determines field order. Use lineItem for list columns, identification for object page fields.

8 How do you preview a Fiori app in ADT?

In Eclipse ADT, open the Service Binding and click the Preview button. This launches a browser window showing the Fiori Elements app connected to your RAP business object. You can navigate, create, edit, and delete data directly — verifying that your CDS annotations, behavior, and validations work end to end.

9 What is SAPUI5?

SAPUI5 is SAP’s JavaScript framework for building web applications. It provides UI controls (tables, forms, buttons, charts), data binding, routing, and MVC architecture. Fiori apps are built on SAPUI5. Fiori Elements is a higher-level abstraction built on top of SAPUI5 that generates apps from metadata.

10 What is the difference between Fiori and Web Dynpro?

Web Dynpro is SAP’s older web UI framework, used mainly in NetWeaver and classic ABAP systems. Fiori is the modern UI framework based on HTML5, CSS, and JavaScript (SAPUI5). Fiori apps are responsive, mobile-friendly, and role-based. Fiori replaced Web Dynpro as the recommended UI for S/4HANA and BTP.

🛠 Practice Task for This Chapter

Take the RAP business object you built in Chapter 17 and expose it as a full Fiori app.

  1. Enhance your consumption view: Open ZC_Travel and add @UI.lineItem annotations to at least 5 fields. Add @UI.selectionField to 2 fields for filtering.
  2. Add header info: Add @UI.headerInfo to declare the object page title (TravelId) and plural name (“Travels”).
  3. Create a Service Definition: If you have not already done so, create ZUI_TRAVEL that exposes ZC_Travel as Travel.
  4. Create a Service Binding: Choose OData V4 – UI as the binding type. Activate the binding.
  5. Click Preview: A browser opens with your Fiori app. Verify:
    • All Travel records appear in the list
    • Clicking a row opens the object page
    • Selection fields appear in the filter bar
    • The Create button works (new rows can be added)
  6. Test business logic: Try to save a Travel with invalid dates (end before begin). Your Chapter 18 validation should trigger and block the save.
  7. Test the action: Click the Approve button on a row (if you added it in Chapter 18). The Status field should change to ‘A’.
Why this matters This is the complete modern SAP development workflow. If you can describe these seven steps in an interview — from CDS annotations to a working Fiori app — you have demonstrated the full modern ABAP skillset that most candidates lack.
🎯 Chapter 19 Challenge

Test: Kon Banega Crorepati?

5 questions. ₹1 Crore. Prove you understood Fiori & OData. No pressure — restart anytime.

₹1,000 ₹10,000 ₹1,00,000 ₹10,00,000 ₹1 Crore
Question 1 of 5
Score: 0
Q1
🏆
You Did It!
0/5Correct Answers
You won ₹0
➡️ Next Chapter

➡️ Next Chapter (Final)

You have built a complete modern SAP application. In the final chapter, you will consolidate everything into one Capstone Project — a full business scenario that combines everything from all 19 chapters.

Chapter 20 Capstone Project — Build a Complete App →
Want to Learn Faster?

Explore Our Instructor-Led SAP & IT Courses

Self-study works. But if you want guided training, real project practice, and placement support — here are the courses we offer. Book a free demo before you decide.

WhatsApp WhatsApp us
Call Now Button