A report is a presentation of data in an organized structure. Many database management systems include a report writer that enables you to design and generate reports. SAP applications support report creation.
Normal Reports (not advanced)
A. Classical Reports - A classical report is nothing but is something which will display entire data in the form of rows and columns in a single output screen.
Events in Classical reports—>
INITIALISATION - Triggered before displaying the selection screen.
AT SELECTION-SCREEN - Triggered after processing of the user input on the selection screen. This event verifies the user input prior to the execution of a program. After processing the user input, the selection screen remains in the active mode.
START-OF-SELECTION - Triggered only after the processing of the selection screen is over; that is, when the user clicks the Execute icon on the selection screen. We should always write “GET FUNCTIONALITY” related code in this event only.
END-OF-SELECTION - Triggered after the last statement in the START-OF-SELECTON event is executed. We should always write “DISPLAY FUNCTIONALITY” related code in this event only.
TOP-OF-PAGE - Triggered by the first WRITE statement to display the data on a new page. Used to display the heading.
END-OF-PAGE - Triggered to display the text at the end of a page in a report. Note, that this event is the last event while creating a report, and should be combined with the LINE-COUNT clause of the REPORT statement.
CODING SCREEN —>
SELECTION SCREEN WITHOUT INITIALIZATION EVENT->
SELECTION SCREEN WITH INITIALIZATION EVENT->
After execution click on the circled button to get the output screen
OUTPUT SCREEN—>
B. Interactive Reports—> An interactive report is nothing but is something which will display specific data in the form of rows and columns in a multiple output screen
Events in Interactive Reports—>
AT-LINE-SELECTION - This statement defines an event block whose event is raised by the ABAP runtime environment when a screen list is displayed. This is provided the screen cursor is a list line and a function is selected using the function code PICK. By defining this event block, the standard list status is enhanced automatically in such a way that the function code F2 and, with it, the double-click mouse function is associated with the function code PICK.
HIDE <f>.—>
This statement places the contents of the variable <f> for the current output line (system field SYLINNO) into the HIDE area. The variable <f> must not necessarily appear on the current line.
To make your program more readable, always place the HIDE statement directly after the output statement for the variable <f> or after the last output statement for the current line.
As soon as the user selects a line for which you stored HIDE fields, the system fills the variables in the program with the values stored. A line can be selected
· by an interactive event.
For each interactive event, the HIDE fields of the line on which the cursor is positioned during the event are filled with the stored values.
· by the READ LINE statement.
You can think of the HIDE area as a table, in which the system stores the names and values of all HIDE fields for each list and line number. As soon as they are needed, the system reads the values from the table. The example below presents some of the essential features of interactive reporting. The basic list contains summarized information. By means of the HIDE technique, each detail list contains more details.
CODING SCREEN—>
OUTPUT SCREENS—>
SELECTION SCREEN
2. AFTER CLICKING ON CIRCLED BUTTON
3. DOUBLE CLICKING ON RECORDS
WHEN RECORD IS PRESENT
WHEN RECORD IS NOT PRESENT
VIDEO TUTORIAL FOR BETTER UNDERSTANDING OF OUTPUT-->
Steps to create GUI elements in Reports—>
1. Write keyword ‘SET PF-STATUS ‘ZSTATUS_NAME’’.
2. Double click on ZSTATUS_NAME and click on yes.
3. Give short description.
4. Then on the Menu screen drop down Application Toolbars and write the function code for the icon you want to create. (In this case we are creating icon for SELECT ALL.
5. Double click on function code and fill the check boxes.
6. Click on the circled button and select the desired functionality icon.
7. Select function key for the functionality and click on enter. GUI icon is successfully created. Save, check and activate the element.
VIDEO TUTORIAL FOR BETTER UNDERSTANDING-->
CODING SCREEN—>
OUTPUT—>
1. SELECTION SCREEN.
2. AFTER CLICKING CIRCLED BUTTON OF ABOVE IMAGE.
3. AFTER CLICKING SELECT ALL ICON.
4. AFTER CLICKING DESELECT ALL ICON.
OUTPUT SCREEN RECORDING-->
STEPS TO DOWNLOAD THE DATA—>
1. Call ‘GUI_DOWNLOAD’ function module.
2. Enter the path of the location where the data has to saved. To find location press shift + right click on any file at that location and change the file name in the path. And write the name of internal table In DATA TAB field.
3. Execute the code and click on DOWNLOAD GUI element and you will see the file is saved at the location entered.
JOINS
Joins are used to combine the multiple fields of the multiple tables and display all these information on a single output screen.
Types of Joins—>
Inner joins
Outer joins (used in ABAP on HANA)
CODING SCREEN—>
OUTPUT—>
FOR ALL ENTRIES
FOR ALL ENTRIES is also used to combine data of more than one tables. It has faster performance than Joins as the condition is checked only once in FOR ALL ENTRIES.
CODING SCREEN—>
OUTPUT SCREENS WHEN DATA IS FOUND—>
OUTPUT SCREENS WHEN DATA IS NOT FOUND—>
ISHNOOR SINGH SETHI
We also want documentation of module pool and smart form. Because ur content is so good. Keep it up.