An Update Function Module is a special type of function module that executes update tasks (like DB changes, inserts, updates, deletes) asynchronously, after a COMMIT WORK.
They are processed in update work processes (type UPD or UP2) instead of dialog work processes.
Declared in SE37 with attribute “Update Module”.
Example: CALL FUNCTION 'Z_UPDATE_SALES_ORDER' IN UPDATE TASK.
Types of Update Function Modules
There are two types of update function modules:
1. V1 Update Function Modules
High-priority, synchronous updates.
Executed immediately after COMMIT WORK and must finish successfully.
Used for critical database updates (e.g., FI document posting, material stock changes).
If a V1 update fails → the LUW (Logical Unit of Work) is rolled back.
Processed in the V1 Update work process.
2. V2 Update Function Modules
Lower priority updates, executed after V1 updates.
Used for non-critical, statistical, or secondary updates (e.g., updating info structures, statistics, LIS, BW extraction).
If a V2 update fails → does not rollback V1 updates.
Processed in the V2 Update work process.
Example :
CALL FUNCTION ‘Z_UPDATE_MARA’
IN UPDATE TASK
EXPORTING matnr = ‘MAT001’.
COMMIT WORK. ” –> Triggers update task
If
Z_UPDATE_MARAis defined as V1 update → executed immediately after commit in update work process.If defined as V2 update → executed later, after all V1 updates.
Summary :
| Type | Priority | Rollback Effect | Usage |
|---|---|---|---|
| V1 | High | Rollback of LUW if fails | Critical DB changes (FI, MM, SD) |
| V2 | Low | No rollback of V1 if fails | Statistics, logs, reporting updates |