Draft handling

Letting a user edit a record over several requests before it becomes real — draft activation, locking, and the semantics Fiori elements expects.

Overview

SAP SHIPSby design
Node.js →

@sap/cds Runs the draft lifecycle for draft-enabled entities — activation, discard and locking — without custom handlers. Since CAP Node.js 10.0 a request that carries no draft notation addresses active data, and draft locks are still enforced against direct updates, deletes and conflicting edits.

Java →

com.sap.cds:cds-services-bom Runs the SAP Fiori draft lifecycle for draft-enabled entities, merging active and draft data on read and triggering the ACTIVE_READ and DRAFT_READ events that let custom handlers override either side.

Not covered: It stops at one editor at a time. Locking is exclusive by design, so collaborative editing — several people in the same draft — is a separate problem the community has taken on.

SourceServing Fiori UIs — draft supportchecked

Artifacts6

6 of 6 artifacts
ArtifactSignals
CDS plugins3
@rizing/cds-extensionCAP plugin putting a draft-capable facade in front of imported OData
Signals
none
cap-collaborative-draftCollaborative draft support for CAP Node.js services
Signals
Functional boundary
cap-handler-frameworkConvention-based handler layer for CAP with draft lifecycle hooks
Signals
none
Packages3
@sap/cdsCAP Node.js runtime
Signals
none
@sap/cds-fioriFiori draft handling and UI-facing behaviour for CAP services
Signals
none
com.sap.cds:cds-services-bomMaven bill of materials pinning CAP Java module versions
Signals
none

Content9

Group by9 of 9 pieces
Piece, what it offers
CAP Foundry: Engineering SAP CAP Applications from Business Intent with Guardrailed AI
SAP Community, Shahid, Blog
Reading Between the Lines: Under-Documented Fiori Elements Capabilities in SAPUI5 1.149
SAP Community, Sören Leibach, Blog
Custom Handlers for Entities in SAP CAP
SAP Community, xavisanse, BlogThe reasoningRunnable code
Show 6 more
A simple example of a SAP RAP Application based on Legacy API without UUID keys
SAP Community, cseijas, Blog
Keep the Core Clean with Rizing CDSX
SAP Community, Jhodel Cailan, Blog
How to ensure that users can efficiently enter data in SAP Fiori elements applications
SAP Community, Marius Freitag, BlogThe reasoningRunnable code
Messaging System for Transferring Error, Warning, and Information Messages from OData V4 Services to HTTP Client Applications
SAP Community, arley-triana-morin, BlogThe reasoningA recipeRunnable code
Core changed
Extend SAP SuccessFactors on SAP BTP with CAP - Create the CAP Service
SAP Community, Alessandro Biagi, Blog
UI5ers Buzz #56: New full-stack UI5 sample app featuring CAP + OData V4 + draft mode
SAP Community, AndreasKunz, BlogThe reasoning
Keep the Core Clean with Rizing CDSX
SAP Community, Jhodel Cailan, Blog

Seen working6

ArtifactSignals
Samples6
bookshop-demoSimple CDS bookshop model used across CAP explanations
No license
cap-defaultvalue-functionCommon.DefaultValuesFunction pointed at a CAP service function
none
cap-fe-masseditMass edit enabled in a Fiori elements list report over CAP
none
cap-java-draft-composition-deleteCAP Java draft cancel on composition items as a flag update
No license
fiori-inline-editList report inline edit on a draft-enabled CAP service
No license
SAP-samples/ui5-cap-event-appEvent registration app showing OData V4 draft with UI5 and CAP
none

Details

Coverage
statecore and community, CAP
assessed
relationshipnarrow by design
SourceServing Fiori UIs — draft supportchecked SourceFiori Support (Node.js) — capirechecked
For your agent
Ref
capability:draft-handling
JSON
/capabilities/draft-handling.json
MCP
Connecting an agent