Application Development 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: 

Record count in report

Former Member
0 Kudos

Hi Abaper,

Can any one help me how to calculate number of record display in report.

Thanks & Regards,

Amit

7 REPLIES 7

naveen_inuganti2
Active Contributor
0 Kudos

Hi,

Just write the describe statement on output internal table.

ie.

data: lv_count(4) type n.

describe table <itab> lines lv_count.

__Naveen Inuganti

Former Member
0 Kudos

Sy-index for the output loop. Describe statment will also work

Edited by: Phanindra Annaparthi on Feb 27, 2009 8:06 AM

former_member242255
Active Contributor
0 Kudos

you can describe the internal table that you are using for output and write the no of records ..

regards,

sravan

Former Member
0 Kudos

you can use DESCRIBE statement to find no of records in the table.

Regards,

Joan

I355602
Advisor
Advisor
0 Kudos

Hi,

Use:-


data : line_count type i.

describe <itab>
lines line_count.
"line_count will hold the total number of records in internal table

Or you can also use:-


data : total type i.

END-OF-SELECTION.
  loop at <itab>.
    write : / <itab>-<field1>, <itab>-<field2>, <itab>-<field3>. "and so on
    total = total + 1.
  endloop.
  
  write : / total.  "total no of records displayed

Hope this helps you.

Regards,

Tarun

Former Member
0 Kudos

Hi,

This is very simple, you can do by 2 ways,

1.

DESCRIBE TABLE <table name> LINES <var of type i>.

or

2.Read the records into an intrenal table.

then

loop at internal tbale
var = var+1.
endloop.

write: var "this will give you total records.

Hope this will help you.

Pooja

Former Member
0 Kudos

thanks.