OData V4 Part 2: Publishing a RAP Service with an OData V4 Binding
Preview · a free account unlocks the full lesson
Publish a RAP service with an OData V4 binding end to end: create and publish the binding, understand the URL and versions, get a CSRF token, and run first read and write calls from a REST client.
In this lessonShow sectionsHide sections
Visual overview
Explanation
Part 1 explained the contract. Now comes the part where the service actually gets made available and called — Service Bindings Part 2 covers the binding object in ADT in more depth, while this lesson focuses on the OData V4 side and the first calls against it.
Creating and publishing the binding starts by right-clicking the service definition ZUI_PURCHREQ and choosing New Service Binding, naming it ZUI_PURCHREQ_O4 with binding type "OData V4 – UI". After activating it, clicking Publish makes it available — on-premise this publishes the service locally, while in cloud systems publishing is part of the binding's own lifecycle. The binding then shows the service URL, the service versions, and the entity sets, each with a Preview button.
The URL itself breaks down into clear pieces: in /sap/opu/odata4/sap/zui_purchreq_o4/srvd/sap/zui_purchreq/0001/, /sap/opu/odata4 is the OData V4 handler, zui_purchreq_o4 is the binding name in lower case, srvd is the UI binding path segment (Web API bindings use srvd_a2x instead), and zui_purchreq/0001 names the service definition and its version.
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
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.