CHECK_62 - LOOP simplification/performance
Improve this page
CODE
Use DELETE WHERE instead
LOOP AT lt_tab ASSIGNING <fs> WHERE ...
DELETE lt_tab FROM <fs>.
ENDLOOP.
It should be replaced with:
DELETE lt_tab WHERE ...
Checking for lines before looping
IF lines( lt_tab ) > 0
LOOP AT lt_tab ASSIGNING <fs> WHERE ...
...
ENDLOOP.
ENDIF.
can be reduced to
LOOP AT lt_tab ASSIGNING <fs> WHERE ...
...
ENDLOOP.
Continue as last statement in loop
LOOP AT lt_tab ASSIGNING <fs> WHERE ...
...
CONTINUE.
ENDLOOP.
can be reduced to
LOOP AT lt_tab ASSIGNING <fs> WHERE ...
...
ENDLOOP.