Modularization Part 5: Update Function Modules and IN UPDATE TASK
Preview · a free account unlocks the full lesson
Understand SAP's classic update technique: logical units of work, update function modules (V1/V2), CALL FUNCTION … IN UPDATE TASK, COMMIT WORK and ROLLBACK WORK, PERFORM ON COMMIT, SM13 — and why RAP and BAPIs rely on it.
In this lessonShow sectionsHide sections
Visual overview
Explanation
Earlier parts covered units of logic; this part explains how SAP transactions save data consistently — a mechanism you will meet in every standard transaction, every BAPI, and in RAP's save phase.
It starts with the distinction between a database LUW and an SAP LUW. A database LUW is the set of changes between two database commits, and every dialog step (every screen change) triggers an implicit database commit. An SAP LUW, by contrast, is a whole business transaction spanning several dialog steps — think of the several screens of VA01.
To keep that business transaction atomic even though it crosses multiple database LUWs, SAP collects the changes and executes them together at COMMIT WORK, inside the update task. An SAP LUW groups all the database changes of a business transaction so they are written together or not at all.
The actual work happens in update function modules. These have the processing type "Update module" in SE37, which can be set to start immediately (V1) or start delayed (V2): V1 covers critical, synchronous-with-commit updates, while V2 covers statistical, lower-priority updates. Update function modules only have IMPORTING and TABLES parameters passed by value, with no EXPORTING parameters, because they run later, in a separate update work process. They contain the actual INSERT, UPDATE and DELETE statements.
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
Related SAP topics
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.