A Transaction Buffer in SAP RAP refers to an internal memory area that temporarily stores all changes to business objects (BOs) during a single logical unit of work (LUW) — typically between a create/update/delete
operation and a save
.
It acts like a staging area for BO changes until you call SAVE
.
Where It’s Used
- SAP RAP BO runtime (ABAP RAP framework)
- Inside the RAP behavior pool implementation
- During create, update, delete operations before saving to the database
Why It’s Needed (Uses & Purpose)
- Consistency
- Ensures that multiple operations on the same entity (within one LUW) don’t conflict or corrupt each other.
- Example: You update an entity and then delete it — the buffer tracks both correctly.
- Performance
- Changes are cached in memory first, not immediately written to the database.
- Only when
SAVE
is triggered, does the buffer commit all changes in one go (batch write).
- Validation & Checks
- It allows running validations, determinations, and actions on BOs with the latest in-memory data.
- Example: Determinations can use updated data before it’s saved to the DB.
- Transactional Integrity
- Supports rollback on failure — changes in the buffer are discarded if any error occurs before save
What Is Stored in the Transaction Buffer?
- New instances of BOs (created but not yet saved)
- Updated field values
- Deleted instance markers
- Messages (errors, warnings, info)
- Draft data (for draft-enabled BOs)