Ansicht
Dokumentation

ABENCL_SQL_STATEMENT - CL SQL STATEMENT

ABENCL_SQL_STATEMENT - CL SQL STATEMENT

Fill RESBD Structure from EBP Component Structure   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

- CL_SQL_STATEMENT

The class CL_SQL_STATEMENT contains instance methods that receive and execute dynamically created SQL statements.

Instances of the class CL_SQL_STATEMENT can be created using the statement CREATE OBJECT or the instance operator NEW, which allow a reference to an object of the class CL_SQL_CONNECTION to be passed to the constructor. If no database connection is passed, the standard connection from the database interface to the standard AS ABAP database is used.

Notes

  • Exactly one SQL statement can be passed to each method of the class CL_SQL_STATEMENT to be executed. Passing multiple SQL statements separated by delimiters such as ; is not possible.
  • The class CL_SQL_STATEMENT allows the statement passed to be executed once. The subclass CL_SQL_PREPARED_STATEMENT can be used to execute a statement multiple times with different parameters.
  • An object of the class CL_SQL_STATEMENT is often only intended to be used once, which means it is also only addressed once. In this case, the instance operator NEW with appended method call can be used to create the instance. This removes the need to declare a reference variable explicitly.
  • The methods in the class CL_SQL_STATEMENT should not be used to execute transaction control statements (COMMIT, ROLLBACK) because they are not detected by the database interface, which then might not execute the actions required at the end of a transaction. Only the corresponding methods in the class CL_SQL_CONNECTION can be used for transaction control.





PERFORM Short Reference   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

Length: 2932 Date: 20240423 Time: 164335     sap01-206 ( 45 ms )