Application Development and Automation 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: 
Read only

luw

Former Member
0 Likes
795

can anyone answer me EXACT difference between SAP LUW & DB LUW???

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
752

LUW is a logical unit of work and is the span of time

during which any transaction is updated in all or nothing

manner i.e they've been updated completely ro commited or

thrown away(Roll Back). An Luw is nothing but a database

LUW in database is updated from one screen to another

screen within a transaction which does not last longer and

in SAP LUW, the system perfoms database from one

transaction to another and this last longer and is usually

terminated by the programmer by issuing Commit work

statement.

5 REPLIES 5
Read only

Former Member
0 Likes
753

LUW is a logical unit of work and is the span of time

during which any transaction is updated in all or nothing

manner i.e they've been updated completely ro commited or

thrown away(Roll Back). An Luw is nothing but a database

LUW in database is updated from one screen to another

screen within a transaction which does not last longer and

in SAP LUW, the system perfoms database from one

transaction to another and this last longer and is usually

terminated by the programmer by issuing Commit work

statement.

Read only

Former Member
Read only

RaymondGiuseppi
Active Contributor
0 Likes
752

Extract from <a href="http://www.sap.com/services/support/standards_support/pdf/WP_SAP_Standard_Data_Integrity.pdf">SAP Standards for Data Integrity and Transactional Consistency</a>

<i>To explain how transactional correctness can be achieved by adhering to the “logical unit of work” (LUW)-principle, the concept of database LUWs and SAP LUWs needs to be quickly explained.

A database LUW (DB LUW) is a non-separable sequence of database operations. At the beginning and end of the LUW, the database is in a consistent state and the LUW is either fully carried out by the database system, or is not carried out at all. It is opened at the start of a transaction (when the connection with the database is made), and whenever a previous DB LUW is closed following a database commit.

The database LUW is closed with a database commit. It is only in the commit that the data is written to the database (after which it can no longer be reversed). Before the database com-mit, you can undo the changes using a database rollback. Database LUWs allow you to en-capsulate logically related actions from a business process.*

An SAP logical unit of work (LUW) can be described as the SAP method for mapping several changes into one single DB LUW or as a sequence of dialog steps building one logical unit in the sense of a business process.

Basically, you can say that when programming your interfaces or utilizing a userexit the “all or nothing”-principle should be kept, which means that either all changes are posted to the da-tabase in a single LUW or they are not posted at all. In addition it needs to be ensured that appropriate status information is provided to the application whether the data has been suc-cessfully committed to the database or not so that in case of errors the right restart point can be detected without posting data twice or not at all.</i>*

Regards

Read only

Former Member
0 Likes
752

Hi,

in database language it is not called LUW but just transaction.

The SAP LUW ist the OPEN SQL encapsulation of a DB Transaction.

OPEN SQL encapsulate the differences between the differents SQL dialects, and the DB transaction handling is also quite different between different database systems (Oracle, MS SQL, etc.), so it ist also necessary to encapsulate this.

For the application developer are the SAP LUW and a DB Transaction the same...

Regards,

Gianpietro

Read only

paruchuri_nagesh
Active Contributor
0 Likes
752

hi

When external data is changed by application programs, it must be ensured that the data is consistent after changes have been made. This is particularly the case for the processing of data in the database. The time span during which a consistent data status is transferred to another consistent status is known as a LUW (Logical Unit of Work). If an error occurs during a LUW, it is possible to reset all changes made up to this point and regenerate the data in its original consistent status (rollback). When a new consistent status has been reached, this new status can be set and a new LUW can be opened (Commit).

SAP LUW

Since, as a rule, an application program is processed by several work processes in succession, and every change of the work process is linked to an implicit database commit, an application program is not automatically linked to a single database LUW. This applies in particular to dialog-oriented applications, in which one database LUW is assigned to one dialog step.

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

DATABASE LUW

A database LUW is a non-separable sequence of database operations that ends in a database commit. The database LUW is either executed completely by the database system, or not at all. After a database LUW has been successfully completed, the database returns to a consistent status and a new database LUW is opened. If an error is discovered within a database LUW, all database changes made since the start of the database LUW can be canceled using a database rollback. The database is subsequently restored to the same status as before the start of the database LUW.

reward if u find use ful

Regards

Nagesh.Paruchuri