COMMIT WORK

COMMIT Syntax Diagram

Addition:

... AND WAIT

Effect

Executes a database commit and thus closes a Logical Unit of Work (LUW) (see also Transaction Processing). This means that

COMMIT WORK also

COMMIT WORK belongs to the Open SQL command set.

The

return code

SY-SUBRC is set to 0.

All subroutines called with PERFORM ... ON COMMIT are processed in the LUW concluded by the COMMIT WORK command. All V1 update requests specified in CALL FUNCTION ... IN UPDATE TASK are also executed in one LUW . When all V1 update requests have been successfully concluded, the V2 update requests ("update with start delayed") are processed, each in one LUW. Parallel to this, the function modules specified in CALL FUNCTION ... IN BACKGROUND TASK are each executed in one LUW per destination.

Effect

The addition ... AND WAIT makes the program wait until the type V1 updates have been completed.