Skip to Content

implicit vs. explicit commit

Hello all

Can anyone tell the complete story:

1) When is implicit commits done ? (by screen/dynpro change etc.)

2) What is the difference between implicit and explicit commits ? (....in update task etc.)

3) Has the "commit concept" changed over time or is it the same in all version of ABAP.

Best regards

Thomas Madsen Nielsen

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Nov 21, 2003 at 05:03 PM

    ABAP Objects

    The Official Reference

    ISBN 1-59229-011-6

    tells you the following:

    ....

    33.2.1 Database Commit

    In an SAP system, you can trigger database commits implicitly or explic-

    itly.

    33.2.1.1 Implicit Database Commits

    The implicit database commits of an SAP system originate in the fact that

    a SAP system is logged on the database system via its work processes. A

    work process can perform only one database LUW at once,and cannot

    intervene in the database LUWs of other work processes. Since various

    work processes can execute an ABAP program durirng its runtime, the cur -

    rent work process must complete the database LUW for every action that

    leads to a change in the work process.Accordingly,the following situa-

    tions will trigger an implicit database commit:

    • Completing a dialog step

    The program waits for a user action and does not use a work process in

    the meantime.The next dialog step assigns the next free work process

    to the program.

    • Calling a function module using Remote Function Call (RFC)

    The current work process transfers control to another work process or

    system.

    • Ending a function module called in its own work process using Remote

    Function Call

    This action assigns a new work process to the calling program.

    • Using the WAIT statement to interrupt the current work process

    This action assigns the next free work process to the program after the

    interruption.

    • Sending error and information messages and warnings

    These messages interrupt the current dialog step (see above).

    33.2.1.2 Explicit Database Commits

    The following situations explicitly trigger database commits in ABAP pro-

    grams:

    • Using the corresponding database-specific ABAP Native SQL state-

    ment.

    • Calling the DB_COMMIT function module.This non-parametric func-

    tion module encapsulates the corresponding ABAP Native SQL state-

    ment.

    • Executing the Open SQL statement COMMIT WORK (see Section 33.3.1).

    .....

    There is al lot more to find in that book!

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Nov 25, 2003 at 01:49 PM

    Yes there have been changes, at least on the impicit side. Up to Rel 3.1 a commit was set when encountering a break-point or situations that lead to different screen.

    If you want to avoid the effects of implicit commit, you might want to try the

    OPEN CURSOR and

    FETCH NEXT statements

    which give you perfect control via named cursor.

    kind regards

    Joerg Wulf

    Add comment
    10|10000 characters needed characters exceeded