Ansicht
Dokumentation

ABAPCOMMIT_ROLLBACK_CONNECTION - COMMIT ROLLBACK CONNECTION

ABAPCOMMIT_ROLLBACK_CONNECTION - COMMIT ROLLBACK CONNECTION

BAL Application Log Documentation   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

COMMIT, ROLLBACK CONNECTION

Short Reference



COMMIT$|ROLLBACK CONNECTION con|(con_syntax).

Effect

This COMMIT or ROLLBACK statement performs a database commit or database rollback on the specified database connection. The database connection can be specified as follows:

  • con
Specified directly and statically as con.
  • (con_syntax)
Specified as the content of a parenthesized data object con_syntax of type c or string.

The following can be specified for con or in con_syntax, all of which are transformed to uppercase letters internally:

  • default specified statically or DEFAULT specified dynamically for the standard connection of the current work process.
  • The name of secondary connection specified statically or dynamically. The name must exist in the column CON_NAME of the DDIC database table DBCON.
  • The name of a service connection to the standard database specified statically or dynamically. The name of the service connection must consist of the prefix R/3* followed by a maximum of any 26 alphanumeric characters in uppercase letters.
  • A name (in uppercase letters) assigned for a secondary connection or service connection by the addition AS of the static Native SQL statement CONNECT TO. It should be noted here that a connection with a name of this type is a separate database connection that can exist in parallel with a connection not named using AS.

Notes

  • It is important to note that the statements COMMIT CONNECTION default and ROLLBACK CONNECTION default perform a pure database commit or rollback on the standard connection. Unlike COMMIT WORK and ROLLBACK WORK, they do not close the current SAP LUW.
  • The statements COMMIT CONNECTION and ROLLBACK CONNECTION are suitable for a simple close of a database LUW. If database LUWs are monitored by the application log, the function modules DB_COMMIT and DB_ROLLBACK are better suited because they raise an appropriate event.
  • With COMMIT CONNECTION and ROLLBACK CONNECTION, connections activated in Native SQL or AMDP can only be processed if their names do not contain lowercase letters. This affects service connections and names defined using the addition AS of the statement CONNECT TO. The names of secondary connections do not contain any lowercase letters.
  • The statements COMMIT CONNECTION and ROLLBACK CONNECTION empty global temporary tables on the specified secondary connection and prevent the runtime error COMMIT_GTT_ERROR in implicit database commits on this connection.
  • The statements COMMIT CONNECTION and ROLLBACK CONNECTION change the state of an active secondary connection or service connection to inactive. The way the following connection is used in the same internal session opens a new database LUW.

Example

Triggering a database commit and releasing the exclusive lock after modifying statements by using COMMIT CONNECTION default on the standard connection.






PERFORM Short Reference   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 5805 Date: 20240426 Time: 223334     sap01-206 ( 82 ms )