Sie sind auf Seite 1von 4

ABAP Classical Reports Tutorial with Programming Example SAP Trai...

1 of 4

http://www.saponlinetutorials.com/abap-classical-reports-tutorial-progr...

Home
SAP
SAP CRM
Security
SAP PS
SAP ABAP
SAP PP
SAP HCM
SAP FICO
SAP SD
SAP MM

ABAP Classical Reports Tutorial with


Programming Example
SAP ABAP Classical Reports
SAP ABAP Classical Reports are the most basic ABAP
reports 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/21/2015 5:34 PM

ABAP Classical Reports Tutorial with Programming Example SAP Trai...

2 of 4

http://www.saponlinetutorials.com/abap-classical-reports-tutorial-progr...

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.
8. Start-of-Selection
Ads by Google

Sap ABAP Programming


Sap Basis
Sap Tutorial
This is the default event in any ABAP program and is activated whether we use it explicitly or not .
9. End-of-Selection
This event signals that event of what has been initiated by the start-of-selection event.
10. Top-of-Page
This event is used to print the same heading for all pages.
11. End-of-Page
This event is used to print the same footer for all pages.

The below simple programming example shows how an typical Classical Report is written:

REPORT ZSIMPLE_DBPRG.
TABLES MARA.
DATA : WA_MARA LIKE MARA.
START-OF-SELECTION.
**FIRST MARA IS DATABASE TABLE SECOND MARA IS DEFAULT STRUCTURE
*SELECT SINGLE * FROM MARA INTO MARA.

5/21/2015 5:34 PM

ABAP Classical Reports Tutorial with Programming Example SAP Trai...

3 of 4

http://www.saponlinetutorials.com/abap-classical-reports-tutorial-progr...

* SELECT SINGLE * FROM MARA INTO MARA WHERE matnr EQ 000000000000000023.


SELECT SINGLE * FROM MARA INTO MARA WHERE matnr EQ 000000000000000023.
IF SY-SUBRC EQ 0.
WRITE :/10 SELECT SUCCESSFUL.
move-CORRESPONDING mara to wa_mara.
ELSE.
WRITE :/10 SELECT NOT SUCCESSFUL.
ENDIF.
END-OF-SELECTION.
if WA_mara is not INITIAL.
WRITE /10 : WA_MARA-MATNR, MATERIAL NUMBER
WA_MARA-MTART, MATERIAL TYPE
WA_MARA-MBRSH, INDUSTRY SECTOR
WA_MARA-MATKL. MATERIAL ID
else.
write :/10 wa_mara is empty.
endif.
Download Free Training materials
Ads by Google

Online Sap Training


How to Learn Sap
Sap Reports
Next post: SAP OSS Notes

Ads by Google

Sap CRM
Sap Program
Sap Data Consultant Jobs

Previous post: How to create SmartForms in SAP

Recent Posts

5/21/2015 5:34 PM

ABAP Classical Reports Tutorial with Programming Example SAP Trai...

4 of 4

http://www.saponlinetutorials.com/abap-classical-reports-tutorial-progr...

What is SAP Software? Definition of SAP ERP Software


Functional Areas in SAP
Configure New Business Areas in SAP SAP Online Tutorials
Assign Company Code to Company in SAP
Adarsh Kumar
523

5/21/2015 5:34 PM

Das könnte Ihnen auch gefallen