What are the service definition and the service binding, and which binding type do you choose?
Say your answer out loud first.
Practise another way
The service definition lists which CDS entities a service exposes. It is protocol-agnostic. The service binding picks the protocol and the use case and publishes it. The types are OData V2 or V4, each as UI or Web API, plus InA UI and SQL Web API.
For a transactional Fiori elements app I choose OData V4 UI, and I use Web API for system-to-system. From the binding I can launch the Fiori elements preview.
Service definition
- Created on the projection view, with
define service ... { expose ZC_Travel as Travel; }. - It says what is exposed, not how. Child entities need their own
exposestatement. - Naming: reuse across bindings means no prefix; otherwise
UI_for UI services andAPI_for Web APIs.
Service binding
- Binds the definition to a protocol and a use case, then you Publish it (the binding must be active first).
- Publishing enables the service for the current system. The OData V2 endpoint is under
/sap/opu/odata/<binding name>. OData V4 services use their own URL scheme.
Binding types (SAP Learning)
- OData V2 - UI and OData V4 - UI: for Fiori elements apps, with UI annotations.
- OData V2 - Web API and OData V4 - Web API: for APIs, no UI annotations.
- InA - UI: live access for analytical data models, UI only.
- SQL - Web API: SQL access to ABAP-managed database API objects.
- Naming conventions:
UI_..._O4,API_..._O2, where_O2and_O4signal the OData version.
Which to choose
- SAP recommends OData V4 wherever possible for transactional services.
- SAP's service binding page says full Fiori elements support on V4 is granted only for draft-enabled scenarios. V2 is still used in learning material for non-draft services, because Fiori elements on V4 expects draft capability. That is why many courses start with V2 and move to V4 with draft.
- UI service for people, Web API for integration. Do not expose one projection as both.
Fiori elements preview
- In the binding editor select the entity set and choose Preview. A browser opens a generated app, so you can test list report, object page and actions without building a UI.
- For OData V4 the service may need local publishing first.
Security note: publishing creates an endpoint. Access is controlled by authorization objects and, for APIs, communication arrangements and scenarios.
Say this out loud: one BO, one projection per use case, one definition, and one binding per protocol and consumer.
Separates what is exposed from how, lists the binding types, and says V4 is preferred and why V2 still appears.
Says the service binding 'creates the OData service' and cannot name the types.
Believing the service definition chooses OData V2 or V4. The protocol is only decided in the service binding.
- Why does V4 UI need draft for Fiori elements?
- What is different about a Web API binding?
- Where do the UI annotations live?
- What must be true before you publish?
2 official pages, 2 prep guides and 1 technical reference. Confidence: high. Checked 21 Nov 2026.
- Official page Backs the answer.
- Official page Backs the answer.
- Technical reference Backs the answer.
- Prep guide Gives the question.
- Prep guide Gives the question.