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.
OData is the bridge between ABAP/CDS on the backend and Fiori/UI5 (and external apps) on the front-end.
- 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.