Professional Documents
Culture Documents
Day 4
ABAP ALV Report
Classical Report Events
Blocks, Parameters, Select Options, Radio Buttons, Check Boxes, Output File Path in Selection Screen
INITIALIZATION
ALV -> ABAP LIST VIEWER=> Sort, Filter, Summation, Download,Change order,Hide Columns
Show ALV Report Output (for Radio Button - ALV) & File Output (for Radio Button - File Output)
Classical Report is used to just display Table Data and it consist only of a single list. These are the
Simplest Reports and it is just an output of data using the WRITE statement inside the LOOP.
Blocks, Parameters, Select Options, Radio Buttons, Check Boxes, Output File Path in Selection Screen
The declarative statements PARAMETERS and SELECT-OPTIONS are used to generate a standard
selection screen (1000) with input fields. We can cross-check the same by using system-field sy-dynnr.
If you want to pre-assign some values to Selection Screen; make use of INITIALIZATION event and its
triggered only once.
The following control break statements are available with in LOOP and ENDLOOP.
AT FIRST / ENDAT
AT LAST / ENDAT
AT NEW / ENDAT
AT END OF / ENDAT
SUM
ON CHANGE OF / ENDON
• The code between AT FIRST and ENDAT is executed only during the first loop pass.
So, it is used to write the headers or some other initialization processing.
• The code between AT LAST and ENDAT is executed only during the last loop pass.
So it is used to write the totals or some report footers.
• Between AT FIRST and ENDAT the work area will not contain any data.
The default key fields are filled with asterisks(*) and the numeric fields are filled with zeros.
The ENDAT restores the contents to the values they had prior to entering the AT FIRST.
Changes to the work area within AT FIRST and ENDAT are lost. The same applies for AT LAST and ENDAT.
AT NEW and ENDAT is used to detect a change in the value of the field between the loop passes.
The field that is specified in AT NEW is called control level.
The code between AT NEW and ENDAT will be executed during the first loop pass and every time the
value of the control level changes or when
any other field left to the control level changes. Between AT NEW and ENDAT all the fields in the
work area that are right to the control level are filled with zeros and asterisks.
Similarly, the code between AT END OF and ENDAT will be executed during the last loop pass
and every time the value of the control level changes or any other field left to the control level changes.
Show ALV Report Output (for Radio Button - ALV) & File Output (for Radio Button - File Output)
ALV stands for ABAP List Viewer. ALV gives us a standard List format and user interface to all our ABAP
reports. ALV is created by a set of standard function modules provided by SAP.
ALV provides a lot of inbuilt functions to our reports and some of the functions are listed below.
• Sorting of records
• Filtering of records
• Totals and Sub-totals
• Download the report output to Excel/HTML
• Changing the order of the columns in the report
• Hide the unwanted columns from the report
The open Eclipse platform offers first-class user experience, powerful platform capabilities and a broad
and vivid eco-system.
We already have a lot of development and administrative tools in Eclipse and latest addition to the family
is ABAP Development Tools for SAP NetWeaver (also known as ABAP in ECLIPSE, or ADT). ADT has been
designed to significantly increase developer’s productivity by making use of the speed and flexibility of
SAP platform.
Benefits of Eclipse: -
❖ Code Completion
❖ Auto-Insertion
❖ Code Templates
❖ Also includes a highly Invaluable Quick Fix Feature and its highly navigable
❖ Allows you to connect to multiple ABAP systems and provides session failover thus reducing the
impact of lost connections.
❖ It accesses the objects in the SAP repository in the same way as the existing ABAP Workbench
tools.
It follows the same online Development Model as ABAP objects and you cant use the offline model.
Once we have installed Eclipse, first we need to go to ABAP perspective and then we need to add ABAP
systems as ABAP project here. ABAP project always resembles one system connection.
We can also adjust the properties of specific ADT project in Eclipse as shown below or otherwise Right
Click on ABAP project and click on Properties or select project and press Alt + Enter.
Window-> Preferences -> ABAP Development -> Editors -> Source Code Editors -> Click on See ABAP
Formatters -> Select the Project and then apply the settings.
Add a Favorite Package so that you can work on particular packages on a regular basis and also how to
remove it.
How to identify that as Editor has unsaved changes by checking on asterisk (*).
Quick Access with Ctrl + Shift + A for opening any ABAP development object.
What are the two declarative statements which declare Selection Screen objects?
• PARAMETER
• SELECT-OPTIONS
• SELECTION-SCREEN
Which event is triggered exactly once and is used to dynamically pre-assign the values to the Selection
Screen?
• INITIALIZATION
• AT SLECTION SCREN-OUTPUT
• AT SELECTION SCREEN
• START-OF-SELECTION
What is the Standard Selection Screen number and what is the system-field to check the same?
What are the commonly used FM’s related to ALV reports that we use on a day-to-day basis? Choose 3
correct ones.
• REUSE_ALV_LIST_DISPLAY
• REUSE_ALV_GRID_DISPLAY
• REUSE_ALV_VARIANT_F4
• REUSE_ALV_FIELDCATALOG_MERGE
Which function displays the data for the selected row of an ALV grid in a model Dialog Box?
• Search
• Details
• Set Filter
Exercises: -
➢ When we use the Print Preview Function in an ALV report i.e. through Ctrl+Shift+F10 the output
appears similar to that of which inbuilt FM of ALV report if we use the common FM as
REUSE_ALV_GRID_DISPLAY for displaying the output?