02-27-2009 7:05 AM
Hi Abaper,
Can any one help me how to calculate number of record display in report.
Thanks & Regards,
Amit
02-27-2009 7:05 AM
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
02-27-2009 7:06 AM
Sy-index for the output loop. Describe statment will also work
Edited by: Phanindra Annaparthi on Feb 27, 2009 8:06 AM
02-27-2009 7:06 AM
you can describe the internal table that you are using for output and write the no of records ..
regards,
sravan
02-27-2009 7:08 AM
you can use DESCRIBE statement to find no of records in the table.
Regards,
Joan
02-27-2009 7:20 AM
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
02-27-2009 11:35 AM
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
03-09-2009 12:08 PM