rspec/rules/S2242/abap/rule.adoc

22 lines
482 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
``++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.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
SELECT * FROM T006 INTO X006_WA.
...
ENDSELECT.
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
SELECT * FROM T006 INTO TABLE X006.
LOOP AT X006 INTO X006_WA.
...
ENDLOOP.
----