Application Development and Automation 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: 
Read only

RECORD COUNT on a report

Former Member
0 Likes
559

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
520

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

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

3 REPLIES 3
Read only

Former Member
0 Likes
521

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

Read only

0 Likes
520

Anji...

what code will I write to display the No. of Record (COUNT) on my report?

please help

thanks!

Read only

0 Likes
520

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.