‎2007 Nov 05 5:35 AM
‎2007 Nov 05 5:40 AM
Hi,
Have a look at the following link,
http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4bfa79e11d1950f0000e82de14a/content.htm
‎2007 Nov 05 5:40 AM
HI
Refer to this link:
<u>http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4bfa79e11d1950f0000e82de14a/content.htm</u>
Thanks
vasudha
‎2007 Nov 05 7:25 AM
Hi,
<i><b>Transactions and Logical Units of Work</b></i>
In everyday language, a transaction is a sequence of actions that logically belong together in a business sense and which either procure or process data. It covers a self-contained procedure, for example, generating a list of customers, creating a flight booking, or sending reminders to customers. From the point of view of the user, it forms a logical unit.
The completeness and correctness of data must be assured within this unit. In the middle of a transaction, the data will usually be inconsistent. For example, when you transfer an amount in financial accounting, this must first be deducted from one account before being credited to another. In between the two postings, the data is inconsistent, since the amount that you are posting does not exist in either account. It is essential for application programmers to know that their data is consistent at the end of the transaction. If an error occurs, it must be possible to
undo the changes made within a logical process.
In the R/3 System, there are three terms frequently used in this connection:
<b>Database Logical Unit of Work (LUW)</b>
A database LUW is the mechanism used by the database to ensure that its data is always consistent.
<b>SAP LUW</b>
An SAP LUW is a logical unit consisting of dialog steps, whose changes are written to the database in a single database LUW.
<b>SAP Transaction</b>
An SAP transaction is an application program that you start using a transaction code. It may contain one or more SAP LUWs.
The following sections of this documentation explain these three terms in more detail.
<b>Database Logical Unit of Work (LUW)</b>
Check the following link:
http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4bca79e11d1950f0000e82de14a/frameset.htm
<b>SAP LUW</b>
http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4bfa79e11d1950f0000e82de14a/content.htm
<b>SAP Transactions</b>
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.
If a particular application requires you to write a complex transaction, it can often be useful to arrange logical processes within the SAP transaction into a sequence of individual SAP LUWs. You can structure SAP transactions as follows:
With one or more SAP LUWs.
Transactions in this form consist entirely of processing blocks (dialog modules, event blocks, function module calls, and subroutines). You should be careful to ensure that external subroutines or function modules do not lead to COMMIT WORK or ROLLBACK WORK statements accidentally being executed.
By inserting an SAP LUW
The ABAP statements CALL TRANSACTION (start a new transaction), SUBMIT (start an executable program), and CALL FUNCTION... DESTINATION (call a function module using RFC) open a new SAP LUW. When you call a program, it always opens its own SAP LUW. However, it does not end the LUW of the SAP transaction that called it. This means that a COMMIT WORK or ROLLBACK WORK statement only applies to the SAP LUW of the called program. When the new LUW is complete, the system carries on processing the first SAP LUW.
By running two SAP LUWs in parallel
The CALL FUNCTION... STARTING NEW TASK statement calls a function module
asynchronously in a new session. Unlike normal function module calls, the calling
transaction carries on with its own processing as soon as the function module has
started, and does not wait for it to finish processing. The function call is synchronous. The called function module can now call its own screens and interact with the user.
Regards,
Bhaskar