Skip to content

Avoid UPDATE or DELETE Without a WHERE Condition ​

WarningPerformance & Database#EC NO_UNFILT_DMLRemote Enabled

Overview ​

Flag DML without WHERE on database tables.

ATC Finding Message: Filter database writes with a WHERE condition

Rationale ​

An UPDATE or DELETE that targets a database table without a top-level WHERE condition affects every row in the table. Such statements are dangerous in production and often indicate a missing restriction. Add a WHERE condition, or use the matching internal-table statement when no database table is intended.

Non-Compliant ​

abap
DELETE FROM zorders.
UPDATE zorders SET status = 'X'.

Compliant ​

abap
DELETE FROM zorders WHERE status = 'C'.
UPDATE zorders SET status = 'X' WHERE order_id = lv_id.

Suppression ​

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

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

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

Technical Details ​

Released under the MIT License.