Draft Handling
Learn RAP draft handling for Fiori-style transactional editing where users need intermediate state before activation. Cover draft ownership, edit/activate/discard behavior, side effects, validations, concurrent editing and when draft is unnecessary for stateless APIs.
Overview
Learn RAP draft handling for Fiori-style transactional editing where users need intermediate state before activation. Cover draft ownership, edit/activate/discard behavior, side effects, validations, concurrent editing and when draft is unnecessary for stateless APIs.
Lessons in this topic
- Draft Handling Part 1: Draft Architecture — Active Data and Draft PersistenceUnderstand how RAP draft works under the hood: active and draft instances, draft tables, %is_draft and IsActiveEntity, draft administrative data, and what the framework does for you.
- Draft Handling Part 2: Draft Lifecycle — Create, Edit, Resume, Activate, DiscardFollow the draft lifecycle step by step — new draft, Edit, Resume, Prepare, Activate and Discard — and see what happens in the data, the locks and the UI at each step.
- Draft Handling Part 3: Draft Locking, ETags and ConcurrencyMaster concurrency in draft scenarios: the exclusive lock during editing, lock expiry and the optimistic phase, the total ETag at activation, and what users see in each situation.
- Draft Handling Part 4: Validations, Determinations and Side Effects in DraftPlace business logic correctly in draft-enabled objects: which determinations run on modify, which on save, how Prepare surfaces validation errors, how messages stay in sync with %state_area, and how side effects keep the UI current.
- Draft Handling Part 5: Troubleshooting Draft IncidentsResolve the typical draft tickets — "document locked", "my changes disappeared", "Save does nothing", "data changed by another user" — with a symptom-based checklist and the right tools.
Interview questions covered
- When would you enable draft for a RAP BO, and when not?
- After adding a field to a draft-enabled BO, activation fails and Fiori shows errors. What is the likely cause?
- What is draft in RAP, why is it needed, and how are draft and active instances distinguished?
- Walk through the draft lifecycle actions: Edit, Resume, Prepare, Activate and Discard.
- Users report 'Save does nothing' in a draft app. How do you investigate?
- How do the exclusive lock and the total ETag work together in draft scenarios?
- An hourly integration sets statuses via API, but long-running drafts later reset them. Why, and how do you prevent it?
- How does draft change where you put determinations and validations?
- A user says a purchase request has been 'locked' for two days. Support wants to delete the draft table rows. What do you do?
- You inherit a draft-enabled RAP BO. What do you review?
How to study Draft Handling
Draft Handling has 5 lessons (2 intermediate, 3 advanced) with about 44 minutes of reading in total. Start with the lesson that matches your level, then read the real project scenario and common mistakes in each one before moving on. After the lessons, say the 10 interview questions out loud in your own words, then check yourself against the model answer in each question (shown once you open it). Use the 15 mock questions to check recall. Finish with the 1 code lab scenario: read the buggy code first, say what is wrong, and only then open the optimized version.
Mock test questions covered
Try answering each one before you open the mock test; the answer options and scoring are in the Mock Questions tab.
- Users of a complex maintenance app lose unsaved input after session timeouts. Which RAP feature addresses this?
- A quotation draft recalculates tax only on activation, so users see wrong totals while editing. What should change?
- Users say changing a supplier "did not save", but the draft contains the new value. What is most likely?
- In RAP draft handling, what is the primary purpose of the draft table associated with a business object node?
- Where is the draft table of a RAP entity declared?
- What occurs when a draft instance is successfully activated in a RAP-based business object?
- A manager's draft from Friday is activated on Monday after an API changed the same object. What prevents the old draft from overwriting the change?
- A request is shown as locked and support wants to delete its draft table rows. What is the correct approach?
- Which standard draft action allows a user to start modifying an already saved (active) business object instance by creating a corresponding draft instance?
- What is the main purpose of the 'Prepare' phase that is automatically triggered before a draft can be activated?
- In an OData service exposing a draft-enabled RAP business object, what is the purpose of the 'SiblingEntity' navigation association?
- How does the RAP draft handling framework typically ensure that only the user who created a draft can continue editing it?
- What is the purpose of the standard 'Resume' draft action?
- What kind of information is stored in the draft administrative data table generated for a draft-enabled RAP business object?
- Which keyword must be added to a RAP behavior definition to enable draft handling for a business object?
Code lab scenarios
- Missing Ownership Check Lets One User Edit Another User's DraftTwo travel planners report seeing each other''s unsaved changes — planner A starts editing a travel, planner B opens the same travel and can also edit and save it, overwriting A''s in-progress work.