OData
Quick answer
OData is the bridge between ABAP/CDS on the backend and Fiori/UI5 (and external apps) on the front-end.
Key takeaways
- OData (Open Data Protocol) is a standardised REST protocol for querying and updating data over HTTP, returning JSON (or XML).
- From CDS (recommended): annotate a CDS view with @OData.publish or expose it via a service definition/binding (RAP), the modern…
- SAP Gateway Service Builder (SEGW): the classic way, define an entity model and implement the operations in generated ABAP classes.
- Watch out: Hand-building services when CDS-based exposure is easier.
What OData is
OData (Open Data Protocol) is a standardised REST protocol for querying and updating data over HTTP, returning JSON (or XML). Every Fiori app talks to the backend via an OData service. OData supports the CRUD operations plus rich query options (filter, sort, expand, paging), so clients can request exactly the data they need.
How OData services are built
- From CDS (recommended): annotate a CDS view with @OData.publish or expose it via a service definition/binding (RAP), the modern, low-effort path.
- SAP Gateway Service Builder (SEGW): the classic way, define an entity model and implement the operations in generated ABAP classes.
A typical OData request
GET /sap/opu/odata/sap/Z_SALES_SRV/SalesOrderSet?$filter=Customer eq '1000'&$top=20
Authorization: <session/OAuth>Why it matters
OData is the bridge between ABAP/CDS on the backend and Fiori/UI5 (and external apps) on the front-end. Understanding how to expose and consume OData is essential for any modern SAP development involving user interfaces or integration with web systems.
Common pitfalls
- Hand-building services when CDS-based exposure is easier.
- Returning too much data, use $filter/$top and paging.
- Ignoring OData error handling in the service implementation.
Want to learn this properly?
Our live, instructor-led SAP Training covers this hands-on, with real projects and a certification path.
Check your understanding
Which statement is true of OData?
- A. SAP is best understood through business processes, the end-to-end flows that run a company, rather than…
- B. OData (Open Data Protocol) is a standardised REST protocol for querying and updating data over HTTP…
- C. SAP HCM (Human Capital Management), also HR, manages the workforce, personnel administration, organizational…
Show answer
B. OData (Open Data Protocol) is a standardised REST protocol for querying and updating data over HTTP…
Covered in the “What OData is” section of this lesson.
Which of these also applies to OData?
- A. Hunting through menus instead of using TCodes.
- B. Every Fiori app talks to the backend via an OData service.
- C. Upgrading without reading the notes.
Show answer
B. Every Fiori app talks to the backend via an OData service.
Covered in the “What OData is” section of this lesson.
Which part of the Learn SAP curriculum covers OData?
- A. SAP fundamentals
- B. SAP projects
- C. SAP ABAP development
Show answer
C. SAP ABAP development
This lesson sits in the SAP ABAP development section of the Learn SAP course.