rspec/rules/S2242/abap/rule.adoc
2022-02-04 16:28:24 +00:00

39 lines
762 B
Plaintext

``++SELECT INTO TABLE++`` is much more efficient than ``++SELECT ... ENDSELECT++``. ``++SELECT INTO TABLE++`` needs more memory to hold the result set, but in normal situations, this is not a concern. When memory is a concern, the result set can be divided into smaller sets.
== Noncompliant Code Example
[source,abap]
----
SELECT * FROM T006 INTO X006_WA.
...
ENDSELECT.
----
== Compliant Solution
[source,abap]
----
SELECT * FROM T006 INTO TABLE X006.
LOOP AT X006 INTO X006_WA.
...
ENDLOOP.
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]