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

print

Former Member
0 Likes
358

how to print the no of records value on the screen which is in internal table

is it by distinct i need full statement

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
333

Hi Chaya,

Use <b>DESCRIBE</b> statement to get the no of records in an internal table.

Try with this code.

DATA ITAB TYPE STANDARD TABLE OF MARA WITH HEADER LINE.

DATA V_LINES TYPE I.

DESCRIBE TABLE ITAB LINES V_LINES.

WRITE 'No of records in internal table are: ', V_LINES.

Check this link for DESCRIBE statement

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/descri06.htm

Thanks,

Vinay

3 REPLIES 3
Read only

Former Member
0 Likes
333

Hi,

data: line like sy-tabix.

describe table itab lines line.

Write: / 'Lines in itab:', line.

Regards, Dieter

Read only

Former Member
0 Likes
334

Hi Chaya,

Use <b>DESCRIBE</b> statement to get the no of records in an internal table.

Try with this code.

DATA ITAB TYPE STANDARD TABLE OF MARA WITH HEADER LINE.

DATA V_LINES TYPE I.

DESCRIBE TABLE ITAB LINES V_LINES.

WRITE 'No of records in internal table are: ', V_LINES.

Check this link for DESCRIBE statement

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/descri06.htm

Thanks,

Vinay

Read only

Former Member
0 Likes
333

Hi,

Use this syntax..

data: lin(4) type n.

DESCRIBE TABLE itab lines lin.

write: 'No of records in ITAB', lin.

Regards,

Vinod.