12-20-2007 9:49 AM
hi,
can someone explain me clearly about the events in the report programming along with some material.
thanks,
srikanth.
12-20-2007 5:37 PM
Event related to reports are not triggered based on any statements in ABAP.
The event are triggered depended on the way the output is generated .
for eg:
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 / <field> : before leaving the selection screen.
start-of-selection : the first event for displaying the report.
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.
interactive report events.
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.
Regards,
Maha
12-20-2007 9:53 AM
Hi Srikanth Welcome To SDN:
Hi,
Events in Classical Reports:
Initialization.
At selection-screen.
At selection-screen on <field>.
Start-of-selection.
Top-of-page.
End-of-page.
End-of-selection.
Initialization.
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.
At selection-screen.
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.
At selection-screen on <field>.
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.
Start-of-selection.
By default the program is under this event.
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.
Top-of-page.
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.
End-of-page.
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).
End-of-selection.
This event is used for concluding part of List.
End-of-selection.
Write:/ This is end of the Report.
Additional events in interactive reports:
The following additional events are applicable to secondary lists.
Top-of-page during line-selection.
At line-selection.
At user-command.
Kindly Reward Points If You Find The Reply Helpful.
Cheers,
Chaitanya.
12-20-2007 10:46 AM
Hi chaitanya,
can you please explain about the additional events listed down at the bottom.i have a scenario to work on that.
thanks in advance,
srikanth.
12-20-2007 10:51 AM
Hi Srikanth,
have a look at demo programs
DEMO_LIST_INTERACTIVE_1
DEMO_LIST_INTERACTIVE_2
DEMO_LIST_INTERACTIVE_3
DEMO_LIST_INTERACTIVE_4
Hope this helps.
Thanks
Lakshman
12-20-2007 11:12 AM
Hi Srikanth,
What are the uses of interactive reporting?
The user can actively control data retrieval and display during the session. Instead of an extensive and detailed list, you create a basic list with condensed information from which the user can switch to detailed displays by positioning the cursor and entering commands. The detailed information appears in secondary lists.
What are the event key words in interactive reporting?
Event Keyword Event
AT LINE-SELECTION :
Moment at which the user selects a line by double clicking on it or by positioning the cursor on it and pressing F2.
AT USER-COMMAND: Moment at which the user presses a function key.
TOP-OF-PAGE DURING : Moment during list processing of a
AT LINE-SELECTION: secondary list at which a new page starts.
What is secondary list?
It allows you to enhance the information presented in the basic list. The user can, for example, select a line of the basic list for which he wants to see more detailed information. You display these details on a secondary list. Secondary lists may either overlay the basic list completely or you can display them in an extra window on the screen. The secondary lists can themselves be interactive again.
How to select valid lines for secondary list?
To prevent the user from selecting invalid lines, ABAP/4 offers several possibilities. At the end of the processing block END-OF-SELECTION, delete the contents of one or more fields you previously stored for valid lines using the HIDE statement. At the event AT LINE-SELECTION, check whether the work area is initial or whether the HIDE statement stored field contents there. After processing the secondary list, clear the work area again. This prevents the user from trying to create further secondary lists from the secondary list displayed.
Kindly Reward Points If You Find The Reply Helpful.
Cheers,
Chaitanya.
12-20-2007 5:37 PM
Event related to reports are not triggered based on any statements in ABAP.
The event are triggered depended on the way the output is generated .
for eg:
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 / <field> : before leaving the selection screen.
start-of-selection : the first event for displaying the report.
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.
interactive report events.
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.
Regards,
Maha