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
4 REPLIES 4
Read only

Former Member
0 Likes
588

Hi,

LUW - Logical Unit of Work.

Read only

Former Member
Read only

Former Member
0 Likes
588

Hi,

LUW

Let one user is modifying a record and the second user is trying to delete the same record at the same time.

If the second user is successful in deleting the record, then the first user will face problem in modifying the record.

To avoid such problems, SAP has introduced LUW (Logical unit of Work)

LUW is defined as Locking Mechanism to protect transaction integrity.

Types of LUWs:

Database transaction or LUW.

Update transaction or SAPLUW.

ABAP/4 Transaction.

<b>database transaction</b>

Database transaction or LUW is defined as a period in which operation requested must be performed as one unit.

At the end of LUW, either the database changes are committed or rolled back.

<b>SAP LUW</b>

One SAP LUW can have several databases LUW. So a set of database transactions either committed or rolled back.

The special ABAP/4 command ‘Commit work’ marks the end of SAP LUW.

<b>ABAP/4 Transaction</b>

It is made up of a set of related task combined under one transaction code.

ABAP/4 transaction functions like one complete object containing screens, menus and transaction code.

Regards,

Sailaja.

Read only

Former Member
0 Likes
588

Hi,

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

o each time you start a transaction

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

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

An LUW ends

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

o when the database changes have been canceled (database rollback)

SAP memory and ABAP memoryUsing SAP memory. User-specific memory retained for the duration of the session. Can only be used for simple field values.

Using ABAP memory. Can be used to transfer data between internal modi. Can be used to transfer any ABAP/4 variables ( Fields, strings, internal tables, complex objects)

SAP memoryYou use the SPA/GPA parameters to pass data. These paramters are saved globally in memory. The paramters are indetified by a three-character code.

In dialog programs you can SET and GET these parameters in the attribute window of the screen field, by marking the SET and GET fields and put the name of the parameter in the ParameterId field.

In a program ( Dialog or Report ) you can use the GET PARAMETER and SET PARAMETER statements:

set parameter id 'RV1' field <fieldname>

get parameter id 'RV1' field <fieldname>

Regards,

santosh