05-27-2010 11:40 AM
Hi ,
How to know how many number of records got selected .
describe table is the best method or how to use sy-tfill.
Please help me .
Thanks
Cinde
05-27-2010 11:47 AM
Hi
TFILL will also give the total number of records in internal table.
If you have more than one internal tables make use of DESCRIBE statement to get the number of records for each select querry.
Regards,
Pravin
05-27-2010 11:54 AM
Hi
TFILL will give you the total number of records in the internal table after the statment DESCRIBE TABLE, LOOP AT and READ TABLE.
If you want to find the no of records in the internal table better go for DESCRIBE TABLE.
<removed by moderator>
Thanks
Arul
Edited by: Thomas Zloch on Jul 5, 2010 1:45 PM
05-27-2010 11:58 AM
05-27-2010 12:30 PM
your_variable = lines( your_tablename ).
if lines( your_tablname ) gt 0.
etc.
05-27-2010 12:53 PM
Hi cinde,
You can go for either sy-dbcnt or describe statement. Sy-dbcnt gives the number of database lines processed. Describe statement can give you the number of lines or rows in an internal table. Youn can use any one of these statements after your select stament.
Thanks,
Jerry Jerome
05-27-2010 1:11 PM
Hi,
If you have more than one ITAB or specially some NESTED structure of ITAB don't go for TFILL.
Describe table is always preferred.
DESCRIBE TABLE it_final LINES t_cnt.
CONDENSE t_cnt.
05-27-2010 2:48 PM
Moderator message - Welcome to SCN. But please do not ask basic questions. Unfortunately, this forum is not a place to learn ABAP. I suggest that you get one of the good ABAP books that are out there and maybe join an internet forum that caters to beginners. Also, Please read and and [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers] before posting again. Locked Rob