You are on page 1of 18

Classical Reports

Classical Reports

Reports which are properly formatted


(header, footer, page numbers etc.,) with the
help of one or more external events like
top-of-page,end-of-page etc., are called as
CLASSICAL REPORTS.
Standard List
• Standard list.
Output of Report program is nothing but
Standard list. It consists of one continuous
page of 60,000 lines.
To restrict number of lines per page.

Report Zxxxxx line-count 25.


OR
Report Zxxxxx line-count 25(3).
( In this case 3 lines are reserved for footer)
To restrict Output width.

Report Zxxxx line-size 125.


To suppress standard page heading.

Report Zxxxx no standard page heading.


Above all at a time:

Report Zxxxx line-count 25(3)


line-size 125 no standard page heading.
Events in Classical Reports
• Initialization.
• At selection-screen. Screen
• At selection-screen on <field>. Events
• Start-of-selection.
• Top-of-page.
• End-of-page. List Events
• End-of-selection.
Initialization.
We can initialize the selection-screen with
calculated default values under this event.
Initialization.
s_date-high = sy-datum.
s_date-low = sy-datum - 15.
Append s_date.
At selection-screen.
We can validate all the inputs on selection
screen fields under this event.
At selection-screen.
If s_carrid-low is initial or s_connid-low is
initial or s_date is initial.
< ... code for validation... >.
Endif.
At selection-screen on <field>.
We can validate a particular field input on
selection screen under this event.
At selection-screen on s_carrid.
If s_carrid-low < > ‘LH’.
<… code for validation…>
Endif.
Start-of-selection.
By default the program is under this event.
Then why we require this event?
Start-of-selection contd.
If any of the other event comes before
‘Select…Endselect.’ statements, then to break
that event, we require this S-O-S event.
Start-of-selection.
Select * from ……
…………
Endselect.
Top-of-page.

If we need some portion of the output (like


column headings) to appear in all the pages,
then we use this event.
Top-of-page.
Write:/ ‘Carrier’,10 ‘Connection’ 20 ‘Date’.
Top-of-page contd.

If there is no external output statement before


‘Top-of-page’ event, then this event will not
work.
End-of-page.
Once the cursor reaches the last line of the
page, automatically this event will be triggered.
Report Zxxx line-count 25(3).
In this case line numbers 23, 24 and 25 are
reserved for footer.
Once the cursor reaches 23rd line, this event
will be triggered.
End-of-page contd.
End-of-page.
Write:/ sy-uline(75).
Write:/ ‘This is end of page:’,sy-pagno.
Write:/ sy-uline(75).
End-of-selection.
This event is used for concluding part of
List.

End-of-selection.
Write:/ ‘This is end of the Report’.

You might also like