rspec/rules/S1671/abap/rule.adoc

39 lines
805 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
When several lines must be inserted/updated into an internal table, instead of doing those changes line by line, mass operations should be used because they offer better performance by design.
This rule raises an issue when a single line operation like ``++APPEND++``, ``++CONCATENATE++``, and ``++INSERT++`` is performed on an internal table in a loop.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
2022-02-04 17:28:24 +01:00
[source,abap]
2021-04-28 16:49:39 +02:00
----
LOOP AT ITAB1 INTO WA.
APPEND WA TO ITAB2.
ENDLOOP.
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
2022-02-04 17:28:24 +01:00
[source,abap]
2021-04-28 16:49:39 +02:00
----
APPEND LINES OF ITAB1 TO ITAB2.
----
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[]