rspec/rules/S5119/abap/rule.adoc

24 lines
881 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
Modifying SAP standard tables via an Open SQL statement can result in data corruption and unexpected behavior. This is because a direct modification bypasses all validation mechanisms.
Instead, the use of standard functions or SAP Business Add-Ins (BAdIs) is recommended.
This rule raises an issue on Open SQL statements ``++INSERT++``, ``++UPDATE++``, ``++MODIFY++``, or ``++SELECT ... FOR UPDATE++`` which target an SAP table, i.e. a table with a name starting with a character between "A" and "X", case insensitive.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
SELECT my_col FROM my_system_table WHERE my_id = 123 FOR UPDATE. " Noncompliant
SELECT my_col FROM z_custom_table WHERE my_id = 123 FOR UPDATE. " Ignored; modifies a custom table
----
ifdef::rspecator-view[]
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::rspecator-view[]