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

record count in internal table

i want to know record count for the records stored in

internal table.

do we have any system field to display record count?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Jan 14, 2005 at 09: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2005 at 09:17 AM

    Hi,

    Try this:

    Data: count_lines type i.

    describe table my_table lines count_lines.

    Regards,

    Arjan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2005 at 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 ).

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

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.