SAP ABAP - Do Loop - SAP ABAP

Unconditional loops are the loops which are not conditioned and it executes statements repeatedly without determingin any specific condition.The DO statement implements unconditional loops by executing a set of statement blocks several times unconditionally.
Syntax
The general format for the DO statement is as follows −
‘Times’ imposes a restriction on the number of loop passes, which is represented by ‘n’. The value of ‘n’ should not be negative or zero. If it is zero or negative, the statements in the loop are not executed.
Flow Diagram
do loop(1)

Example

The above code produces the following output −
In this example, the system understands that the loop is to be processed 15 times.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

SAP ABAP Topics