SAP ABAP Classical Reports
SAP ABAP Classical Reports
Contributed by
Sana Shaikh
Under the guidance of TagSkills
SAP ABAP Classical Reports are the most basic report that contain both
selection screen and an output screen. Classical reports are executed based on
events, and not executed on a line-by-line basis. Classical reports are non-
interactive reports. Basically, they consist of one program that creates a single
list.
The following SAP training tutorials guides various events in classical reports,
provide the syntax for each and then present a simple programming example of
a Classical Report.
Events in Classical Reports.
The following are the list of Events in Classical Reports.
1. Load-of-program: The Load-of-program event loads the program into
memory for execution. Always, Load-of-program is the first event in execution
sequence.
2. Initialization: Initialization is an event that is used for initialize variables,
screen values and other default actions.
3. At Selection-Screen output: One of the selection screen events is used to
manipulate dynamic selection-screen changes.
4. At Selection-Screen on field: It is used to validates the screen input
parameter.
5. At Selection-Screen on value request: This selection screen event allows
for a value help or field help for an input field.
6. At Selection-Screen on help request: This selection screen event enables
function key F1 help for a input field.
7. At Selection-Screen: Selection screen validates various input fields.
Output:
Here we have created a custom structure of the internal table named it_mara. This
structure ty_mara contains Material No, Creation Date, Name, Material Type and
Group. Hence output will have only these fields. We have declared an work area
wa_mara for internal table. Here the internal table is of standard table type.
Now under INITIALIZATION event we have initialized the Program name, date
and user name which are to be displayed at the Top of page. TOP OF PAGE is
another event where we are declaring the select option s_matnr in a selection
screen for input of material no.
Now we want to display the name of the fields heading at the beginning. To do
this we call control break statement at first & endat inside the loop. At first
statement will be triggered at the first time of the loop. Similarly when the listing
will be completed then At Last - endat statement will be triggered to display
ending of report message.
Next we raise the event TOP-OF-PAGE which is used to display the top message.
On the top we can write program name, user name, date etc.