Get Example source ABAP code based on a different SAP table
ABAP_LIST - Page Layout This example demonstrates how to design the page header and footer and the page breaks in lists.
ABAP_SOURCE_CODE ABAP_EXEC >
ABAP_DESCRIPTION The addition LINE-SIZE> of the statement REPORT> sets the width of the output list of the program to 60. Furthermore, the addition LINE-COUNT> is used to set the page length to 12 and the length of the page footer to 3 (in parentheses). This program does not use the standard page header, but one that is user-defined using TOP-OF-PAGE>. The header consists of a single line. The page number is taken from the system field sy-pagno>. The page footer is also user-defined and is determined in the event END-OF-PAGE>, in the same way as the page header. Although the page footer comprises only one line, it is filled with two empty lines since three lines have been reserved for it. After subtracting the list title> and the column title>, this leaves four lines for the actual output. The program starts by creating five pages with different page headers, indicating the statement to be used for initiating the next page break on each preceding page. The list title> was defined as 'List Title' and the column title> as the 'Column Title' in the text elements. The statement RESERVE> raises the event END-OF-PAGE> and a page break since the page no longer has three more lines. Finally, the addition LINE-COUNT> of the statement NEW-PAGE> sets the page length of the following pages to 15.