== Why is this an issue?

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. 


=== Noncompliant code example

[source,abap]
----
LOOP AT ITAB1 INTO WA. 
  APPEND WA TO ITAB2. 
ENDLOOP.
----


=== Compliant solution

[source,abap]
----
APPEND LINES OF ITAB1 TO ITAB2. 
----


ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

=== Message

Remove the nesting loop structure and use the "XXX LINES OF ... TO" mass operation clause


'''
== Comments And Links
(visible only on this page)

=== is duplicated by: S2244

=== on 30 Apr 2014, 15:38:55 Nicolas Peru wrote:
Not really sure of what to do with this rule in fact. 

Here the example are not equivalent in functional terms : compliant copy STRUC into ITAB and non compliant iterate through a table  to do a write statement. 

\[~ann.campbell.2] Maybe, you can provide some reference where the rule originated ? 

=== on 30 Apr 2014, 15:53:32 Nicolas Peru wrote:
Rule originated from \http://www.dsag.de/fileadmin/media/Leitfaeden/Leitfaden_Best_Practice_Guide_eng/files/assets/basic-html/page20.html

endif::env-github,rspecator-view[]
