Skip to Content
author's profile photo Former Member
Former Member

No. of records in Internal Table

Hi

I don't know how many records in my internal table? I want to how to count No. of records in my internal table at runtime?

Please tell me?

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 09, 2008 at 11:52 AM

    Hello.

    Use statement DESCRIBE TABLE itab LINES num_lines.

    num_lines should be an integer variable.

    Regards.

    Valter Oliveira.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 09, 2008 at 11:53 AM

    use this below code.

    data:count type sy-tabix.

    describe table itab lines count.

    Amit.

    Edited by: Amit on Jun 9, 2008 1:53 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 09, 2008 at 12:42 PM

    hi,

    To find out the attributes of an internal table at runtime that were not available statically, use the statement:

    DESCRIBE TABLE itab [LINES lin] [OCCURS n]

    reward is useful,

    thanks and regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 09, 2008 at 12:50 PM

    hi,

    Check out SY-TABIX to find the number of records of an internal table at runtime at a place where the internal table is getting filled ... or else code it in this way ..

    data : v_num type i.
    
    describe table itab lines v_num.
    
    write : v_num. " Has the count of records of internal table itab. 

    Regards,

    Santosh

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.