01-14-2005 9:14 AM
i want to know record count for the records stored in
internal table.
do we have any system field to display record count?
01-14-2005 9:19 AM
Loop in IntTab and you get the count in sy-tabix.
or
check the keyword DESCRIBE TABLE IntTab LINES lin.
Regds, Murugesh AS
01-14-2005 9:17 AM
Hi,
Try this:
Data: count_lines type i.
describe table my_table lines count_lines.
Regards,
Arjan
01-14-2005 9:19 AM
Loop in IntTab and you get the count in sy-tabix.
or
check the keyword DESCRIBE TABLE IntTab LINES lin.
Regds, Murugesh AS
01-14-2005 9:40 AM
<b>DESCRIBE TABLE <i>itab</i> LINES <i>v_lines</i></b>
is the best way to do it. It is performancewise better.
Regards,
Achirangshu De
01-14-2005 12:04 PM
Hi,
There is also a built-in function, LINES( ) which returns number of lines in an internal table :
data: lv_no_of_lines type i,
lt_flights type table of sflight.
lv_no_of_lines = LINES( lt_flights ).
01-14-2005 2:16 PM
LINES( ) is a nice feature, however it's only available for WAS. For 46C it's not available, so you can only use DESCRIBE TABLE LINES.
Actually you can implement a class for this with DESCRIBE TABLE LINES, and use syntax ZMYCLASS=>LINES( ). Almost as cool as in WAS:-)
Peter