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

Count rows in an internal table

Former Member
0 Likes
9,218

Anybody how knows how I can count rows in my internal table?

1 ACCEPTED SOLUTION
Read only

former_member221770
Contributor
0 Likes
1,034

Linn,

Try this:

data: l_lines type i.

describe table itab lines l_lines.

Cheers,

Pat.

PS. Kindly assign Reward Points to the posts you find helpful.

5 REPLIES 5
Read only

former_member221770
Contributor
0 Likes
1,035

Linn,

Try this:

data: l_lines type i.

describe table itab lines l_lines.

Cheers,

Pat.

PS. Kindly assign Reward Points to the posts you find helpful.

Read only

0 Likes
1,034

let the name of your internal tabl is i_tab.

then after the filling the table do this.

data: cnt type i.

describe table i_tab lines cnt.

write cnt.

Read only

0 Likes
1,034

Hi,

Data: lines like sy-tabix.

DESCRIBE TABLE ITAB LINES LINES.

where itab is your internal table.

This will work out.

Please award sutiable points .

Regards,

Irfan

Read only

Former Member
0 Likes
1,034

hi,

try this one

DATA: N TYPE I,

DESCRIBE TABLE ITAB LINES N.

cheers

sasi

Read only

former_member183804
Active Contributor
0 Likes
1,034

With release 6.10 there is the statement lines( ). In prior releases you can stick to the describe statement.

Regards

Klaus