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

Former Member
0 Kudos

whether end of page will trigger in interactive report? if yes how and if not why?

thankyou.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Kaladhar,

END-OF-PAGE will trigger for both basic and interactive lists. END-OF-PAGE will trigger when you reach the number of lines specified by LINE-COUNT irrespective of basic list or interactive list. TOP-OF-PAGE will be different for basic list and interactive list but it is not the same for END-OF-PAGE. TOP-OF-PAGE DURING LINE SELECTION is the event for interactive lists for headings/top of page.

Eg: REPORT ZTEST

LINE-SIZE 90

LINE-COUNT 30(3)

END-OF-PAGE will trigger when you reach 28 th line in your report. 3 in 30(3) is reserved for your footer.

Thanks,

Vinay

6 REPLIES 6

Former Member
0 Kudos

Hi,

END-OF-PAGE

Syntax

END-OF-PAGE.

Effect

This statement defines an event block that is raised by the ABAP-runtime during creation of a basic list, if there is a line reservation in the addition LINE-COUNT of the initiating statement for a page footer, which was reached while writing to this page. A list output that takes place in the event block, is placed in this area. Output statements that exceed the reserved area will be ignored.

Example

This program displays a list of flights and creates a page for each connection with header line and footer line.

REPORT demo_page_header_footer NO STANDARD PAGE HEADING

LINE-COUNT 0(1).

PARAMETER p_carrid TYPE sflight-carrid.

DATA: sflight_tab TYPE TABLE OF sflight,

sflight_wa LIKE LINE OF sflight_tab.

DATA lines TYPE i.

TOP-OF-PAGE.

WRITE: / sflight_wa-carrid, sflight_wa-connid.

ULINE.

END-OF-PAGE.

ULINE.

START-OF-SELECTION.

SELECT carrid connid fldate

FROM sflight

INTO CORRESPONDING FIELDS OF TABLE sflight_tab

WHERE carrid = p_carrid

ORDER BY carrid connid.

LOOP AT sflight_tab INTO sflight_wa.

AT NEW connid.

SELECT COUNT( DISTINCT fldate )

FROM sflight

INTO lines

WHERE carrid = sflight_wa-carrid AND

connid = sflight_wa-connid.

lines = lines + 3.

NEW-PAGE LINE-COUNT lines.

ENDAT.

WRITE / sflight_wa-fldate.

ENDLOOP.

Regards

Former Member
0 Kudos

Hi Kaladhar,

END-OF-PAGE will trigger for both basic and interactive lists. END-OF-PAGE will trigger when you reach the number of lines specified by LINE-COUNT irrespective of basic list or interactive list. TOP-OF-PAGE will be different for basic list and interactive list but it is not the same for END-OF-PAGE. TOP-OF-PAGE DURING LINE SELECTION is the event for interactive lists for headings/top of page.

Eg: REPORT ZTEST

LINE-SIZE 90

LINE-COUNT 30(3)

END-OF-PAGE will trigger when you reach 28 th line in your report. 3 in 30(3) is reserved for your footer.

Thanks,

Vinay

Former Member
0 Kudos

Just adding to the above reply. You can check the system variable in SY-LSIND to output different values in basic list and interactive lists.

END-OF-PAGE.

IF sy-lsind = 0.

<CODE>

ELSEIF sy-lsind = 1.

<code>.

endif.

Former Member
0 Kudos

hi,

This statement defines an event block that is raised by the ABAP-runtime during creation of a basic list, if there is a line reservation in the addition LINE-COUNT of the initiating statement for a page footer, which was reached while writing to this page. A list output that takes place in the event block, is placed in this area. Output statements that exceed the reserved area will be ignored.

REPORT demo_page_header_footer NO STANDARD PAGE HEADING

LINE-COUNT 0(1).

PARAMETER p_carrid TYPE sflight-carrid.

DATA: sflight_tab TYPE TABLE OF sflight,

sflight_wa LIKE LINE OF sflight_tab.

DATA lines TYPE i.

TOP-OF-PAGE.

WRITE: / sflight_wa-carrid, sflight_wa-connid.

ULINE.

END-OF-PAGE.

ULINE.

if you having any confussion of syntex just apply F1help

Former Member
0 Kudos

kaladhar,

Before that learn the use of END-OF-PAGE event.

this is used to terminate the connection with the database.

ABAP-HR people will mostly use this.

There is nothing to trigger it manually.

statements under this will execute automatically when control reaches here.

Find some help about this event.

Effect List processing event.

The END-OF-PAGE event is executed whenever processing reaches

that area when formatting a list page or if the RESERVE

statement detects that there is insufficient space remaining

on the current page.

Note - You specify the size of the END-OF-PAGE area of list pages

in the LINE-COUNT parameter of the REPORT statement (e.g.

REPORT TEST LINE-COUNT 65(3)). If you do not define a size,

the END-OF-PAGE area contains no lines and the event

END-OF-PAGE is never executed.

- If the standard setting LINE-COUNT 0 applies (i.e. no

restriction on the number of lines per page), the event

END-OF-PAGE is not processed, since no automatic new page

follows.

- If you explicitly specify a new page with NEW-PAGE,

END-OF-PAGE is ignored.

Just define number of lines per page so that when the output reaches the that many number of lines it automatically triggeres the end-of-page.

EX:

REPORT ZTEST line-count 20.

Start-of page.

Do 30 times.

write 'Test program'.

enddo.

end-of-page.

write: 'Page no', sy-page.

Don't forget to reward if useful.....

Former Member
0 Kudos

hi

end of page is triggered in interactive report.

end-of-page : every time the list data reaches the footer region of the page.