Service Binding (RAP)
A service binding is the ABAP repository object in RAP that binds a service definition to a communication protocol, such as OData V2, OData V4 or InA, and to a consumption type, UI or Web API. A service binding also publishes the service endpoint and offers an SAP Fiori elements preview for UI services.
Quick facts
- Type
- ABAP repository object (business service binding)
- Layer
- Services & APIs
- Created in
- ABAP Development Tools (Eclipse)
- Binding types
- OData V2, OData V4, InA, SQL; category UI or Web API
- Admin transactions
- /IWFND/V4_ADMIN, /IWFND/MAINT_SERVICE (on-premise gateway administration)
- Who works with it
- ABAP developers, SAP Fiori developers, integration developers
- Applies to
- SAP S/4HANA (all deployment options), SAP BTP ABAP environment
Layer: Services & APIsWhere it sits ▾
Layer: Services & APIs
Open the architecture map →How does a service binding work?
A service binding is the last step in the RAP chain from data model to consumable service:
- CDS view entities and a behavior definition form the business object.
- Projection views shape what one service needs.
- A service definition lists the entities the service exposes.
- The service binding decides how that scope is exposed: which protocol, which consumption type and which version.
Its parameters are the service name, identical to the binding name; the binding type; the service version; and the publishing status. Because protocol and scope are separate objects, several bindings can sit on one service definition: Alder Manufacturing could expose the same purchase requisition scope once as an OData V4 UI service for its SAP Fiori app and once as an OData V4 Web API for a supplier portal of Cedar Office Supply. A service binding is therefore where a RAP service becomes a concrete, addressable endpoint.
Which service binding types exist?
SAP's current documentation lists four protocols and two consumption categories:
| Protocol | UI | Web API |
|---|---|---|
| OData V2 | Yes | Yes |
| OData V4 | Yes | Yes |
| InA (analytical live access) | Yes | No |
| SQL (published ABAP-managed database objects) | No | Yes |
The category matters as much as the protocol. UI services carry UI annotations in their metadata, value helps, side effects and feature control, and offer the SAP Fiori elements preview. Web APIs contain no UI-specific information and are meant for unknown consumers, and they can be extended. SAP recommends OData V4 wherever possible for transactional services, and notes that full SAP Fiori elements support on OData V4 is granted only for draft-enabled scenarios. Check which binding types your release offers in its RAP documentation. Decision criterion: bind as UI when an SAP Fiori app consumes the service, and as Web API for everything else.
How are service bindings published and versioned?
- Publishing: the binding must be active, and the Publish button in the service binding editor runs the task lists that enable the endpoint. SAP stresses that publishing enables the service only in the current system; it does not make the service reachable from other systems.
- After transport (on-premise and Private Edition): SAP documents that the service binding only enables the service locally in the development system; in quality and production systems the service is activated with the Gateway tools, OData V4 services as service groups in /IWFND/V4_ADMIN and OData V2 services in /IWFND/MAINT_SERVICE.
- ABAP environment (SAP BTP and Public Edition developer extensibility): a Web API reaches external callers through the inbound service generated by the binding, added to a published communication scenario, and then a communication arrangement that an administrator creates.
- Versioning: adding another service definition to an existing binding creates the next service version, so changes reach new consumers without breaking existing ones.
A published service binding is a local endpoint; exposure to other systems is a separate configuration step.
What are common mistakes with service bindings?
- Binding an SAP Fiori app to a Web API. The app loads but shows empty tables or default layouts, because Web API metadata contains no UI annotations. Create a UI binding.
- Choosing OData V4 for a non-draft transactional app. SAP Fiori elements support on V4 is complete only with draft; enable draft or plan for gaps.
- Changing a released service in place. Consumers break silently. Add a service version instead.
- Assuming Publish means reachable. A remote caller still needs communication setup, and on-premise users need authorizations for the service.
- Debugging the UI first. When a preview fails, check that the binding is active and published before touching annotations.
Most service binding problems come from choosing the wrong category or skipping a publishing step, not from the business object behind it.
Service binding vs. service definition: what is the difference?
| Service definition | Service binding | |
|---|---|---|
| Question it answers | What does the service expose? | How and for whom is it exposed? |
| Content | List of exposed CDS entities, with optional aliases | Protocol, UI or Web API category, version, publishing status |
| Cardinality | One scope | Several bindings can reuse one service definition |
| Result | No endpoint on its own | A published endpoint and, for UI services, an SAP Fiori elements preview |
The service definition sets the scope of a RAP service; the service binding turns that scope into a protocol-specific endpoint.
FAQ
What is the difference between a UI and a Web API service binding?
A UI service binding includes UI annotations, value helps, side effects and feature control in its metadata and offers an SAP Fiori elements preview. A Web API binding contains no UI-specific information and is intended for other consumers, such as integrations. SAP Fiori elements apps need a UI binding.
Can one service definition have several service bindings?
Yes. SAP designed the separation so that one service definition can be bound several times, for example as an OData V4 UI service and as an OData V2 or V4 Web API, without re-implementing the business logic behind it.
Does publishing a service binding make the service available to other systems?
No. Publishing enables the service endpoint only in the current system. External consumers need additional setup, such as communication scenarios and arrangements in the SAP BTP ABAP environment, or gateway administration and authorizations in on-premise systems.
Should a new RAP service use OData V2 or OData V4?
SAP recommends OData V4 wherever possible for transactional services. For SAP Fiori elements on OData V4, full support requires a draft-enabled business object. OData V2 remains useful when an existing app or consumer depends on it.
Sources
- SAP Help Portal: Service Binding — binding types, UI vs. Web API, publishing (ABAP Cloud)
- SAP Help Portal: Providing an OData Service — communication scenario for Web APIs (ABAP environment)
- SAP Help Portal: Service Group Publishing with /IWFND/V4_ADMIN (ABAP platform)
- SAP Help Portal: Service Binding — service transport in on-premise systems (ABAP platform)
- Applies to
- SAP S/4HANA on-premise · SAP S/4HANA Cloud Private Edition · SAP S/4HANA Cloud Public Edition · SAP BTP
- Last reviewed