Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

current row number in internal table

Former Member
0 Likes
9,363

HI,

How to find current number of record in internal table which is being processed.

Srini.

1 ACCEPTED SOLUTION
Read only

suresh_datti
Active Contributor
3,846

Use the system variable SY-TABIX.

~Suresh

HI,

How to find current number of record in internal table which is being processed.

Srini.

5 REPLIES 5
Read only

suresh_datti
Active Contributor
3,847

Use the system variable SY-TABIX.

~Suresh

Read only

Former Member
0 Likes
3,846

Hi Srinu,

Welcome to SDN...

The system field <b>SY-TABIX</b> will give the current number of record in an internal table.

If the internal table is iterated through LOOP...ENDLOOP then for each iteration the SY-TABIX will be incremented by one.

If the internal table is iterated through LOOP...ENDLOOP WHERE <COND> then for each iteration the SY-TABIX will hold the condition met record number.

READ TABLE ITAB WITH KEY F1=<VAL> . The SY-TABIX will hold the record number of success record.

Thanks,

Vinay

Read only

Former Member
0 Likes
3,846

Hi,

If it is Loop...Endloop, then SY-TABIX will have the current row/index of the internal table.

If it is inside a Do...Enddo, or While...Endwhile, then SY-INDEX will have the current iteration number.

Regards,

Subramanian

Read only

Former Member
0 Likes
3,846

Hi srinu ,

By using system field SY-TABIX you can find the current row number.....

Reward points if helpful.

Regards,

MD<b></b>

Read only

0 Likes
3,846

> Hi srinu ,

>

> By using system field SY-TABIX you can find the

> current row number.....

>

> Reward points if helpful.

>

> Regards,

> MD<b></b>

MD/Srinu

It looks like you missed the very basics of cheating 101..

Better luck next time..

~Suresh