ABAP - Keyword Documentation →  ABAP - Programming Language →  Processing External Data →  ABAP Database Access →  Data Consistency → 
Mail Feedback

SAP LUW

An application program can be split into multiple program sections, which are processed in sequence using different work processes. Each switch of a work process is linked with an implicit database commit, which means that an application program is not linked with a single database LUW automatically. More specifically, this applies to dialog-oriented applications with classic dynpros in SAP GUI in which each dialog step is assigned a database LUW.


Figure

To ensure the data consistency of application programs that are executed across multiple work processes, the change statements are not executed directly in an SAP LUW. Instead, they are first registered and then executed by a single work process, that is, in a single database LUW.

Bundling Techniques  

The following techniques are available for bundling the change statements in a database LUW:

Hints

Statements for SAP LUWs  

Each opening of a new internal session, except for the statement CALL DIALOG, starts a new SAP LUW which can be controlled by the ABAP SQL statements

Hints

SAP LUWs and Internal Sessions  

Each closing of an internal session ends the current SAP LUW. If a program is ended or an internal session closed using

and procedures are still registered in the current SAP LUW, the SAP LUW is ended, and the procedures are not called or rolled back. Registered update function modules remain on the database but can no longer be executed.

Hint

If a program is called using

a new SAP LUW opens, but not a new database LUW. This means that a database rollback in this SAP LUW can roll back all registration entries made by the statements CALL FUNCTION IN UPDATE TASK or CALL FUNCTION IN BACKGROUND TASK in the tables VB... or ARFCSSTATE and ARFCSDATA. Under certain circumstances, the statement ROLLBACK WORK in the called program can also affect the interrupted SAP LUW. To prevent this, an explicit database commit must be executed before the program is called. This problem does not occur in local updates.



Continue
CALL FUNCTION, IN UPDATE TASK
PERFORM, ON COMMIT, ROLLBACK
COMMIT WORK
ROLLBACK WORK
SET UPDATE TASK LOCAL
Forbidden Statements in Updates
Authorization Checks During an Update
Controlled SAP LUW
SAP LUW, Examples