RAP Business Objects Part 3: Transactional Buffer, Save Sequence and the RAP LUW
Preview · a free account unlocks the full lesson
Follow one Fiori "Save" click through RAP: the interaction phase and transactional buffer, the save sequence phases, who commits, and the rules that keep a RAP transaction all-or-nothing.
In this lessonShow sectionsHide sections
Explanation
During the interaction phase, changes stay only in the buffer; during the save sequence, they're actually persisted. Validations run inside check_before_save when committing. RAP owns the LUW, so no behavior code should ever call COMMIT WORK. And nothing is allowed to fail during save — everything that could fail has to be checked beforehand.
Parts 1 and 2 designed the business object and chose the implementation type; this part explains the runtime model every RAP developer needs to understand — what actually happens between a user's change and the database commit.
Every RAP transaction has two phases. The interaction phase is where the consumer sends requests — create, update, delete, actions, reads. RAP runs the operations and your handler methods here, including determinations on modify, actions, feature control and authorization, but all of this stays in the transactional buffer; nothing is written to the database yet.
The save sequence is triggered once the consumer commits — the user clicks Save, or Activate with draft, an OData change set completes, or ABAP code calls COMMIT ENTITIES. Only then does RAP run the saver phases and finally commit.
The transactional buffer is simply the in-memory state of all changed instances within this transaction. In managed RAP, the framework owns this buffer; in unmanaged RAP, you build it yourself, as covered in Unmanaged RAP Part 2. Everything inside the business object reads through the buffer, via READ ENTITIES IN LOCAL MODE, so determinations and validations see uncommitted changes — list queries from the UI, however, read committed data directly through CDS.
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
Referenced SAP objects
Reviewed reference pages for the objects this page mentions.
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.