Category > 
Supported by
Supported by Inetum

Do just one task per LOOP

images/thumbnail.jpg - Thumbnail
When ABAP programmers run into a LOOP they like to use it to get as many things done as possible. Even if that LOOP ends up having hundreds or thousands of lines.

Keep code blocks short

images/thumbnail.jpg - Thumbnail
Unfortunately that is not what happens in most of the Z code I have seen in my life as an ABAP programmer. Both IFs and LOOPs tend to grow bigger than anyone can deal with. I recently ran into a LOOP with over 1500 lines.