Using ``++LOOP...INTO++``  with ``++MODIFY++`` statements will put the required record in a work area, process it and put it back in the internal table. It is more efficient to modify the internal table directly by using ``++LOOP...ASSIGNING++`` and field-symbols.


This rule raises an issue when a ``++LOOP...INTO++`` contains one or more ``++MODIFY++`` statements.


== Noncompliant Code Example

----
LOOP AT i_bseg INTO wa_bseg.
    ...
    wa_bseg-sgtxt = 'VALUE'.
    MODIFY i_bseg FROM wa_bseg.
ENDLOOP.
----


== Compliant Solution

----
LOOP AT i_bseg ASSIGNING <fs_bseg>.
  ...
  <fs_bseg>-sgtxt = 'VALUE'.
ENDLOOP.
----


== See

* https://zevolving.com/use-of-field-symbols-vs-work-area/[Use of Field-symbols vs Work area]

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

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

include::message.adoc[]

include::highlighting.adoc[]

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