Behavior Definitions Part 5: Projection Behavior, Strict Mode and Stable Contracts
Preview · a free account unlocks the full lesson
Understand the BDEF layers above the base BO — projection BDEFs for services and interface BDEFs for stable reuse — plus strict mode and the rules that keep a released RAP contract stable over time.
In this lessonShow sectionsHide sections
Visual overview
Explanation
A projection BDEF defines what one specific service may use, declared through "use …" statements, while an interface BDEF provides a stable EML API for other developers. New BDEFs should always use strict ( 2 ), and breaking changes require a new projection or service version rather than modifying an existing contract.
Parts 1 through 4 covered the base BDEF (ZR_PurchReq), where behavior is actually defined — but consumers never use that base BDEF directly. This part covers the layers built on top of it, and how to change a business object without breaking the consumers depending on it.
A projection BDEF represents one consumer's view of the business object. It sits on a projection CDS view with provider contract transactional_query and starts with "projection;". Rather than defining behavior, it selects from what the base BO offers, with statements like "use create; use update; use action approve; use association _Item { create; with draft; }".
Anything not listed simply isn't available to that service — for instance, an API projection might omit delete, or omit draft entirely by leaving out "use draft;".
A projection can also add consumer-specific behavior on top, known as augmentation, such as defaulting a field only for that particular app, backed by its own implementation class — though this should be used sparingly.
A typical setup pairs a ZC_ projection for the Fiori UI, which includes draft, with a separate API projection that leaves draft out, a pattern covered further in Service Bindings Part 4.
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.