SAP Tutorials Blog

 

LOOP AT <itab> [INTO <wa>] [FROM <n1>] [TO <n2>] [WHERE <condition>].

...

ENDLOOP.


<itab> is read line by line into <wa> or into the table work area. For each line read, processed the statement block between LOOP and ENDLOOP. Within the statement block, SY-TABIX contains

the index of the current line. The loop ends as soon as all lines of the table have been processed. After the ENDLOOP statement:


SY-SUBRC = 0 : at least one line was read;

SY-SUBRC = 4 : otherwise it is set to 4.


Serkan AKKAVAK

Computer Engineer BSc

SAP Department Manager

Contact : serkurumsal@yandex.com