Skip to Content
author's profile photo
Former Member

RECORD COUNT on a report

I am verynew to ABAP so please help me...

I have written a report and now need the write the number of records in structure bank_format_check.

What is the syntax please...

thanks

Brian

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 01:29 PM

    Hi

    let your final data is in internal table ITAB

    declare a variable

    data: v_lines type I.

    Describe table ITAB lines v_lines.

    write : / v_lines.

    Regards

    Anji

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Brian,

      You can use the following sample code to write the numbe of records:

      • Internal table

      DATA : BEGIN OF itab OCCURS 0,

      a TYPE i,

      b TYPE i,

      END OF itab.

      • Var to hold the number of records

      DATA : w_lines TYPE i.

      DO 20 TIMES.

      itab-a = sy-index.

      itab-b = sy-index * 2 .

      APPEND itab.

      CLEAR itab.

      ENDDO.

      DESCRIBE TABLE itab LINES w_lines.

      LOOP AT itab.

      WRITE : / itab-a,

      itab-b.

      ENDLOOP.

      WRITE : / 'The number of records are :', w_lines.

      Hope this helps you.Please let me know if any doubts.

      Regards,

      Durga.