IT CanvassTalk to an advisor
SAP ABAP development · LessonBy , SAP Trainer, 10 yrs · Published · SAP S/4HANA 2023 · all levels

OData

OData is the RESTful protocol SAP uses to expose data and logic to web and mobile clients, above all to Fiori apps. In modern ABAP you create OData services (increasingly from CDS) so front-ends can consume backend data over HTTP/JSON.

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.

Practice challenge

+0 XPStreak ×0
Question 1 of 3
Which statement is true of OData?

Frequently asked questions

What does the term OData refer to in SAP?
OData is the RESTful protocol SAP uses to expose data and logic to web and mobile clients, above all to Fiori apps. In modern ABAP you create OData services (increasingly from CDS) so front-ends can consume backend data over HTTP/JSON.
What is the Fiori angle on OData?
OData is the bridge between ABAP/CDS on the backend and Fiori/UI5 (and external apps) on the front-end.
What tends to go wrong with OData?
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.
Already working on SAP and stuck on a live ticket?Get an expert SAP developer on screen-share to finish your daily tasks with you. Deliver on time, protect your reputation and your job. Monthly support only, no task-wise plans.Task assigned · no idea where to startStill stuck · your job on the lineExpert joins your screenDelivered on timeExplore On Job Support