rspec/rules/S1670/abap/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

33 lines
619 B
Plaintext

== Why is this an issue?
Internal tables can quickly become a source of performance problems if not accessed correctly, ``++SORTED++`` and ``++HASHED++`` tables should always be accessed with the appropriate key or partial key.
=== Noncompliant code example
[source,abap]
----
READ TABLE it INTO work_area INDEX 1.
----
=== Compliant solution
[source,abap]
----
READ TABLE it INTO work_area WITH KEY color = 'RED'.
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Access table XXX using "WITH TABLE KEY"
endif::env-github,rspecator-view[]