Service Definitions Part 5: UI vs Integration APIs — Reuse or Separate?
Preview · a free account unlocks the full lesson
Decide whether a Fiori app and an integration API should share one service or have separate ones, and how to structure projections, BDEFs, services and bindings for each.
In this lessonShow sectionsHide sections
Visual overview
Explanation
When the same business object has different kinds of consumers, the right answer is separate projections and service definitions for each. A UI service typically needs draft, UI annotations, value helps and side effects, and binds as "OData V4 – UI." An API service typically has no draft, needs a stable contract, and exposes only the operations actually required, binding as "OData V4 – Web API." Sharing a single service between the two couples UI changes directly to integration contracts, which is a problem worth avoiding.
Parts 1 through 4 focused on a single service, but real business objects usually have at least two kinds of consumers: a Fiori app and some form of integration. This part explains why they end up with separate services.
The two consumer types differ in fundamental ways. A Fiori app has users editing data over time, which is exactly what draft exists for; it needs UI annotations, value helps, text fields and side effects, and it tends to change often as UX feedback comes in.
An integration API, by contrast, receives complete requests from other systems in one shot, so it has no use for draft; it needs a stable contract with clear errors and only the operations it actually requires, and it should change rarely and only in compatible ways.
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
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.