ABAP Keyword Documentation → ABAP - Reference → User Dialogs → Classic Lists → Event Blocks for Lists
END-OF-PAGE
Other versions: 7.31 | 7.40 | 7.54
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).
TYPES: BEGIN OF sflight_tab_type,
carrid TYPE sflight-carrid,
connid TYPE sflight-connid,
fldate TYPE sflight-fldate,
END OF sflight_tab_type.
PARAMETER p_carrid TYPE sflight-carrid.
DATA: sflight_tab TYPE TABLE OF sflight_tab_type,
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.