ERPClimb logoERPClimb
OData V4 Model Deep Dive
Fiori & SAPUI5intermediate 6 min read

OData V4 Model Part 1: List, Context and Property Bindings

Free sample lesson · open to everyone

Key takeaway

Understand how the UI5 OData V4 model loads data through bindings: list bindings for collections, context bindings for single entities, property bindings for fields, relative versus absolute paths, and how $select and $expand are derived automatically.

In this lessonShow sections

Visual overview

OData V4 Model Part 1: List, Context and Property Bindings — learning sheetFlow: View/control bindings → List or context binding → Relative child bindings → $select/$expand derivation → Request and cache. Key ideas: BINDING-DRIVEN DATA ACCESS; BINDING TYPES; RELATIVE AND ABSOLUTE PATHS; $SELECT AND $EXPAND. Watch out: Creating many absolute bindings for the same data multiplies requests and breaks consistency.ERPClimb.com / FIORI / LESSON 1/14 / LEARNING SHEETOData V4 Model Part 1: List, Context and Property Bindings1 · HOW IT FLOWS1View/controlbindings2List orcontextbinding3Relativechildbindings4$select/$expandderivation5Request andcache2 · KEY IDEAS EXPLAINEDBinding-Driven Data AccessUnlike the V2 model, the V4 model has no readmethod for arbitrary requests. Data is requestedbecause controls are bound: a table bound to…Binding TypesA list binding represents a collection and itscontexts for each row. A context bindingrepresents one entity, for example a sales order…Relative And Absolute PathsAbsolute bindings start with a slash and sendtheir own request. Relative bindings resolveagainst the parent context, so items of a sales…$Select And $ExpandWith autoExpandSelect enabled in the modelsettings, the model collects the properties usedby all bindings under a context and requests only…3 · REMEMBER · WATCH OUTRememberThe V4 model reads data only through bindings — there is no genericread() call like in the V2 model.List bindings load collections; context bindings load single entities;property bindings show fields.Relative bindings inherit their context from a parent, so one requestcan serve a whole view.!Watch outCreating many absolute bindings forthe same data multiplies requestsand breaks consistency.4 · IN A REAL PROJECTA freestyle detail page created separate absolute bindings for header, items and partner data, sending threerequests and sometimes showing inconsistent data after saves. Restructuring into one context binding withrelative child bindings and autoExpandSelect reduced it to one request and kept data consistent.Original ERPClimb learning sheet • Verify against your SAP release and edition

The situation: a real project scenario

A freestyle detail page created separate absolute bindings for header, items and partner data, sending three requests and sometimes showing inconsistent data after saves. Restructuring into one context binding with relative child bindings and autoExpandSelect reduced it to one request and kept data consistent.

Explanation

This series explains the OData V4 model used by modern UI5 and Fiori elements apps.

Unlike the V2 model, the V4 model has no generic read() method for arbitrary requests. Instead, data access is binding-driven: a table bound to /SalesOrders creates a list binding, which sends a request with whatever paging and options are needed. This keeps the model consistent and makes caching manageable, since every piece of data in the app can be traced back to a binding.

There are several binding types to know. A list binding represents a collection along with a context for each row. A context binding represents a single entity — for example, a sales order object page bound to /SalesOrders('123'). Property bindings bind individual fields within a context, and operation bindings call actions and functions.

Bindings can be absolute or relative. Absolute bindings start with a slash and send their own request. Relative bindings resolve against a parent context instead, so the items of a sales order can be bound with a relative path and loaded via $expand or a dependent request — meaning one request can serve a whole view when the binding hierarchy is designed well. Creating many absolute bindings for the same data, by contrast, multiplies requests and can break consistency.

With autoExpandSelect enabled in the model settings, the model collects the properties used by all bindings under a context and requests only those properties, expanding navigation properties as needed. This avoids over-fetching without having to maintain $select manually.

As practical rules: bind views to contexts, use relative bindings for details, enable autoExpandSelect, and avoid manual absolute bindings to data that's already loaded elsewhere. The browser's network tab is the best way to debug this, since it shows exactly which requests each binding creates.

Working through this hands-on means binding a table to an entity set and inspecting the request, binding an object page to a single entity context, adding a relative binding for items and observing the resulting $expand, and then enabling autoExpandSelect and comparing request size — ending with the ability to explain every OData request a view sends purely by its bindings.

How the SAP process fits together

SAP PROCESS EXPLORER · Fiori: from service to user

ERPClimb.com

OData V4 Model Deep Dive — process breakdown

Topic-specific conceptual flow: how key objects and decisions fit together. SAP configurations and exceptional cases can follow different paths.

1/4

Selected process stage

Bind

List, context and property bindings read data

Representative SAP learning flow, not a guarantee of system runtime sequence in every scenario.

Watch out

Common mistakes

Developers coming from OData V2 frequently look for a read() method on the V4 model and are surprised it doesn't exist — the V4 model is binding-driven: you create list, context, or property bindings and let them fetch data, rather than issuing imperative read requests, and trying to force a V2-style imperative pattern onto V4 leads to fighting the framework instead of using it.

Creating separate absolute bindings for related data (header, items, partner) instead of one context binding with relative child bindings causes multiple independent requests where one batched, expanded request would do — this not only hurts performance but can show inconsistent data if the separate requests resolve at different times (e.g. right after a save).

Maintaining manual $select lists by hand instead of letting autoExpandSelect derive them from the actual bound properties means the list silently drifts out of sync as the UI changes — a property gets bound in the view but nobody remembers to add it to the manual select list, and the field just doesn't show.

Debugging V4 binding issues purely by reading UI5 error logs or guessing, without opening the Network tab to see the actual OData request and response, misses the fastest way to see exactly what was requested and what came back.

Do this

Best practices

Set up one context binding per logical view/section and use relative bindings for its children (fields, sub-tables) rather than creating multiple independent absolute bindings — this lets UI5 batch and consolidate requests naturally and keeps data consistent since it comes from one coherent fetch.

Enable autoExpandSelect on the V4 model so $select and $expand are derived automatically from what's actually bound in the view, instead of maintaining them by hand — this keeps requests both correct and minimal as the UI evolves. Prefer a small number of well-structured bindings over many granular ones; each additional independent binding is a potential extra round trip.

When something doesn't look right, make the Network tab (request URL, response body) and UI5's own diagnostic tools your first stop rather than guessing from the UI symptom alone — V4's declarative binding model means the actual request often reveals the issue (wrong $filter, missing $expand, unexpected entity) faster than stepping through controller code.

In the interview

Interview angle

A common question is: 'What's the core difference between the OData V2 and V4 models in UI5?' Beyond version numbers, a strong answer explains that V4 is fundamentally binding-driven rather than imperative-method-driven (no read()/create() calls the way V2 has them), that it manages its own request batching and caching more aggressively, and that autoExpandSelect lets the model derive $select/$expand from the bindings actually present in the view instead of requiring manual request construction.

Being able to explain why a freestyle detail page with separate absolute bindings for header and items causes multiple requests — and how restructuring into one context binding with relative children fixes it — shows hands-on experience rather than textbook knowledge.

Practice this lesson

Original educational case studies for SAP consultants, not official SAP certification exam questions. Verify product edition and implementation details against the current SAP documentation.

Quick check

0 of 3 questions attempted

Question 1 of 3

How does the UI5 OData V4 model read data?

Practise this in an interview

Answer in your own words and get instant feedback, the way an interviewer would judge it.

1Explain how data loading works in the UI5 OData V4 model.

Was this lesson helpful?

Keep exploring

Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.