Draft or no draft: when would you leave draft out of a RAP business object? And what do users lose if you switch it off on an object they edit over several steps?
Say your answer out loud first.
Practise another way
I enable draft when people edit a document over several steps, with children, checks along the way or interruptions.
Draft keeps their unfinished work in the draft table, so they can leave and resume, and validations can run on the way through Prepare.
Without draft, nothing is stored until Save, a lost session loses the work, and checks only run at the end. I leave draft out for small single-screen edits, pure APIs and mass processing, where the draft table and draft logic only add cost.
What draft gives you. With with draft; every entity gets a draft table and the BO gets the draft actions Edit, Activate, Discard, Resume and the determine action Prepare.
The RAP transactional engine writes the draft tables for you, in managed and unmanaged BOs. Unfinished changes are stored in the database, not only in the browser.
When to choose draft
- The user edits a header with items, attachments or several facets before the document is complete.
- Checks and derivations should show up while editing (determinations and validations in
Prepare, side effects), not only at the end. - Interruptions are normal: a phone call, a timeout, finishing on another device.
- Since SAP's release 2508 (ABAP environment) and ABAP Platform 2025,
with collaborative draft;even lets several users work on the same draft.
When to leave it out
- A tiny maintenance object edited in one go.
- A BO consumed mainly by EML jobs or a Web API, where nobody "edits" interactively.
- High-volume processing, where an extra persisted copy is pure overhead.
What users lose without draft on an object edited in several steps:
- No persisted intermediate state: everything lives in the UI until Save. A crash, a session timeout or closing the tab loses the work.
- Validation feedback only on Save, often many messages at once.
- No "resume later" and no clean discard of a half-finished change: the change either goes in or is thrown away.
What draft costs you
managed implementation in class zbp_r_claim unique;
strict ( 2 );
with draft;
define behavior for ZR_Claim alias Claim
persistent table zclaim
draft table zclaim_d
lock master total etag LastChangedAt
etag master LocalLastChangedAt
authorization master ( instance )
{ ...
draft action Edit; draft action Activate optimized;
draft action Discard; draft action Resume;
draft determine action Prepare { validation checkLines; }
}
- A draft table per entity and a
total etagfield on the lock master. - Draft actions to declare (strict mode requires them) and expose in the projection with
use draft;. - In EML and handlers you must think about
%is_draft: the same key can exist as an active and a draft instance. Activate optimizedis SAP's recommended form, because it speeds activation.
How to decide in a review. Ask how users work, not what the generator produced. The ADT generator creates draft-enabled BOs by default. That is right for most Fiori document apps and wrong for an integration-only object.
Decides from user workflow, names what is lost without draft (persisted interim state, early checks, resume) and what draft costs in objects and code.
Says 'always use draft because Fiori needs it' or cannot say where draft data is stored.
Treating draft as a UI setting. Draft is BO behavior with its own tables, actions, locks and ETag, and it changes how every EML consumer addresses instances.
- Where do validations run in a draft app before the user presses Save?
- What does %is_draft mean in an EML call, and what happens if you forget it?
- When would you pick collaborative draft over the exclusive draft?
2 official pages and 2 prep guides. Confidence: medium. Checked 3 Dec 2026.
- Prep guide Gives the question.
- Prep guide Gives the question.
- Official page Backs the answer.
- Official page Backs the answer.