rspec/rules/S5119/abap/rule.adoc

37 lines
1.0 KiB
Plaintext
Raw Normal View History

== Why is this an issue?
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.
=== Noncompliant code example
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,abap]
2021-04-28 16:49:39 +02:00
----
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::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
include::highlighting.adoc[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]