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
812

hi

friends

i want to know the exact meaning of LUW if anybody knows please tell me.

thanks

and

regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
738

<b>1.What is LUW or Data base Transaction ?</b>

- A “LUW”(logical unit of work) is the span of time during which any database updates must be performed in an “all or nothing” manner .Either they are all performed (committed),or they are all thrown away (rolled back).In the ABAP/4 world , LUWs and

- Transactions can have several meanings:

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).

<b>2. What is SAP LUW or Update Transaction?</b>

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.

reward points if it is usefull ....

Girish

5 REPLIES 5
Read only

Former Member
0 Likes
738

Hi,

The Open SQL statements INSERT, UPDATE, MODIFY, and DELETE allow you to program database changes that extend over several dialog steps. Even if you have not explicitly programmed a database commit, the implicit database commit that occurs after a screen has been processed concludes the database LUW

http://help.sap.com/saphelp_47x200/helpdata/en/41/7af4c2a79e11d1950f0000e82de14a/frameset.htm

http://help.sap.com/saphelp_47x200/helpdata/en/41/7af4b9a79e11d1950f0000e82de14a/frameset.htm

these info. must be helpful

Regards

Sudheer

Read only

former_member196299
Active Contributor
0 Likes
738

hi Savita ,

here are few info about SAP LUW :

An SAP logical unit of work (LUW) is a functionally complete set of steps within a business

process in the R/3 System.

n The process steps must be logically related.

n SAP LUWs work on an all-or-nothing principle: Either all or none of its steps are carried out.

n The business process to be mapped must be basic. For example, you would not have a single SAP

LUW consisting of all of the steps between a customer processing an order and an invoice being

produced. Instead, you would split this up into separate parts, each of which would then be

represented in the R/3 System by its own LUW. What constitutes an "elementary" process depends

on the overall process and how you have modeled it.

n For further information, see the ABAP Editor keyword documentation for the term transaction

processing .

Regards,

Ranjita

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
738

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).

In an ABAP system, there are two type of LUWs:

Database LUWs that are realized by the database system

SAP LUWs, that are realized using special ABAP proramming techniques.

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.

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.

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

Bundling via function modules (update)

Through the statement CALL FUNCTION...IN UPDATE TASK, an update function module is registered for subsequent execution in an update work process. (synchronous and asynchronous update) or in the current work process (local update).

Bundling via function modules (transactional RFC)

Through the statement CALL FUNCTION... IN BACKGROUND TASK|UNIT, a remote-enabled function module is registered for subsequent asynchronous execution via the RFC interface (transactional RFC ).

Bundling via subprograms

Through the statement PERFORM ... ON COMMIT, a subprogram is registered for subsequent execution in a different work process.

Statements for SAP LUWs

A SAP LUW is controlled via the Open SQL statements

COMMIT WORK

ROLLBACK WORK

SET UPDATE TASK LOCAL.

Regards,

Sesh

Read only

Former Member
0 Likes
739

<b>1.What is LUW or Data base Transaction ?</b>

- A “LUW”(logical unit of work) is the span of time during which any database updates must be performed in an “all or nothing” manner .Either they are all performed (committed),or they are all thrown away (rolled back).In the ABAP/4 world , LUWs and

- Transactions can have several meanings:

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).

<b>2. What is SAP LUW or Update Transaction?</b>

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.

reward points if it is usefull ....

Girish

Read only

Former Member
0 Likes
738

LUW means logical unit of work :- what are the statements above the commit work and wait , it treats all the statements as one unit if there is any wrong in one statement then it won't executeall the statements

you can refer here

REWARD IF USEFULL

COMMIT WORK [AND WAIT].

The statement COMMIT WORK completes the current SAP LUW and opens a new one, storing all change requests for the currenta SAP LUW in the process. In this case, COMMIT WORK performs the following actions:

It executes all subroutines registered using PERFORM ON COMMIT.

It triggers an internal event in Object Services that ensures the registration of changes in persistent objects as the last update function module, as well as the subsequent initialization of persistent object attributes.

It initiates the processing of all registered update function modules in the update work process.

This executes all high-priority update function modules registered using CALL FUNCTION ... IN UPDATE TASK in the order of their registration and in a common database LUW. If you do not specify the addition AND WAIT, the program does not wait until the update work process has executed it (asynchronous updating). If you specify the addition AND WAIT, however, program processing after COMMIT WORK will not continue until the update work process has executed the high-priority update function modules (synchronous updating).

If all high-priority update function modules are completed successfully, the statement executes the low-priority update function modules together in a common database LUW.

In parallel, it also executes the individual function modules registered using CALL FUNCTION ... IN BACKGROUND TASK DESTINATION in a separate database LUW for each destination.

It handles all SAP locks set in the current program according to the value of the formal parameter _SCOPE of the corresponding lock function modules.

It triggers a database commit that also terminates the current database LUW.

The completion of statement COMMIT WORK triggers the event TRANSACTION_FINISHED of the system class CL_SYSTEM_TRANSACTION_STATE, where the parameter KIND has the value of the constant CL_SYSTEM_TRANSACTION_STATE=>COMMIT_WORK.

If the statement COMMIT WORK is executed by calling special programs, be aware of the following:

In a program executed using batch input, or if you have called the program using the USING addition of the statement CALL TRANSACTION, COMMIT WORK terminates the batch input processing when using the corresponding settings.

In a program called using CALL DIALOG, COMMIT WORK initiates the processing of subroutines or updated function modules registered using PERFORM ... ON COMMIT and CALL FUNCTION ... IN UPDATE TASK. Therefore, it does not complete the current SAP LUW. The SAP LUW cannot be completed until you execute the COMMIT WORK statement in the calling program.

You cannot execute the COMMIT WORK statement during the updating procedure or during the execution of subroutines registered using PERFORM ... ON {COMMIT|ROLLBACK}.