<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic LUW in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/luw/m-p/3592985#M865142</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;can u please explain me following questions &lt;/P&gt;&lt;P&gt;1.what is LUW ?&lt;/P&gt;&lt;P&gt;2. what is SAP LUW.?&lt;/P&gt;&lt;P&gt;3.Every data base is providing by default DB LUW then why SAP is providing SAP LUW?&lt;/P&gt;&lt;P&gt;4.what are lock objects? &lt;/P&gt;&lt;P&gt;5.if SAP is providing by default lock objects why we have to use?.when we have to use?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please provide explanations for above questions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;GK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 22 Mar 2008 06:04:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-22T06:04:39Z</dc:date>
    <item>
      <title>LUW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/luw/m-p/3592985#M865142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;can u please explain me following questions &lt;/P&gt;&lt;P&gt;1.what is LUW ?&lt;/P&gt;&lt;P&gt;2. what is SAP LUW.?&lt;/P&gt;&lt;P&gt;3.Every data base is providing by default DB LUW then why SAP is providing SAP LUW?&lt;/P&gt;&lt;P&gt;4.what are lock objects? &lt;/P&gt;&lt;P&gt;5.if SAP is providing by default lock objects why we have to use?.when we have to use?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please provide explanations for above questions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;GK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Mar 2008 06:04:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/luw/m-p/3592985#M865142</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-22T06:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: LUW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/luw/m-p/3592986#M865143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The R/3 system is multi user system and many users access the same information at the same time, which is mainly DATA. Consider the case where one user is modifying a record, and second user is trying to delete the same record. If the second user is successful in deleting the record then the first user will face problem for modifying the record that is already deleted. The avoid such situation, R/3 system has provided Logical Unit of Work, which is defined as a locking mechanism to protect transaction integrity. Of course, there are other measures, which ensures data integrity like check table i.e. foreign key relationship. Within SAP system there are three types of transaction and may be distinguished as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149; Database transaction known as LUW. It can be defined as a period in which operation requested must be performed as a unit, i.e. all or nothing operation. At the end of LUW, either of the database changes are committed or rolled back.&lt;/P&gt;&lt;P&gt;&amp;#149; Update transaction or SAP LUW. One SAP LUW can have several databases LUW. So a set of a database is either committed or rolled back. The special ABAP/4 command COMMIT WORK, marks the end of a SAP LUW.&lt;/P&gt;&lt;P&gt;&amp;#149; ABAP/4 transaction. Is made up of a set of related task combined under one transaction code. ABAP/4 transactions are for programming environment, in which ABAP/4 transaction functions like one complete object containing screens, menus and transaction codes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;R/3 system has provided in built locking mechanism, which defines the Logical Unit of Work. Also user can set his own locking mechanism. The LUW starts when a lock entry in the system table is created, and it ends when the lock is released.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To provide the user the facility to communicate with the table in order to modify or delete or insert data, R/3 has provided tool called SCREEN PAINTER. This tool allows you to design screen, process screen through program and update the database table. SAP has provided one and only one way to update the database table, i.e. transaction. Though you can update database table by using open SQL statement through program, SAP usually doesn&amp;#146;t recommend this kind of updating. Many standard transactions are available to update standard table but if the need arises, the developer should be able to develop new transaction, which allows the updating of database tables. This can be achieved by using various components of screen painter.&lt;/P&gt;&lt;P&gt;Types of LUWs:&lt;/P&gt;&lt;P&gt;Database transaction or LUW.&lt;/P&gt;&lt;P&gt;Update transaction or SAPLUW.&lt;/P&gt;&lt;P&gt;ABAP/4 Transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;database transaction&lt;/P&gt;&lt;P&gt;Database transaction or LUW is defined as a period in which operation requested must be performed as one unit. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the end of LUW, either the database changes are committed or rolled back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP LUW&lt;/P&gt;&lt;P&gt;One SAP LUW can have several databases LUW. So a set of database transactions either committed or rolled back. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The special ABAP/4 command &amp;#145;Commit work&amp;#146; marks the end of SAP LUW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP/4 Transaction&lt;/P&gt;&lt;P&gt;It is made up of a set of related task combined under one transaction code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP/4 transaction functions like one complete object containing screens, menus and transaction code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this documentation..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4bfa79e11d1950f0000e82de14a/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4bfa79e11d1950f0000e82de14a/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thnaks,&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Mar 2008 07:28:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/luw/m-p/3592986#M865143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-22T07:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: LUW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/luw/m-p/3592987#M865144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gopi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LUW: Indivisible business process, which is performed either completely or not at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Related sequence of programming units which when executed can be distributed across several work processes (several database LUWs) as with, for example, dialog steps or remote function calls. However, database changes are made within one single database LUW. SAP LUWs are carried out by grouping techniques in which update function modules or subroutines, among other things, are registered in various work processes and executed by one single work process. An SAP LUW is completed by the open SQL statement COMMIT WORK. Changes within an SAP LUW can be undone with the open SQL statement ROLLBACK WORK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An SAP LUW usually has the same function as a dialog transaction (which maps a business process) and maps database changes made in dialog transactions to an update. A dialog transaction can, however, also include several SAP LUWs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lock bjects Are Used to Synchronys Access to same data by more than One user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose You that u have opened the Program and if any one is trying to access the same by another user then it will show the same program in Display Mode. so SAP will Automaticaly take care of the Things About Locking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose U Have Created A Transaction Code. Suppose U If u want Give Authorization Some User Only Than u have to Use Lock Objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please go through this link for further info:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8bde9690-0201-0010-ed8e-8787eae24388#q-2" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8bde9690-0201-0010-ed8e-8787eae24388#q-2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it solves your concern...:)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eshwar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Mar 2008 10:23:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/luw/m-p/3592987#M865144</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-22T10:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: LUW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/luw/m-p/3592988#M865145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Database Logical Unit of Work (LUW) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the point of view of database programming, a database LUW is an inseparable sequence of database operations that ends with a database commit. The database LUW is either fully executed by the database system or not at all. Once a database LUW has been successfully executed, the database will be in a consistent state. If an error occurs within a database LUW, all of the database changes since the beginning of the database LUW are reversed. This leaves the database in the state it was in before the transaction started.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The database changes that occur within a database LUW are not actually written to the database until after the database commit. Until this happens, you can use a database rollback to reverse the changes. In the R/3 System, database commits and rollbacks can be triggered either implicitly or using explicit commands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Implicit Database Commits in the R/3 System&lt;/P&gt;&lt;P&gt;A work process can only execute a single database LUW. The consequence of this is that a work process must always end a database LUW when it finishes its work for a user or an external call. Work processes trigger an implicit database commit in the following situations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        When a dialog step is completed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Control changes from the work process back to the SAP GUI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        When a function module is called in another work process (RFC).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Control passes to the other work process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        When the called function module (RFC) in the other work process ends.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Control returns to the calling work process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        When a WAIT statement interrupts the work process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Control passes to another work process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Error dialogs (information, warning, or error messages) in dialog steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Control passes from the work process to the SAP GUI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Explicit Database Commits in the R/3 System&lt;/P&gt;&lt;P&gt;There are two ways to trigger an explicit database commit in your application programs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Call the function module DB_COMMIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sole task of this function module is to start a database commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Use the ABAP statement COMMIT WORK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement starts a database commit, but also performs other tasks (refer to the keyword documentation for COMMIT WORK). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Implicit Database Rollbacks in the R/3 System&lt;/P&gt;&lt;P&gt;The following cases lead to an implicit database rollback:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Runtime error in an application program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This occurs whenever an application program has to terminate because of an unforeseen situation (for example, trying to divide by zero).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Termination message&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Termination messages are generated using the ABAP statement MESSAGE with the message type A or X. In certain cases (updates), they are also generated with message types I, W, and E. These messages end the current application program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Explicit Database Rollbacks in the R/3 System&lt;/P&gt;&lt;P&gt;You can trigger a database rollback explicitly using the ABAP statement ROLLBACK WORK. This statement starts a database rollback, but also performs other tasks (refer to the keyword documentation for ROLLBACK WORK).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the above, we can draw up the following list of points at which database LUWs begin and end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A Database LUW Begins&lt;/P&gt;&lt;P&gt;·        Each time a dialog step starts (when the dialog step is sent to the work process).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Whenever the previous database LUW ends in a database commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Whenever the previous database LUW ends in a database rollback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A Database LUW Ends&lt;/P&gt;&lt;P&gt;·        Each time a database commit occurs. This writes all of the changes to the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        . To remove the object is being queued through above FM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to use these function module in your program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; with regards,&lt;/P&gt;&lt;P&gt;sowjanyagosala.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 09:00:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/luw/m-p/3592988#M865145</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T09:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: LUW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/luw/m-p/3592989#M865146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Database Logical Unit of Work (LUW) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the point of view of database programming, a database LUW is an inseparable sequence of database operations that ends with a database commit. The database LUW is either fully executed by the database system or not at all. Once a database LUW has been successfully executed, the database will be in a consistent state. If an error occurs within a database LUW, all of the database changes since the beginning of the database LUW are reversed. This leaves the database in the state it was in before the transaction started.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The database changes that occur within a database LUW are not actually written to the database until after the database commit. Until this happens, you can use a database rollback to reverse the changes. In the R/3 System, database commits and rollbacks can be triggered either implicitly or using explicit commands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Implicit Database Commits in the R/3 System&lt;/P&gt;&lt;P&gt;A work process can only execute a single database LUW. The consequence of this is that a work process must always end a database LUW when it finishes its work for a user or an external call. Work processes trigger an implicit database commit in the following situations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        When a dialog step is completed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Control changes from the work process back to the SAP GUI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        When a function module is called in another work process (RFC).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Control passes to the other work process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        When the called function module (RFC) in the other work process ends.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Control returns to the calling work process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        When a WAIT statement interrupts the work process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Control passes to another work process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Error dialogs (information, warning, or error messages) in dialog steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Control passes from the work process to the SAP GUI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Explicit Database Commits in the R/3 System&lt;/P&gt;&lt;P&gt;There are two ways to trigger an explicit database commit in your application programs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Call the function module DB_COMMIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sole task of this function module is to start a database commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Use the ABAP statement COMMIT WORK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement starts a database commit, but also performs other tasks (refer to the keyword documentation for COMMIT WORK). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Implicit Database Rollbacks in the R/3 System&lt;/P&gt;&lt;P&gt;The following cases lead to an implicit database rollback:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Runtime error in an application program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This occurs whenever an application program has to terminate because of an unforeseen situation (for example, trying to divide by zero).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Termination message&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Termination messages are generated using the ABAP statement MESSAGE with the message type A or X. In certain cases (updates), they are also generated with message types I, W, and E. These messages end the current application program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Explicit Database Rollbacks in the R/3 System&lt;/P&gt;&lt;P&gt;You can trigger a database rollback explicitly using the ABAP statement ROLLBACK WORK. This statement starts a database rollback, but also performs other tasks (refer to the keyword documentation for ROLLBACK WORK).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the above, we can draw up the following list of points at which database LUWs begin and end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A Database LUW Begins&lt;/P&gt;&lt;P&gt;·        Each time a dialog step starts (when the dialog step is sent to the work process).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Whenever the previous database LUW ends in a database commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Whenever the previous database LUW ends in a database rollback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A Database LUW Ends&lt;/P&gt;&lt;P&gt;·        Each time a database commit occurs. This writes all of the changes to the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        . To remove the object is being queued through above FM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to use these function module in your program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;sowjanya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 09:03:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/luw/m-p/3592989#M865146</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T09:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: LUW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/luw/m-p/3592990#M865147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logical Unit of Work&lt;/P&gt;&lt;P&gt;Inseparable sequence of database operations, working on the all-or-nothing principle, where the operations are either all carried out, or all canceled.&lt;/P&gt;&lt;P&gt;From the point of view of the database system, logical units of work (LUWs) are crucial to the integrity of&lt;/P&gt;&lt;P&gt;the data in the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An SAP Logical Unit of Work (LUW) contains a series of dialog steps for a business process in the R/3&lt;/P&gt;&lt;P&gt;System that form a logical unit.&lt;/P&gt;&lt;P&gt;The steps in the process chain of the business process must be logically related.&lt;/P&gt;&lt;P&gt;SAP LUWs work on an all-or-nothing principle: Either the system processes all of the steps, or none of&lt;/P&gt;&lt;P&gt;them at all.&lt;/P&gt;&lt;P&gt;The business process represented in the LUW must be basic, that is it must not be too big. For example, the entire process from customer order to billing is too big to be included in a single LUW.&lt;/P&gt;&lt;P&gt;Instead, you would split the process up into smaller, independent sections, each of which would form a&lt;/P&gt;&lt;P&gt;transaction in the R/3 System. Exactly what constitutes a "basic" process depends on the business process and the way in which you have modeled it.&lt;/P&gt;&lt;P&gt;Note: A business LUW is often refered to as a transaction. The term transaction has several meanings.&lt;/P&gt;&lt;P&gt;In an SAP environment, transaction is often understood to mean an application that you start using a transaction code. A program can include several SAP LUWs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A database LUW (DB Logical Unit of Work) is an inseparable sequence of database operations that takes the database from one consistent state to another.&lt;/P&gt;&lt;P&gt;Database LUWs are either completely executed by the database system, or not at all. &lt;/P&gt;&lt;P&gt;Database LUWs close with a database commit. It is only in the commit that the changes are firmly written in the database. Until the commit occurs, you can undo your changes using a database rollback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Implicit database commits are triggered when:&lt;/P&gt;&lt;P&gt;A dialog step is completed&lt;/P&gt;&lt;P&gt;An error dialog occurs&lt;/P&gt;&lt;P&gt;You call a function module in another work process (RFC).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SAP LUW can span several dialog steps and contains consistency checks, which are processed as closely as possible to the user action, so that the user can be informed of the error status. Since the user processing time of a screen is generally much longer than a dialog step of the application server, an SAP LUW requires a much larger time frame than a database LUW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using an SAP LUW to represent a business process in the R/3 System involves both user dialogs and a database dialog. The purpose of a transaction is to make sure that the data exchanged between program and user in the user dialogs is processed on an all-or-nothing basis in the database. This&lt;/P&gt;&lt;P&gt;means that all of the changes from the SAP LUW must be processed in a single database LUW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Usually an SAP LUW is processed in more than one DB LUW.&lt;/P&gt;&lt;P&gt;The aim when programming a transaction is to bundle the segments of the database dialog in a DB&lt;/P&gt;&lt;P&gt;LUW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should aim to process the database dialogs as late as possible within the database LUW, and to keep the database locks set for as short a time as possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if SAP is providing by default lock objects why we have to use?.when we have to use?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever you make direct changes to data on the database in a transaction, the database system sets corresponding locks.&lt;/P&gt;&lt;P&gt;The database management system (DBMS) physically locks the table entries that you want to change (INSERT; UPDATE, MODIFY), and those that you read from the database and intend to change (SELECT SINGLE &amp;lt;f&amp;gt; FROM &amp;lt;dbtab&amp;gt; FOR UPDATE). Other users who want to access the locked&lt;/P&gt;&lt;P&gt;record or records must wait until the physical lock has been released. In such a case, the ABAP program waits until the lock has been released again.&lt;/P&gt;&lt;P&gt;At the end of the database transaction, the database releases all of the locks that it has set during the transaction.&lt;/P&gt;&lt;P&gt;In the R/3 System, this means that each database lock is released when a new screen is displayed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Locks are maintained in a central lock table. This ensures that also programs that run on a different application server of the same SAP System, are informed of the locks.&lt;/P&gt;&lt;P&gt;Before a database update is triggered, the program requests a lock using a special function module. You can set a lock for a data record in a database table, or even a set of records, according to you requirements. The function module first checks whether there is an existing lock that will obstruct the&lt;/P&gt;&lt;P&gt;lock request. If a lock does not already exist then the lock is set. &lt;/P&gt;&lt;P&gt;If another program tries to set the same lock, the function module sends a message to say that the record is already locked. This is carried out using an exception of the function module. Afterwards the return code is set to the value &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;The return code must be supplied with values in the program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can inform the user of a corresponding message.&lt;/P&gt;&lt;P&gt;If the database change is successful, then the lock entry in the central lock table is deleted using a different function module.&lt;/P&gt;&lt;P&gt;since a change of screen triggers an implicit database commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hope this helps, Do reward.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 09:33:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/luw/m-p/3592990#M865147</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T09:33:29Z</dc:date>
    </item>
  </channel>
</rss>

