Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

difference between sapluw and dbluw

former_member1193869
Participant
0 Kudos

hi,

Can any tell me briefly about SAPLUW and DBLUW.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi

good

LUW or Database LUW or Database Transaction ::

• A “LUW” ( logical unit of work ) is the span of time during which any database updates must be performed .

Either they are all performed ( committed ) , or

they are all thrown away ( rolled back ).

LUW ( or “database LUW” or “database transaction” )

This is the set of updates terminated by a database commit. A LUW lasts, at most, from one screen change to the next

( because the SAP system triggers database commits automatically at every screen change ).

LUWs help to guarantee database integrity. When an LUW has been successfully concluded, the database is once again in a correct state. If, however, an error occurs within an LUW, all database changes made since the beginning of the LUW are canceled and the database is then in the same state as before the LUW started.

An LUW begins :::::::::::::

• Each time you start a transaction

• When the database changes of the previous LUW have been confirmed (database commit) or

• when the database changes of the previous LUW have been cancelled (database rollback)

An LUW ends ::::::::::::::::

When the database changes have been confirmed (database commit) or

When the database changes have been canceled (database rollback)

SAP LUW or Update Transaction :::::::

Update transaction ( or “SAP LUW”)

This is a set of updates terminated by an ABAP/4 commit. A SAP LUW may last much longer than a database LUW, since most update processing extends over multiple transaction screens.The programmer terminates an update transaction by issuing a COMMIT WORK statement.

An SAP LUW is a logical unit consisting of dialog steps, whose changes are written to the database in a single database LUW.

In an application program, you end an SAP LUW with either

the COMMIT WORK or ROLLBACK WORK statement.

An SAP transaction is an application

program that you start using a transaction code. It may contain one or more SAP LUWs.

Whenever the system reaches a COMMIT WORK or ROLLBACK WORK statement that is not at the end of the last dialog step of the SAP transaction, it opens a new SAP LUW.

thanks

mrutyun^

3 REPLIES 3

Former Member
0 Kudos

HI,

Please refer to the document below :

Logical Unit of Work (LUW)

A Logical Unit of Work (LUW or database transaction) is an inseparable sequence of database operations which must be executed either in its entirety or not at all. For the database system, it thus constitutes a unit.

LUWs help to guarantee database integrity. When an LUW has been successfully concluded, the database is once again in a correct state. If, however, an error occurs within an LUW, all database changes made since the beginning of the LUW are canceled and the database is then in the same state as before the LUW started.

An LUW begins

each time you start a transaction

when the database changes of the previous LUW have been confirmed (database commit) or

when the database changes of the previous LUW have been cancelled (database rollback)

An LUW ends

when the database changes have been confirmed (database commit) or

when the database changes have been canceled (database rollback)

Database commit and rollback

Within an LUW, database changes are not made until after a database commit. Prior to this, any database change can be canceled by a database rollback.

In the R/3 System, a database commit is triggered either automatically or by the ABAP/4 command COMMIT WORK or the appropriate Native SQL command for the database system.

Similarly, a database rollback is triggered either automatically or by the ABAP/4 command ROLLBACK WORK or the appropriate Native SQL command for the database system.

A database commit is triggered automatically by

each screen change, and especially after the ABAP/4 commands CALL SCREEN, CALL DIALOG, CALL TRANSACTION, MESSAGE or

a Remote Function Call

A database rollback is triggered automatically by

errors which occur at runtime or

the ABAP/4 command MESSAGE with the message type 'A'

After each database commit or rollback, the database locks set in the LUW are released

Thanks,

Sriram Ponna.

Former Member
0 Kudos

hi

good

LUW or Database LUW or Database Transaction ::

• A “LUW” ( logical unit of work ) is the span of time during which any database updates must be performed .

Either they are all performed ( committed ) , or

they are all thrown away ( rolled back ).

LUW ( or “database LUW” or “database transaction” )

This is the set of updates terminated by a database commit. A LUW lasts, at most, from one screen change to the next

( because the SAP system triggers database commits automatically at every screen change ).

LUWs help to guarantee database integrity. When an LUW has been successfully concluded, the database is once again in a correct state. If, however, an error occurs within an LUW, all database changes made since the beginning of the LUW are canceled and the database is then in the same state as before the LUW started.

An LUW begins :::::::::::::

• Each time you start a transaction

• When the database changes of the previous LUW have been confirmed (database commit) or

• when the database changes of the previous LUW have been cancelled (database rollback)

An LUW ends ::::::::::::::::

When the database changes have been confirmed (database commit) or

When the database changes have been canceled (database rollback)

SAP LUW or Update Transaction :::::::

Update transaction ( or “SAP LUW”)

This is a set of updates terminated by an ABAP/4 commit. A SAP LUW may last much longer than a database LUW, since most update processing extends over multiple transaction screens.The programmer terminates an update transaction by issuing a COMMIT WORK statement.

An SAP LUW is a logical unit consisting of dialog steps, whose changes are written to the database in a single database LUW.

In an application program, you end an SAP LUW with either

the COMMIT WORK or ROLLBACK WORK statement.

An SAP transaction is an application

program that you start using a transaction code. It may contain one or more SAP LUWs.

Whenever the system reaches a COMMIT WORK or ROLLBACK WORK statement that is not at the end of the last dialog step of the SAP transaction, it opens a new SAP LUW.

thanks

mrutyun^

0 Kudos

Is there a way to rollback a SAP transaction