Get Example source ABAP code based on a different SAP table
Setting Transaction Behavior for SAP HANA HANA-specific SQL> contains the following statements for setting transaction behavior:
SET TRANSACTION AUTOCOMMIT DDL>
SET TRANSACTION ISOLATION LEVEL>
SET TRANSACTION LOCK WAIT TIMEOUT>
SET TRANSACTION READ ONLY$|WRITE> These statements modify the transaction behavior of the current database connection>. They cannot be used directly by AS ABAP when accessing the SAP Hana database using Native SQL> (ADBC>, EXEC SQL>>). This is because transaction behavior defined for the current database connection using these settings is persisted beyond its current database LUW>. If the database connection is then reused in AB_SQL , Native SQL, or AMDP (see Database Connections>), unexpected or critical situations can arise. The following methods of the class CL_SQL_CONNECTION>> should be used instead:
AUTOCOMMIT_DDL> for SET TRANSACTION AUTOCOMMIT DDL>
SET_ISOLATION_LEVEL> for SET TRANSACTION ISOLATION LEVEL>
SET_LOCK_WAIT_TIMEOUT> for SET TRANSACTION LOCK WAIT TIMEOUT >
There is no current method available for SET TRANSACTION READ ONLY$|WRITE> These methods wrap the SQL statements. The HANA-specific part (Client Library) of the Native SQL interface> registers any calls of these methods and resets the transaction behavior of the current database connection to the default behavior at the end of the current database LUW.
Latest notes:
In SQLScript> (and hence automatically in the corresponding AMDP methods>), the SQL SET TRANSACTION> statements for setting transaction behavior are not allowed in the syntax.
Currently, there are no automatic resets of the transaction behavior after method calls on any other database platforms. BEGIN_SECTION SAP_INTERNAL_HINT See SAP Note 2560888. END_SECTION SAP_INTERNAL_HINT ABAP_HINT_END