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: 

Total number of records in a file

Former Member
0 Kudos

hi,

I am retrieving the data from bseg, bsad and kna1 into 3 different internal tables and combing that data into one final internal table after applying the filtering conditions like debit and credit indicator i am separating those records into 2 separate internal tables doing some more calculations on those like sorting, subtotals then combining all those internal table records into one final internal table and adding the trailer record also into that internal table, passing the whole internal table to a file on the application server...

so here my question in the trailer record there is one filed to calculate the total number of records in that file..... how to do that? how to get the total number of records in the file after appending the debit and credit records into one internal table or into the file...

can anyone guide me plz...

SRI

3 REPLIES 3

Former Member
0 Kudos

Hi

Use describe statement to know the number of records in an internal table (populated with data from file)

<b>DESCRIBE itab lines lf_lines.</b>

Regards

Raj

Former Member
0 Kudos

Hi,

SY-TFILL

After the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, SY-TFILL contains the

number of lines in the relevant internal table.

Regards,

Bhaskar

former_member188685
Active Contributor
0 Kudos

You can use Describe statement.

Describe table it_credit.

no of records will be in <b>sy-tfill</b> system variable

Regards

Vijay