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: 

ABAP Report - page count

Former Member
0 Kudos

I am writing a report that simply uses writes (not an ALV). I need to know how I can print the page number on this report; how do I know what page I am on? Also, is there a good example (SAP sample report) that I can use for tips on formatting my report?

Regards,

Davis

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Davis,

This is the system field which tells the list number.

PAGNO ---> Current List Page

CPAGE ---> Current Page Number of a List

Best regards,

raam

3 REPLIES 3

Former Member
0 Kudos

Hi Davis,

This is the system field which tells the list number.

PAGNO ---> Current List Page

CPAGE ---> Current Page Number of a List

Best regards,

raam

0 Kudos

Thanks. I just saw that as well. I wasn't sure if that would be filled during the write statement, like it is in a smartform.

Davis.

0 Kudos

Hi Davis,

All the system fields are filled during run time itself .

Please check this simple report.

REPORT  zasd123 no standard page heading line-count 20.

DATA: it_mara TYPE mara OCCURS 0 WITH HEADER LINE .

SELECT *
INTO TABLE it_mara
FROM mara.

LOOP AT it_mara.
  WRITE:/ it_mara-matnr,
          it_mara-mtart,
          it_mara-mtart,
          sy-pagno.                   " Page Number
ENDLOOP.

Best regards,

raam