2008 Mar 11 2:14 PM
Hi,
what re the equalent events in ALV? which we have in general reports?
and steps to write an ALV report?
Top-of-page =
end-of-page =
..
..
Thanks in advance,
sudharsan.
Hi,
what re the equalent events in ALV? which we have in general reports?
and steps to write an ALV report?
Top-of-page =
end-of-page =
..
..
Thanks in advance,
sudharsan.
2008 Mar 11 2:20 PM
hi ,
*the alv is a functionality provided within abap which can enchance reports in r/3 system.
(or) simple way to display the reports in orderly manner.
*it is a in built function.
*alv is a set of functional module which are added to the abap program code.
advantages:
*saves time that is spent in enchancing reports.
*provides uniform user interface
1.header of the column.
2.colors which correspond to indented 'key' info.
steps in alv:
1.declare data areas for list viewer(type-pools:slis)
2.declare internal table to store selected data.
3.select data into int table.
4.build fieldcatalog.
5.build sortcatlog.
6.build eventcatalog.
7.start abap list viewer (ctrl+f6)
8.call back events.
the report output can contain upto 90 columns in the display with the wide array of display options.
common alv functions used are
reuse_alv_list_display
reuse_alv_grid_display
reuse_alv_variant_default_get
reuse_alv_variant_f4
reuse_alv_commentary_write
reuse_alv_variant_existence
reuse_alv_fieldcatalog_merge
reuse_alv_popup_to_select
reuse_alv_events_get.
There are 2 type of reports. They are:
Interactive report
Classic reports
In classic reports,we can see the output in single list where as in interactive reports we can see the output in multiple list.
AnswerEdit section
In ABAP, there are a total of 7 types of reports. They are:
Classical
Interactive
Logical Database
ABAP query
ALV Reports (ALV stands for ABAP List Viewer)
Report Writer/Report Painter
Views (There are different types of views also)
Classical ReportsEdit section
These are the most simple reports. Programmers learn this one first. It is just an output of data using the Write statement inside a loop.
Classical reports are normal reports. These reports are not having any sub reports. IT IS HAVING ONLY ONE SCREEN/LIST FOR OUTPUT.
Events In Classical Reports.
INTIALIZATION: This event triggers before selection screen display.
AT-SELECTION-SCREEN: This event triggers after proccesing user input still selection screen is in active mode.
START OF SELECTION: Start of selection screen triggers after proceesing selection screen.
END-OF-SELECTION : It is for Logical Database Reporting.
Interactive ReportsEdit section
As the name suggests, the user can Interact with the report. We can have a drill down into the report data. For example, Column one of the report displays the material numbers, and the user feels that he needs some more specific data about the vendor for that material, he can HIDE that data under those material numbers.
And when the user clicks the material number, another report (actually sub report/secondary list) which displays the vendor details will be displayed.
We can have a basic list (number starts from 0) and 20 secondary lists (1 to 21).
Events associated with Interactive Reports are:
AT LINE-SELECTION
AT USER-COMMAND
AT PF<key>
TOP-OF-PAGE DURING LINE-SELECTION.
HIDE statement holds the data to be displayed in the secondary list.
sy-lisel : contains data of the selected line.
sy-lsind : contains the level of report (from 0 to 21)
Interactive Report Events:
AT LINE-SELECTION : This Event triggers when we double click a line on the list, when the event is triggered a new sublist is going to be generated. Under this event what ever the statements that are been return will be displayed on newly generated sublist.
AT PFn: For predefined function keys...
AT USER-COMMAND : It provides user functions keys.
TOP-OF-PAGE DURING LINE-SELECTION :top of page event for secondary list.
Logical Database ReportsEdit section
Logical database is another tool for ABAP reports. Using LDB we can provide extra features for ABAP reports.
While using LDB there is no need for us to declare Parameters.
Selection-screen as they will be generated automatically.
We have to use the statement NODES in ABAP report.
If there are many tables the Performance will be slow as all the table data will be read from top node to bottom node .
ABAP Query ReportsEdit section
ABAP query is another tool for ABAP. It provides efficency for ABAP reports. These reports are very accurate.
Transaction Code : SQ01
Report WriterEdit section
Key Concept :
Super users and end users can use Report Painter/Report Writer tools to write their own reports.
Giving them the ability to report on additional fields at their discretion shifts the report maintenance burden to them, saving SAP support groups time and effort normally spent creating and maintaining the reports.
Instead of using ABAP code to write a report in FI and CO, many users build a Report Painter/ Report Writer library using transaction MC27.
However, this workaround has some drawbacks. Little known transaction GRCT solves these problems in most cases, and eliminates the need to use transaction MC27.
ABAP Report TypesEdit section
ABAP report types are those ones available in some report's attributes screen, i.e. :
Executable program
Function group (containing function modules)
Include
Interface pool
Class pool
Module pool
Subroutine pool
Also ALV means ABAP List Viewer. Most convenient way to use it is through reuse library (cf. transaction se83) available from release 4.6 of SAP R/3.
ALV is available in two modes: list and grid. List mode is good old list processing with standard functionnalities, and grid mode is using a new OCX object displaying grids.
1. SIMPLE REPORT.
The important function modules are
a. Reuse_alv_list_display
b. Reuse_alv_fieldcatalog_merge
c. Reuse_alv_events_get
d. Reuse_alv_commentary_write
e. Reuse_alv_grid_display
A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.
B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type
D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.
E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.
2. BLOCK REPORT
This looks like a simple report but this report has the features of sorting and filtering only.
The important functions used in this report are:
A. REUSE_ALV_BLOCK_LIST_INIT
B. REUSE_ALV_BLOCK_LIST_APPEND
C. REUSE_ALV_BLOCK_LIST_DISPLAY
A. REUSE_ALV_BLOCK_LIST_INIT
This function module is used to set the default gui status etc.
B. REUSE_ALV_BLOCK_LIST_APPEND
This function module adds the data to the block.
C. REUSE_ALV_BLOCK_LIST_DISPLAY
This function module display the list with data appended by the above function.
Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.
3. Hierarchical reports :
Hierarchical sequential list output.
The function module is
A. REUSE_ALV_HIERSEQ_LIST_DISPLAY
reward points if useful,
venkat.
2008 Mar 11 2:52 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |