Skip to content

Avoid Unfiltered SELECT on Database Tables (Full Table Scan Prevention) ​

WarningPerformance & Database#EC NO_FULL_SCAN_SELECTRemote Enabled

Overview ​

Flag SELECT statements on DB tables without a WHERE clause.

ATC Finding Message: Avoid SELECT without a WHERE condition on database tables (full table scan)

Rationale ​

Executing a SELECT statement on a database table without an explicit WHERE clause reads every single row in the table, bypassing database indexes and causing full table scans. On large transactional or master data tables, this exhausts database memory, saturates network bandwidth, and leads to critical system performance degradation.

Standard: Always filter database reads with an index-backed WHERE condition. For paging or sampling, use UP TO n ROWS.

Non-Compliant ​

abap
" Critical: Scans millions of database rows
SELECT * FROM t000 INTO TABLE @DATA(lt_data).

Compliant ​

abap
" Optimized: Targeted read with WHERE filter
SELECT * FROM t000
  WHERE mandt = '100'
  INTO TABLE @DATA(lt_data).

Configuration & Thresholds ​

This check can be fine-tuned directly in the ATC Check Variant Editor (CHKV) in Eclipse ADT:

Parameter NameData TypeDefault ValueDescription & Guidance
ALLOW_UP_TO_NBooleanfalseAllow SELECT statements without a WHERE clause when restricted by UP TO n ROWS

Suppression ​

To suppress findings for this rule, append the pseudo-comment to the statement:

abap
" Standard pseudo-comment:
... "#EC NO_FULL_SCAN_SELECT

" SAP CI_ prefix format:
... "#EC CI_NO_FULL_SCAN_SELECT

Technical Details ​

Released under the MIT License.