Page 1 of 1

Using a LOOP node without an internal table

PostPosted: Thu Jul 19, 2012 7:06 am
by DeathAndPain
Hello everyone,

when you insert a LOOP node into a Smartform, there is a checkbox whether or not the LOOP will go over an internal table. Now I have a case where I want a LOOP node, but without a corresponding internal table. Instead, I want this LOOP node to serve the purpose of a "Do 6 times...enddo"-loop in ABAP.

Trouble is, all hints and guides about LOOP nodes that I can find in the internet are internal table-related. What I need to know is how I can exit the LOOP after a defined number of iterations. Adding a code node and implementing a counter in there is not the problem. But once my code node finds that the time has come to exit the LOOP node, how do I do so? In the definition of the LOOP node itself I can see no conditions other than an internal table through which I could specify when to leave the LOOP.

But the checkbox besides "Internal Table" is there, so it can be unchecked, which means that it must be possible to sensibly use a LOOP node without looping at an internal table. But how is it done?