cancel
Showing results for 
Search instead for 
Did you mean: 

why cant we use sy-index in loop and endloop?where exactly we used sy-index

Former Member
0 Kudos

hi

can u help me for this

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos
Former Member
0 Kudos

we can use sy-index in loop and endloop. it tells you the loop index when used inside loop and endloop.

Former Member
0 Kudos

Hi...

Genereally Sy-index is used in iterative cases like

while....endwhile

and

 Do.... Enddo

.

In LOOP ..... Endloop.... We should use SY-TABIX....

It would be more consistent we use sy-tabix as we loop at internal table so this SY-TABIX points to the current record its reading...

we can use sy-index but rarely depends on condition.....

SY-INDEX and SY-TABIX will not be same always in LOOP and ENDLOOP

Rewards points if satisfied..

Regards

Narin Nandivada