Why does the SQL statement at the database level look different to the one in the ABAP source code?
The open SQL statements implemented from the R/3 System are transferred to the database using the database interface (DBI). In the DBI, the SQL statement is modified in several cases before it is transferred to the database: If a column with an empty variable is compared in the WHERE part, the DBI ignores this condition. If you are using FOR ALL ENTRIES, a long values list is broken down into statements with shorter IN lists or OR links, based on the following DBI parameters: rsdb/prefer_in_itab_opt If the parameter is set to 0 (default setting for R/3 Basis releases up to and including 4.6D), OR links are always used. If the value is 1 (default setting for R/3 Basis releases up to and including R/3 Basis 6.10), IN lists are used if possible. If however, the FOR ALL ENTRIES list is referenced several times in the SQL statement, OR links must still be used. rsdb/max_blocking_factor Number of OR operations rsdb/max_in_blocking_factor Length of IN lists (if rsdb/prefer_in_itab_opt = 1) Re
Related Questions
- SQL Examiner detects that two tables are different after the database comparison and offers me to synchronize them though I changed only the order of columns. How can I avoid it?
- Why does the SQL statement appear different on database level than in the ABAP source code?
- How to support a different SQL Database?