Skip to Content
author's profile photo Former Member
Former Member

LUW

What is LUW and Uses of it?

explain COMMIT WORK and ROOL BACK with syntax?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2007 at 07:25 AM

    hi,

    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.

    example

    modify <tabname> from table <internal table>.

    commit work.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2007 at 07:28 AM

    hi,

    in additon to my earlier post

    The statement <b>ROLLBACK WORK</b> closes the current SAP-LUW and opens a new one. In doing so, all change requests of the current SAP-LUW are canceled.

    The statement <b>COMMIT WORK</b> completes the current SAP LUW and opens a new one, storing all change requests for the current SAP LUW in the process

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2007 at 07:31 AM

    hi

    LUW is logic unit of work. LUW holding a collection of dialog steps. A collection of LUW is nothing but a transaction.

    LUM types:

    -


    Database LUW.

    SAP LUW.

    From one Databse LUW to another database LUW area can be saved using commit work.

    Rollback also revert the data from one LUW another LUW. (Commit work creates a new LUW and save the data from new LUW to old LUW. It can't roll bak).

    Regards

    Bhupal Reddy

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2007 at 07:52 AM

    <b>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)</b>

    <b>COMMIT WORK. </b>

    Executes a database commit and thus closes a logical processing unit or Logical Unit of Work ( LUW ) (see also Transaction processing ). This means that

    • all database changes are made irrevocable and cannot be reversed with ROLLBACK WORK and

    • all database locks are released.

    COMMIT WORK also

    • calls the subroutines specified by PERFORM ... ON COMMIT * executes asynchronously any update requests (see CALL FUNCTION ... IN UPDATE TASK ) specified in these subroutines or started just before,

    • processes the function modules specified in CALL FUNCTION ... IN BACKGROUND TASK ,

    • cancels all existing locks (see SAP locking concept ) if no update requests exist,

    • closes all open database cursors (see OPEN CURSOR ) and

    • resets the time slice counter to 0.

    COMMIT WORK belongs to the Open SQL command set.

    Return code value

    The SY-SUBRC is set to 0.

    <b>ROLLBACK WORK.</b>

    Closes a logical processing unit by reversing all database changes made since the last COMMIT .

    You use this statement if you cannot be certain that all the database changes have been executed correctly.

    The update routines are not performed.

    ROLLBACK WORK belongs to the Open SQL command set.

    <b>Note</b>

    If the ROLLBACK statement occurs within a SELECT loop, the processing cannot continue because the database cursor is invalid. After the ROLLBACK statement, you should therefore ensure that all SELECT processing has been explicitly terminated.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2007 at 07:58 AM

    hi Balu,

    Check

    SAP LUW (logical unit of work )

    http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4bfa79e11d1950f0000e82de14a/content.htm

    Regards,

    Santosh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2007 at 08:16 AM

    hi

    good

    go through this link,this ll give you complete ideea about the LUW

    http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4bfa79e11d1950f0000e82de14a/content.htm

    thanks

    mrutyun^

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2007 at 10:43 AM

    <b>Logical Units of Work</b>

    Database (LUW)

    A database LUW is the mechanism used by the database to ensure that its data is always consistent.

    SAP (LUW)

    An SAP LUW is a logical unit consisting of dialog steps, whose changes are written to the database in a single database LUW.

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

    <b>COMMIT</b> Syntax :

    COMMIT WORK.

    Executes a database commit and thus closes a Logical Unit of Work (LUW)

    http://help.sap.com/saphelp_46c/helpdata/en/34/8e73b66df74873e10000009b38f9b8/frameset.htm

    <b>ROLLBACK</b> Syntax:

    ROLLBACK

    Closes a logical processing unit by reversing all database changes made since the last COMMIT.

    http://help.sap.com/saphelp_46c/helpdata/en/34/8e73d76df74873e10000009b38f9b8/frameset.htm

    regards,

    Siraj

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.