Ansicht
Dokumentation
DB_COMMIT - Commit Work using EXEC SQL - no rollout
ABAP Short Reference rdisp/max_wprun_time - Maximum work process run timeThis documentation is copyright by SAP AG.
The system is performing a database commit on the database connection that is currently valid using
Native SQL. Normally, this is the standard conneciton (also known as the default connection) to the
central databaes of the AS ABAP system. Note, however, that you can set the current database connection globally for Native SQL statements using the following EXEC SQL statements:
EXEC SQL.
CONNECT TO con
ENDEXEC.
EXEC SQL.
SET CONNECTION con
ENDEXEC.
Therefore, if the current Native SQL database connection has been set to a secondary database connection
with these commands before the DB_COMMIT function is called, the commit is performed on this database
connection and not on the standard connection of the AS ABAP. This might lead to undesired effects in the transaction logic, causing inconsistent data.
By setting the optional parameter IV_DEFAULT = abap_true (default value is abap_false), you can
force a database commit to be perfomed using the standard connection regardless of how the current Native SQL connection is set.
The database commit means that:
1),,The running database transaction is ended and all changes made to the database are committed
2),,All open database cursors that were opened without the addition WITH HOLD are implicitly closed
3),,All database locks requested in the running transaction are released
Unlike the COMMIT WORK statement in Open SQL, calling DB_COMMIT does not close the current SAP LUW,
that is, the events connected to the end of an SAP LUW are not triggered (see the documentation for COMMIT WORK).
However, after the database commit has been successfully performed, the event DB_TRANSACTION_FINISHED
of class CL_DBI_TRANSACTION_STATE is triggered, with the parameter KIND set to the value CL_DBI_TRANSACTION_STATE=>GC_COMMIT.
Parameters
IV_DEFAULTExceptions
Function Group
SYDBCPI1466 during Backup TXBHW - Original Tax Base Amount in Local Currency
This documentation is copyright by SAP AG.
Length: 2095 Date: 20240523 Time: 090753 sap01-206 ( 49 ms )