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

Re: classical report

Former Member
0 Likes
935

Hi All,

I am having 10 pages in classical report ,the problem is i am displaying top-of-page in all the pages,

but i cant able to display end of page(footer) in the last page,please give the reply.

regards,

Sashi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
867

hi

first define line-length in report heading or try with reserve keyword

regards

anandkumar

7 REPLIES 7
Read only

Former Member
0 Likes
868

hi

first define line-length in report heading or try with reserve keyword

regards

anandkumar

Read only

Former Member
0 Likes
867

Hi sashi kanth,

Let say we need 40 lines in our report.

What is Your Line-count in Your Report?

report ZMMR108 no standard page heading line-size 255 line-count 36.

When you trigger what is your line count for new page.

new-page line-size 255 line-count 36.

Where remaining 4 lines are reserved for Footer.

Regards,

Suneel G

Read only

venkat_o
Active Contributor
0 Likes
867

Hi Sashi Kanth, You need to define Line-count and howmany lines for footer.

REPORT ztest_notepad LINE-COUNT 34(3).

TOP-OF-PAGE.

  WRITE 'Top_of_page'.

END-OF-PAGE.
  WRITE 'end_of_page'.

START-OF-SELECTION.
  DO 30 TIMES.
    WRITE:/ 'Line-',sy-index.
  ENDDO.
Thanks Venkat.O

Read only

Former Member
0 Likes
867

Hi

The end of page event will trigger only when your report list reaches the end of page maintained in the line count. In the last page you might not be getting the full page list and hence end of page event is not getting triggered.

To do so, u need to get the number of lines in the last page and then play with end of page event using write statement.

I am sure u will find other related posts here in SDN.

Thanks

Sourav

Read only

Former Member
0 Likes
867

Hi,

the end-of-page event is not coming as the list on the last page is not reaching till the bottom. to explicitely reach to that you need to write blank spaces till you reach the end-of-page event.

i.e

1) loop-endloop that is writing the normal list data.

2) After the endloop (i.e where the list writing is done) mark a global flag to mention that regular list writing is done

3) write a do-endo which would write blank spaces (this would take you to end-of-page event at a time)

4) in your end-of-page event, check if flag is set, if yes -> stop further processing

Or its recommended to not write top-of-page and end-of-page event and handle it manually by routines and line-count.

Regards,

Nirmal

Read only

Former Member
0 Likes
867

hi,

For footer details we have to define it with LINE-COUNT page_lines[(footer_lines)]

like this REPORT z_myreport LINE-COUNT 65(8) LINE-SIZE 132.

please check this link to see END-OF-PAGE event

thanks

Read only

Former Member
0 Likes
867

hi sashi,

Try to look out this code . i think this code will help you out

REPORT zdummy.

TABLES : mara.

DATA : itab LIKE mara OCCURS 0 WITH HEADER LINE.

SELECT-OPTIONS: s_matkl FOR mara-matkl.

START-OF-SELECTION.

SELECT * FROM mara INTO TABLE itab

WHERE matkl IN s_matkl.

END-OF-SELECTION.

LOOP AT itab.

WRITE 😕 itab-matnr.

ENDLOOP.

TOP-OF-PAGE.

WRITE:/ 'This is top of page'.

END-OF-PAGE.

WRITE:/60 sy-pagno.

Regards

Saurabh Goel