DB-LUW in ABAP-OO (Transaction-concept)

Hi Experts,
how can i use the transactionconcept in ABAP Object?
In normal abap we use for example :
CALL FUNCTION update_function1 IN UPDATE TASK
CALL FUNCTION update_function2 IN UPDATE TASK
commit work.
Are there any possibilities to use such concept in ABAP OO?
I have created some save-methods, which contains "insert" or "update" .
I call this save methods one after another, in following form
r_object->save_method1() .
r_object->save_method2() .
r_object->save_method3() .
How can I realize the LUW concept here?
Thanks in advance
Cetoman

Hello Naimesh,
Methods don't support Update Module, RFC module
Having said that, can we not wrap the method call inside an Update Module
Cheers,
Suhas

Similar Messages

  • Need documents of ABAP Object Oriented concepts

    Hi,
    I  need materials on ABAP Object Oriented Concepts to learn.
    If you have any good documents which covers all the topics of ABAP OO then please send me to [email protected]
    Thanks in advance.
    Regards,
    Chandru

    Chandra,
    Very good sites with docs.
    http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    Pls. reward if useful...

  • Bex query for BW abap report/ transaction

    Hi Experts, Here is a scenario: I developed ABAP program in BW using multiple DSOs for complex logic. Since I cannot use abap program directly in BO reports, I need to develop a query in BW for my abap program. Is it possible to develop a bex query for BW abap report / transaction in BW? I have limited knowledge on BW and BO. Please help me. Thanks in advance Raghu

    First of all thanks for your suggestion Matthew..!
    As you said, I created virtual info cube based on function module.
    In the info cube, I defined (4)dimensions and (1)key figure.
    In the fucntion module, appropriate below parameters defined and code written for the data table (e_t_data)
    CALL ZFM_XXXXXXX 
    EXPORTING   
    i_infoprov =                " Name of InfoProvider   
    i_th_sfc =                  " rsdri_th_sfc: List of Characteristics    
    i_th_sfk =                  " rsdri_th_sfk: List of Key Figures
    *   i_t_range =                 " rsdri_t_range: Range List
    *   i_tx_rangetab =             " rsdri_tx_rangetab: Table from Range List
    *   i_first_call =              " rs_bool       First Call
    *   i_packagesize = 100000      " i             Package Size 
    IMPORTING   
    e_t_data =                  " standard table:  Data Table   
    e_end_of_data =             " rs_bool       :End of Data Reached   
    e_t_msg =                   " rs_t_msg      : BW: Table with Messages
    Test:
    Right click the info cube and choose "displayed data", immediately it triggered above function module.
    when I see the import parameters data,
    no characteristcs data in i_th_sfc. But, key figures has data (1 record) in i_th_sfk.
    Not sure, Did I missed anything? Please help me.
    Thanks in advance

  • Calling ABAP Program / Transaction in WAD

    Hello Experts,
    We have requirement to call ABAP program/transaction in WAD. Can you please help us with your valuable inputs. We are using BI 7.0 !
    Thanks and Regards,
    Prawin Kumar

    Hi Praveen,
    you can try calling the ABAP class/transaction  using a custom extension as described here:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/99bd42b407114be10000000a421937/content.htm
    Brgds,
    Marcel

  • Starting new SAP LUW inside ABAP method

    I am calling a ABAP method and in that I want to start a new SAP LUW and do commit when leaving the method.
    The requirement is that all update function modules called inside the method should only be committed and no other prior update FMu2019s(before calling the method) should not be committed.
    Any idea if itu2019s possible to do that in ABAP OO and how do we do it.
    Thanks & Regards,
    Anand.

    HI ,
    Thanks for the quick replies. I tried using SET UPDATE TASK LOCAL but it was also committing all the prior update FM's before calling this method.
    I also tried using the RFM -    CALL FUNCTION 'ABC' IN BACKGROUND TASK   DESTINATION 'NONE' . and then
    COMMIT WORK AND WAIT.
    Now when i do commit work it commits all the previous update tasks also.
    And if i do not call COMMIT WORK right after the call to RFM, then the object that i am trying to create inside the RFM will not be committed.And then if i proceede some validations will fail as the objects were not created.
    Is there a way to commit immediately when the RFM is called without commiting the calling transaction from where this RFM is called.
    Any examples would be highly appreciated ..
    Regards,
    Anand.
    Edited by: Anand Ajitsaria on Feb 4, 2011 9:54 AM

  • Web Dynpro ABAP call transaction in the foreground

    In Screen Painter/SAP ALV, we can create a screen where for example if you double click on a sales order field it can take you a VA03 transaction by :
    call transaction VA03 ... and skip first screen.
    I am creating Web Dynpro ABAP application that needs to do the same thing where if we click on the field, it will take to VA03 transaction or other transactions.
    Has anyone done this in Web Dynpro ABAP? I have done some research and determine that we cannot call transaction in the foreground? I hope I am wrong.  Any help/insights will be greatly appreciated.

    Hi Phong,
    WDA is generic client to Netweaver connection based on HTTP/S.
    At this stage on a few clients are supported. WEB dynpro client and Browsers...
    SAPGUI connects to SAP using a different protocol.
    No SAPGUI connection is implied by a WDA client connection.
    Therefore  abap statements that invoke screens and otherwise assume SAPGUI
    is connected are not supported in WDA.   eg call screen, call transaction
    You can either
                         a) build your own WDC to front end calls to BAPIs to get the Sales order data.
                        b) open/ exit to the new WDC for Sales Orders in ERP2005
                              see LORD_MAINTAIN_COMP
                           c) exit to the INTERNAL ITS URL for transaction VA03 
                               eg http://<host>:<port>/sap/bc/gui/sap/its/webgui?~Transaction=VA03
                              but getting the skip first screen may require you to call custom tran ZVA03
                               which calls VA03 to skip first screen setting the PID appropriately.
    Hopefully you opt for option a) or b).
    c) can work... I have used it from BSPs but it not pretty.
    regards
    Phil

  • Starting new database LUW inside ABAP during IDoc posting

    Hi all,
    During posting of an inbound IDoc, I am trying to update my Z-table in user-exit. I want to do it regardless of the result of IDoc posting. The problem is: if IDoc posted successfully - table is updated because COMMIT WORK is called at the end of the posting, however, if IDoc not posted - ROLLBACK WORK is called and table is not updated. So, my aim now is to commit the update of Z-table in any case, but it is the only thing that should be committed - no other prior update FMu2019s should be committed.
    I'm aware about the following thread
    http://forums.sdn.sap.com/thread.jspa?threadID=1884700
    Author of this thread says that he solved a problem by means of RFC and STARTING NEW TASK. But ABAP help says
    that starting asynchronous RFC triggers immediately a database commit in the calling program (which is unacceptable because all prior update FMu2019s will be committed ). I've checked and it is really the case.
    From my point of view SET UPDATE TASK LOCAL with COMMIT WORK should work in such kind of tasks, but in case of IDoc processing the whole process runs in a local update (see SET UPDATE TASK LOCAL in FM 'IDOC_INPUT'), so writing once again SET UPDATE TASK LOCAL has no effect.
    I tested SUBMIT statement as well. It had no effect and then I found out from ABAP help that SUBMIT ... AND RETURN starts new SAP LUW, but NOT a DB LUW. That is if I update my Z-table in the program called by SUBMIT - all ROLLBACK statements still affect my  Z-table update.
    Is there any simple solution? Please suggest.
    Thanks in advance!

    Hello,
    Try SUBMIT VIA JOB.....
    Sample Code
    call function 'JOB_OPEN'
    exporting
    jobname = name
    importing
    jobcount = number
    exceptions
    cant_create_job = 1
    invalid_job_data = 2
    jobname_missing = 3
    others = 4.
    if sy-subrc = 0.
    submit z_idoc_create_process_order and return
    via job name number number
    with p_aufnr = it_header1-aufnr
    with p_werks = it_header1-werks
    with p_autyp = c_autyp
    with p_auart = it_header1-auart
    with p_dispo = it_header1-dispo
    with p_opt = c_opt
    with p_mestyp = c_mestyp.
    if sy-subrc = 0.
    call function 'JOB_CLOSE'
    exporting
    jobcount = number
    jobname = name
    strtimmed = 'X'
    exceptions
    cant_start_immediate = 1
    invalid_startdate = 2
    jobname_missing = 3
    job_close_failed = 4
    job_nosteps = 5
    job_notex = 6
    lock_failed = 7
    others = 8.
    if sy-subrc 0.
    endif.

  • ABAP - BDC transaction not saving changes to records

    I am trying to write my first ABAP code using BDC recording.  Essentially I would like to flag the "Final Delivery" field (EKPO-EGLKZ) for a range of documents by recording transaction MASS.
    The code runs without errors - but the changes are not saved.  I have run the code in "Processing Mode: A" (Display all screens) and the program successfully loops through each record & saves the updated fields.  When I look at the documents in ME23N the changes have not been saved.   Running the MASS transaction manually results in the changes being successfully saved so I can rule out any data validation issues.
    Does anyone know why the changes refuse to save when running the code below?
    I have considered trying to use BAPI_PO_CHANGE instead of BDC, but I am new to ABAP and I thought the BDC code would be less complex.
    report Z_MASS_REMOVE_FDI_DCI
           no standard page heading line-size 255.
    include bdcrecx1.
    TYPES: BEGIN OF ty_tab,
    MASSOBJTYP(7),
    MASSVARNAM(7),
    DOCNO(9),
    ITEM(1),
    END OF ty_tab.
    DATA : it_tab TYPE STANDARD TABLE OF ty_tab.
    DATA : wa_tab TYPE ty_tab.
    START-OF-SELECTION.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = 'X:\STO.TXT'
    * FILETYPE = 'ASC
    has_field_separator = 'X'
    TABLES
    data_tab = it_tab
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17.
    END-OF-SELECTION.
    LOOP AT it_tab INTO wa_tab.
    WRITE:/ wa_tab-MASSOBJTYP,
    wa_tab-MASSVARNAM,
    wa_tab-DOCNO,
    wa_tab-ITEM.
    PERFORM open_group.
    perform bdc_dynpro      using 'SAPMMSDL' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MASSSCREEN-OBJECT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MASSSCREEN-OBJECT'
                                  wa_tab-MASSOBJTYP.
    perform bdc_field       using 'MASSSCREEN-VARNAME'
                                  wa_tab-MASSVARNAM.
    perform bdc_dynpro      using 'SAPMMSDL' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MASSSCREEN-OBJECT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=NEXT'.
    perform bdc_dynpro      using 'SAPLMASS_SEL_DIALOG' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MASSFREESEL-LOW(01)'.
    perform bdc_field       using 'MASSFREESEL-LOW(01)'
                                  wa_tab-DOCNO.
    perform bdc_dynpro      using 'SAPLMASS_SEL_DIALOG' '0100'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MASSFREESEL-LOW(02)'.
    perform bdc_field       using 'MASSFREESEL-LOW(02)'
                                  wa_tab-ITEM.
    perform bdc_dynpro      using 'SAPLMASS_SEL_DIALOG' '0100'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=CRET'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MASSFREESEL-LOW(01)'.
    perform bdc_dynpro      using 'SAPLMASSINTERFACE' '0200'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=FDAE'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'NR_ITEMS'.
    perform bdc_dynpro      using 'SAPLMASSINTERFACE' '0200'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SAVE'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'NR_ITEMS'.
    perform bdc_dynpro      using 'SAPLMASSMSGLIST' '0300'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'REOML-MSGTXT(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=EXIT'.
    perform bdc_transaction using 'MASS'.
    ENDLOOP.
    PERFORM close_group.

    Where is BDC_INSERT.
    If u use OPEN and CLOSE_group u need to use INSERT_GROUP also to update in database.
    A session will be created and u nedd to run the Session in Sm35 in order to update the database.
    Edited by: Ranjith Kumar on Sep 18, 2008 6:41 AM

  • How to provide MASS transaction concept to table maintenece generator

    Hello ,
    Can any body provide me the solution ....for how to add MASS transaction working concept to table maintenence generator.
    In our requirement user will select some number of records from table maintenence view using MENU >SELECTIONS>SELECT BY CONTENTS .
    Based on this they will select number of records to update .
    from this step they want the same functionality of MASS transaction
    Any help is appreaciated and rewarded.
    urgent
    thanks

    hi...
    could you let us know how you solved this ?

  • ABAP in transaction MASS

    Hello Everyone,
    There is a place in transaction MASS to add a custom formula that requires ABAP.  So we need to look into how we could do this with a formula
    (Edit -> Enter Formulas). 
    I don't know how this functionality works, can anyone help me with this?
    Thanks!
    Arvin

    Here is a sample from SAPWIKI
    X is the value you must return     
    form GET_NEW_MAKT_MAKTX using segment structure MAKT changing X.                          
    data:  mytext(40) type c,         
           mylength type i.           
    mylength = strlen( X ).           
    if mylength > 38.                 
       replace '  ' with ' ' into X.  
    endif.                            
    overlay  mytext with X.           
    write 'L' to mytext+39.           
    X = mytext.  
    endform.          
    <a href="http://sapwiki.iwoars.net/index.php/MASS">http://sapwiki.iwoars.net/index.php/MASS</a>

  • Execute an OS/400-command (CL-programm) by an ABAP (Z-transaction)

    Hello all!
    we are searching for possibility to execute an OS/400-command (CL-programm) by an ABAP-programm (Z-transaction).
    Actual (not working) example:
    REPORT Z_WRKOUTQ_STOP.
    Data: p_command(250) value 'KMXHOM6/QSYS.LIB/SKOLIB6.LIB/SKC001.PGM'.
    DATA: BEGIN OF tabl OCCURS 10,
    filler(1000),
    END OF tabl.
    CALL 'SYSTEM' ID 'COMMAND' FIELD p_command
    ID 'TAB' FIELD tabl-sys.
    Thanks for an answer.
    Regards,
    Bernd

    Hi,
    post your query in ABAP Forum.
    you can do this using  Function Module SXPG_COMMAND_EXECUTE
    This function allows a programmer to run a command from within an ABAP program.
    regards,
    kaushal

  • ABAP : call transaction CN22

    Hello,
    We use the call transaction to CN22 ( with MESSAGES into itab option...)  to close networks.
    Sometimes we have messages in a popup window which indicate that the closing action is not possible.
    Unfortunately, those kind of messages are not returned by the call transaction and  sy-subrc statement = 0.
    Is it possible to read these messages with the call transaction statement ?
    Thanks in advance for your answer
    Jocelyne

    Hi Guinamant,
    you can collect al lthe error messages into bdcmsgcoll structure.
    you follow the codes:
    CALL TRANSACTION c_cn22 USING i_bdcdata
                              OPTIONS FROM wa_opt
                              MESSAGES INTO i_msgcoll.
    note: i_msgcoll type standard table of bdcmsgcoll,
             wa_msgcoll type bdcmsgcoll.
    after bdc execution , all the error messages will be colllected in to i_msgcoll.
    then if you want to get the text messages, then pass it through FM:
    WRF_MESSAGE_TEXT_BUILD, OR USE FORMAT_MESSAGE
    READ TABLE i_msgcoll INTO wa_msgcoll
      WITH KEY msgtyp = c_e.
    CALL FUNCTION 'WRF_MESSAGE_TEXT_BUILD'
          EXPORTING
            p_msgid   = wa_msgcoll-msgid
            p_msgno   = l_msgno
            p_msgv1   = wa_msgcoll-msgv1
            p_msgv2   = wa_msgcoll-msgv2
            p_msgv3   = wa_msgcoll-msgv3
            p_msgv4   = wa_msgcoll-msgv4
          IMPORTING
            es_return = lwa_bapireturn1.
    Hope this can solve your problems.
    Regards,
    Tutun

  • Create an event using abap class (transaction swetypv)

    Hi,
    I’m trying to create an event by using an abap class.
    The purpose is to update po reqs using BAPI_REQUISITION_CHANGE upon saving a sales order. The exit is called on saving a sales order MV45AFZZ.
    In MV45AFZZ the method cl_swf_evt_event is called and the object type, event, objkey and obj cat is exported.
    Object Type = ZBUS203200
    Event = Z_TRAD_ORDER_CHANGE_OO
    I created my class ZCL_UPDATE_PUR_REQ (by copying CL_SWF_RUN_WIM_HANDLER
    And using interface name BI_EVENT_HANDLER_STATIC )
    In /nswetypv I assigned Class ZCL_UPDATE_PUR_REQ
    to Object Type ZBUS203200
    And Event Z_TRAD_ORDER_CHANGE_OO.
    All that works fine except for passing in the objectkey.
    In Class ZCL_UPDATE_PUR_REQ
    Method BI_EVENT_HANDLER_STATIC~ON_EVENT
    When I go to create a parameter for object key, I get the message
    ‘Parameters/exceptions of inherited methods or events cannot be changed’.
    Has anyone any suggestions for how I can get the object key into the method call BI_EVENT_HANDLER_STATIC~ON_EVENT?
    Thanks
    Ann

    Hi Johann,
    You don't need a class to do the job if you are on a 6.10 or higher system. Use command CALL TRANSFORMATION to create an XML from an internal table.
    Regards,
    John.

  • ABAP Query (Transaction KOB1 and KSB1)

    Hallo Friends,
    I want to generate a query which will consist of some selected columns of the output list of the transactions KOB1 and KSB1 together. Using F1 and F9 to check the Table Fieldname where the contents of the list where selected, has not been so helpful because the contents where from SAP Structures.
    Can someone tell me the Tranparent tables (not structure) from where I can generate the query, which will include the contects of the list outputs of the above transactions ??
    Please see the select-options of the above transactions too.
    Blacky.

    Hello Blacky,
    Both transaction codes are attached to rpeort RKAEP000.
    Report RKAEP000 utlimatly uses FM K_LINE_ITEMS_SELECT_AND_LIST to select the data and display.
    So, put a break-point at the this FM in the report RKAEP000 to check what are the inputs being given to the FM in both T-codes.
    Regards,
    Naimesh Patel

  • What do you mean by luw

    hi gurus,
    what do you mean by luw ...
    logical unit of work...
    pls any one help me..
    regards,
    praveen

    LUW is basically of two type:
    1. DB LUW
    2. SAP LUW
    LUW is logical unit of work means once the full transaction is complete (in case of SAP) or when we move from one screen to another (in case of DB LUW) then there should be a commit and rollback involved based on the success of transaction/screen.
    Basically in case of DB LUW it could be the case that Transaction is incomplete and this will lead to DB inconsistency. For eg. If some bank transaction is there, if something is credited to one account then it should be debited from one account. On one screen u credited one account (DB LUW has been successful and DB has been changed) and on another screen u wanted to debit that account but on second screen it gave some error (DB LUW has not been successful and DB has not been changed) so it will lead to inconsistency.
    TO remove this error SAP came up with SAP LUW which will do DB commit only once the transaction is through.
    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:
    • 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.
    • 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.
    • 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.
    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.
    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’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.
    Transactions and Logical Units of Work
    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:
    Database Logical Unit of Work (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.
    SAP Transaction
    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.
    Database Logical Unit of Work (LUW)
    Check the following link:
    http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4bca79e11d1950f0000e82de14a/frameset.htm
    SAP LUW
    http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4bfa79e11d1950f0000e82de14a/content.htm
    SAP Transactions
    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.
    An SAP LUW is a logical unit consisting of dialog steps, whose changes are written to the database in a single database LUW.
    There are various bundling techniques that you can use to ensure that all of the database updates belonging to an SAP LUW are made in the same single database 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.
    database transaction
    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.
    SAP LUW
    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.
    ABAP/4 Transaction
    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.
    Also check this link.
    http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4bfa79e11d1950f0000e82de14a/content.htm
    Check these links on LUW's
    http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4bfa79e11d1950f0000e82de14a/content.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/41/7af4c2a79e11d1950f0000e82de14a/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/41/7af4b9a79e11d1950f0000e82de14a/frameset.htm
    Cheers,
    Chandru

Maybe you are looking for