RAP Basics Part 8: Service Definition, Service Binding and OData Exposure
Preview · a free account unlocks the full lesson
Expose a RAP BO: service definition (which projections, with aliases), service binding types (OData V2/V4, UI/Web API), publishing locally or via transport, the Fiori Elements preview, released APIs, and why UI and API consumers get separate services.
In this lessonShow sectionsHide sections
Visual overview
Explanation
Parts 2 through 7 built the business object; now we make it reachable. A service definition declares what is exposed — define service ZUI_TRAVEL { expose ZC_Travel as Travel; expose ZC_Booking as Booking; } — and can also expose any value-help views the projection needs; the aliases used here become the entity set names in $metadata.
A service binding then declares how the service is exposed, in terms of protocol and purpose, and is created in ADT directly from the service definition by choosing a binding type: OData V4 – UI is the default for new Fiori Elements apps and works best with draft, OData V2 – UI is only needed when the UI technology specifically requires V2, and a Web API binding (OData V2 or V4) is for integration with systems like CPI or other external consumers, with no Fiori preview available for those. There's also an InA/SQL binding type for analytics.
UI bindings carry the UI annotations needed for Fiori Elements, while Web API bindings are built for machine consumers and simply ignore UI metadata. Publishing a binding registers the service — in ADT this is the Publish button on the binding itself (a local service endpoint on-premise).
The binding is transported as an object, but in each target system it still needs to be published there too: for OData V4 this happens through the /IWFND/V4_ADMIN service group, and for OData V2 through the familiar /IWFND/MAINT_SERVICE — there's no SEGW and no /IWFND/MAINT_SERVICE step for V4 itself.
On SAP BTP ABAP Environment, Web APIs additionally need a communication scenario and arrangement created alongside publishing.
Create a free account to keep reading
You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.
- Full explanation
- Code example
- Real project scenario
- Common mistakes
- Best practices
- Interview angle
One tap with Google works too. Every topic keeps its first lesson open to everyone.
Keep exploring
Interview questions on this topic
Referenced SAP objects
Reviewed reference pages for the objects this page mentions.
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.