Mentor SAP

Logical sequence for reading Data with ADBC

  1. Choose database connection (only when accessing secondary DB): Call method get_connection() of class CL_SQL_CONNECTION.
  2. Create a statement object: Instantiation of class CL_SQL_STATEMENT
  3. Fill string variable with SQL syntax: Use either CONCATENATE or string templates/string expressions
  4. Issue native SQL call: Call method execute_query() of class CL_SQL_STATEMENT
  5. Assign target variables for result set: Call method set_param() or set_param_table() of class CL_SQL_RESULT_SET
  6. Retrieve result set: Call method next_package() of class CL_SQL_RESULT_SET
  7. Close result and release resources: Method close() of class CL_SQL_RESULT_SET

 

When using native SQL, you should be aware of several pitfalls, such as the following: