2007 Jul 18 6:02 AM
Hello
Please tell me about events used in report in the order of their execution
and their explanation......
Regards.
Basavaraj
2007 Jul 18 6:04 AM
2007 Jul 18 6:08 AM
Hi,
Events: Initialization
at selection-screen
at selection-screen on value request.
start-of-selection
top-of-page
end-of-page
at user-command
at line-selection
Order:
1. Initialization
2. at selection-screen
3. at selection-screen on value request
4. start of selection.
when WRITE statement is triggered
top-of page.
end-of-page.
end-of selection.
at user-command.
at line-selection
Go through the following
This is the order of execution in Classical/Interactive Report Events
Classical Reports
Reports which are properly formatted (header, footer, page numbers etc.,) with the help of one or more external events like top-of-page,end-of-page etc., are called as CLASSICAL REPORTS.
Standard list.
Output of Report program is nothing but Standard list. It consists of one continuous page of 60,000 lines.
To restrict number of lines per page.
Report Zxxxxx line-count 25.
OR
Report Zxxxxx line-count 25(3).
( In this case 3 lines are reserved for footer)
To restrict Output width.
Report Zxxxx line-size 125.
To suppress standard page heading.
Report Zxxxx no standard page heading
Above all at a time:
Report Zxxxx line-count 25(3)
line-size 125
no standard page heading.
Screen Events List Events
Initialization. Start-of-selection
At selection-screen. Top-of-page.
At selection-screen on <field>. End-of-page.
End-of-selection.
We can initialize the selection-screen with calculated default values under this event.
Initialization.
s_date-high = sy-datum.
s_date-low = sy-datum - 15.
Append s_date.
We can validate all the inputs on selection screen fields under this event.
At selection-screen.
If s_carrid-low is initial or
s_connid-low is initial or
s_date is initial.
< ... code for validation... >.
Endif.
We can validate a particular field input on selection screen under this event.
At selection-screen on s_carrid.
If s_carrid-low < > LH.
< code for validation >
Endif.
If any of the other event comes before
Select Endselect. statements, then to break
that event, we require this S-O-S event.
Start-of-selection.
Select * from
Endselect.
If we need some portion of the output (like
column headings) to appear in all the pages,
then we use this event.
Top-of-page.
Write:/ Carrier,10 Connection 20 Date.
If there is no external output statement before
Top-of-page event, then this event will not
work.
Once the cursor reaches the last line of the
page, automatically this event will be triggered.
Report Zxxx line-count 25(3).
In this case line numbers 23, 24 and 25 are
reserved for footer.
Once the cursor reaches 23rd line, this event
will be triggered.
End-of-page.
Write:/ sy-uline(75).
Write:/ This is end of page:,sy-pagno.
Write:/ sy-uline(75).
This event is used for concluding part of List.
End-of-selection.
Write:/ This is end of the Report.
Interactive Report
A simple report or even a classical report displays a clustered list with all the requested output at one go.
What ever it is displayed, it is final. That means, the user can not interact with with that list.
A simple report or even a classical report displays a clustered list with all the requested output at one go.
What ever it is displayed, it is final. That means, the user can not interact with with that list.
In the interactive reports, we can create as many as 21 lists.
The first list is called Basic list and all the successive lists are called Secondary lists. Each list is again an interactive.
The Basic list is not deleted when secondary list is created.
A secondary list may either overlay the basic list or appear in an additional dialog window on the same screen.
The system variable associated with list number is SY-LSIND.
For basic list SY-LSIND = 0 and for secondary lists, SY-LSIND varies from 1 to 20.
User can interact with the list by the following ways.
Double clicking or single click and pressing F2 (function key) or single click with hotspot on.
OR
Selecting from menu bar or from application tool bar.
All the events used in classical reports can be used in Basic List.
The event End-of-page can be used in Secondary Lists also.(the other six events can not be used in secondary lists)
You can not place select-options in secondary lists.
The following additional events are
applicable to secondary lists.
Top-of-page during line-selection.
At line-selection.
At user-command.
When you double click on any field in the basic list, you will be navigating to secondary list with detailed information pertaining to clicked field.
As such we need to store the clicked field information at some variable.
Hide temporarily stores the content of clicked field for later use.
The default title of the out put is the text what we enter during creation of program.
This title can be changed using:
SET TITLEBAR AAA.
GUI status includes:
Menu bar
Application tool bar and
Activating standard tool bar
GUI status can be created using
SET PF-STATUS BBB.
You can have 8 menus ( out of which, 2 menus are reserved for System and Help).
Each menu can have 15 menu items.
Each menu item can have 3 levels of submenus.
You can create 35 items in application tool bar.
Refer
http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db9a2e35c111d1829f0000e829fbfe/frameset.htm
<b>Reward points</b>
Regards
2007 Jul 18 6:17 AM
Hi Basavraj,
<b>First event -</b>Initialization : triggered when the report is loaded in memory.
At selection-screen output : triggered when the selection screen is loaded in memory before being displayed.
At selection-screen : before leaving the selection screen.
start-of-selection : the first event for displaying the report.
This event keyword defines an event block whose event is triggered by the ABAP runtime environment
when calling the executable program selection screen processing of a selection screen.
In an executable program, all statements that are not declarations,
and are listed before the first explicit processing block, are assigned to this event block.
If the program does not contain an explicitly defined event block START-OF-SELECTION,
these statements form the complete event block START-OF-SELECTION.
If a program contains an explicitly defined event block START-OF-SELECTION,
these statements are added to the beginning of the event block.
If the program contains no explicitly defined event blocks,
these statements form the entire event block START-OF-SELECTION.
end-of-selection : after the start-of-selection is completed.
classiscal report events.
top-of-page : every time a new page is started in the list.
end-of-page : every time the list data reaches the footer region of the page.
<b>interactive report events.</b>
top of page during line selection : top of page event for secondary list.
at line-selection : evey time user dbl-clicks(F2) on the list data.
at pF<key> : function key from F5 to F12 to perform interactive action on the list.
at user-command
http://help.sap.com/saphelp_47x200/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm
<b>Reward pts if found usefull :)</b>
regards
Sathish