1 Introduction
A database commit closes all opened database cursors. It is particularly important that database commits are not triggered (in one of the ways listed here) in SELECT loops and after the statement OPEN CURSOR.
2 Detail
Implicit Database Commits
The implicit database commits in an AS ABAP are caused by the fact that an AS ABAP uses its own work processes to connect to the database system. A work process can only ever execute a single database LUW but cannot interfere with the database LUWs belonging to other work processes. Since an ABAP program can be executed by different work processes during its runtime, the database LUW for the current work process must be completed each time an action takes place that leads to a change of work process. As a result, a database commit is performed implicitly in the following situation:
Completion of a dialog step
The program waits for a user action and does not occupy a work process during this time. The next free work process is assigned to the program in the next dialog step.
Calling a function module in a synchronous or asynchronous remote function call
The current work process passes control to a different work process or system. An exception to this are updates. When updates are running, sRFC and aRFC do not cause work processes to be switched or database commits to be executed.
Completion of a function module called in a separate work process using a synchronous remote function call.
Usually, a new work process is allocated to the call program. If a new sRFC follows quickly enough, and enough free work processes exist, the work process sRFC continues to be used, but an implicit database c

本文详细解释了ABAP编程中的数据库提交机制,包括隐式提交(由工作进程切换引发)和显式提交(如使用特定SQL语句或函数模块)。讨论了不同情况下的数据库游标操作和注意事项,如监控和避免COMMIT_GTT_ERROR错误。
最低0.47元/天 解锁文章
4094

被折叠的 条评论
为什么被折叠?



