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: 

End-of-page content does not come in Last page in my List

Former Member
0 Kudos

Hi Abapers,

I am new to ABAP.

In Classical report I need to display the End of page content after each page.

I have used the "Report Zxxxx Line-Count 30(3)."

And after that End-of-page. Write:/ 'End of this page' .

The End-of-page content come after every 27 records but doesnt come in the last page of the list.i.e at the end of all records.

How to solve this...?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Santosh,

END-OF-PAGE is triggered only if the number of lines reaches to the last line. In your case when 27 line is written then only END-OF-PAGE is triggered.

If the output in the last page not upto the 27th line then END-OF-PAGE is not triggered. So, you will not get that information on the list.

Any way if you want that information to print then

calculate the number of lines remainig and then use

w_n =  sy-linct - sy-linno.
SKIP w_n.

Then END-OF-PAGE will be triggered.

Regards ,

Rajitha.

11 REPLIES 11

Former Member
0 Kudos

Hi,

I have used the "Report Zxxxx Line-Count 30(3)."

And after that End-of-page. Write:/ 'End of this page' .

The End-of-page content come after every 27 records but doesnt come in the last page of the list.i.e at the end of all records

"Report Zxxxx Line-Count 30(3)."

The above statement Means each page of 30 lines in which the last three line i.e(Value in the bracket(3)) for end of page event.

so after every 27 th line end of page event is triggered and the write statement in this event is displayed.

The output what u are getting is correct.

Regards,

Jaya Vani

0 Kudos

Hi Jaya,

Yes I what get is right but I want the End-of-page content even at last page after all records. How to code for that ?

Regards,

Santhosh

Former Member
0 Kudos

Hi Santhosh,

End of Page is an event that triggers whenever a Page Ends. In your case As the page is not Filled It will Never Trigger. If u want to to trigger the End of Page u explicitly Skip the Number of Balnk lines. calculate number Blank lines.

SKIP w_Blank_lines Lines.

If Found Help Full Do Reward.

Regards.

Eshwar..

Former Member
0 Kudos

Hii Santosh!!

You can use

SKIP n

by writing this keyword.

END-OF-PAGE will be triggered.

Check this example.

If you find this example helpful, don't forget to award some points

REPORT zsap_LIST_EVENTS_TEST LINE-COUNT 10(2) NO STANDARD PAGE

HEADING.

PARAMETERS: p_num TYPE i DEFAULT 1 .

INITIALIZATION.

p_num = 2.

AT SELECTION-SCREEN OUTPUT.

p_num = 3.

p_num = p_num + 1.

START-OF-SELECTION.

p_num = 11.

PERFORM test.

WRITE: / p_num.

END-OF-PAGE.

ULINE.

WRITE: /'END-OF-PAGE'.

TOP-OF-PAGE.

WRITE: 'TOP-OF-PAGE'.

*&----


*& Form test

*&----


  • text

*----


  • --> p1 text

  • <-- p2 text

*----


FORM test .

WRITE: 'SUBROUTINE'.

ENDFORM. " test

END-OF-SELECTION.

p_num = 12.

DO 20 TIMES.

WRITE: / p_num,sy-index,sy-pagno,sy-linct,sy-linno.

ENDDO.

SKIP 6.

Regards

Abhijeet Kulshreshtha

Former Member
0 Kudos

Hi Santosh,

END-OF-PAGE is triggered only if the number of lines reaches to the last line. In your case when 27 line is written then only END-OF-PAGE is triggered.

If the output in the last page not upto the 27th line then END-OF-PAGE is not triggered. So, you will not get that information on the list.

Any way if you want that information to print then

calculate the number of lines remainig and then use

w_n =  sy-linct - sy-linno.
SKIP w_n.

Then END-OF-PAGE will be triggered.

Regards ,

Rajitha.

Former Member
0 Kudos

Hi Santhosh,

You have line count as 30. End-of-page triggers only if the page is filled completely. The last page is not filled and thats why you are not getting the end-of-page event triggered on last page.

Regards,

Swapna.

Edited by: NagaSwapna Thota on Jul 4, 2008 11:21 AM

0 Kudos

Hi,

i think ur page may not have 27 records. if the records are 27 are exceed 27 in ur page then only u can have end of page

Former Member
0 Kudos

hi,

As all other friends said the END-OF-PAGE triggers only when the current page in the list will come to an end. But in Your case it seems that u will not encounter the page end.

Hence you have to make the END0OF-PAGE trigger explicitly by skipping the remainig Lines.

Plz Try this Lines After ur Write Statement.

w_diff = sy-linct - sy-linno.

skip w_diff.

sy-linct holds ur line no in the page.

sy-linno holds the current line no.

You will find this will trigger End-of-page.

Hope this will Help.

Reward if helpful.

Sumit agarwal

former_member787646
Contributor
0 Kudos

Hi,

You can try the following and check.

Data: WA type <structurename>,

ITAB type standard table of <structurename>,

REC_CNT type I.

Assume that there are some records in the internal

table "ITAB".

Describe table ITAB into REC_CNT.

Now...

LOOP AT ITAB INTO WA.

.....................................

IF SY-TABIX = REC_CNT.

WRITE:/ ' End of Page.................'.

ENDIF.

ENDLOOP.

Hope it helps you.

Murthy

Former Member
0 Kudos

Hi

Yours Answers were useful and solved my probelm.

Thanks to all. Especially Abhijeet,Rajitha, Sumit. Iam closing this and rewared points to useful answers.

former_member787646
Contributor
0 Kudos

Hi,

You can try the following and check to display the message at the end of report .

Data: WA type <structurename>,

ITAB type standard table of <structurename>,

REC_CNT type I.

Assume that there are some records in the internal

table "ITAB".

Describe table ITAB into REC_CNT.

Now...

LOOP AT ITAB INTO WA.

.....................................

IF SY-TABIX = REC_CNT.

WRITE:/ ' End of Page.................'.

ENDIF.

ENDLOOP.

Hope it helps you.

Murthy