Use the Exit statement.
Example:
Data: recnr type i.
select * from ska1.
recnr = recnr + 1
if recnr > 10.
exit.
endif.
Updated May 18, 2018
Use the Exit statement.
Example:
Data: recnr type i.
select * from ska1.
recnr = recnr + 1
if recnr > 10.
exit.
endif.