‎2007 Nov 16 4:36 AM
hi gurus,
i want detailed explanation each n every event of standard report...
Regards
baskar
‎2007 Nov 16 4:48 AM
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.
These additional events are triggered when you perform some action on the basic lists.
Regards,
Ferry Lianto
‎2007 Nov 16 5:09 AM
Hi Baskar,
In interactive report having mainly,
At line-selection.
At user-command
At pf-status
Top-of-page during line selection
Here <b>At line-selection</b> is trigger when user double click the particular line,
Here using speacial Key word<b> HIDE</b> for tempraverly store the value of that clicked field.
<b>At user-command</b> is trigger when user click any button in application tool bar or menu bar menu item,
that time system store that button Function code into one system variable
<b>(SY-UCOMM).</b>
<b>Top-of-page during line selection</b> event only for secondary lists, it's trigger on top-of -page on secondary list , because normal Top-of-page does not work in secondary list.
Thanks and Regards,
Vijay
‎2007 Nov 16 7:08 AM
HI
<b>INITIALIZATION</b>
This event keyword defines an event block whose event is triggered by the ABAP runtime environment during the flow of an executable program, directly after LOAD-OF-PROGRAM and before the selection screen processing of any existing standard selection screen. This gives you the one-time opportunity to initialize the input fields of the selection screen, including those defined in the logical database linked with the program.
When an executable program defines a standard selection screen, it is called again by the ABAP runtime environment after execution, which triggers the INITIALIZATION event again. In this case, initializing parameters or selection criteria of the selection screen has no effect, because they are automatically supplied with the preceding user inputs from the selection screen during the selection screen event AT SELECTION-SCREEN OUTPUT. To explicitly initialize the selection screen for each call, you must use the event AT SELECTION-SCREEN OUTPUT.
<b>START-OF-SELECTION</b>
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.
If the program is linked to a logical database, preparations can be made here before the logical database reads data. If the program is not linked to a logical database, this event block even displays a "main program" from which procedures or screen layouts are called.
<b>GET node</b>
Use GET to handle two types of events after submitting executable programs: Get events and events at the end of a hierarchy level of a logical database. If during a GET event a list is written, previously an automatic line feed is created.
The event blocks after GET are implemented internally as procedures. Declarative statements in GET event blocks create local data.
<b>END-OF-SELECTION</b>
This statement defines an event block, whose event is raised by the ABAP-runtime environment during the calling of an executable program , if the logical database, with which the program is linked, has completely finished its work.
In this event block, all data read by the logical data base , can be processed summarically. In an executable program without logical data base, there is no need to implement the event block END-OF-SELECTION.
<b>LOAD-OF-PROGRAM</b>
This event keyword defines an event block whose event is triggered by the ABAP-runtime environment when an executable program, a module pool, a function group or a sub-routine pool is loaded in the internal session.
When calling a program through SUBMIT or through a transaction code, then, at every call, a new internal session is opened and the event block is executed once at every call. You can initialize global data objects of the program here.
At the first call of an external Procedure (sub-program or function module), the framework program of the called procedure is loaded into the internal session of the caller, thus triggering the event LOAD-OF-PROGRAM. The event block is executed before the called procedure. At any further call of a procedure of the same framework program by a caller of the same internal session, the event LOAD-OF-PROGRAM is triggered no longer.
The event LOAD-Of-PROGRAM should mainly be used to initialize global data when calling external procedures or Transactions. If you call executable programs with SUBMIT, we recommend that you use the event INITIALIZATION, as the Starting values for parameter and selection criteria are set after LOAD-OF-PROGRAM (see program flow after SUBMIT).
<b>AT SELECTION-SCREEN</b>
AT SELECTION-SCREEN selscreen_event.
This statement defines event blocks for different events selscreen_event that are triggered by the ABAP runtime environment during selection screen processing.
Selection screen events occur immediately before sending a selection screen and after certain user actions on a displayed selection screen. They assist in selection screen processing in the ABAP program.
AT SELECTION-SCREEN is triggered at least twice during actions on selection screens that are linked into another selection screen as a subscreen - first for the linked selection screen itself, and then for the linking selection screens.
The event blocks after AT SELECTION-SCREEN are implemented internally as procedures. Declarative statments in these event blocks create local data.
<b>AT SELECTION-SCREEN OUTPUT</b>
This event is triggered at the screen event PBO of a selection screen. In the event block, the selection screen can be prepared through assignments to the data objects of parameters and selection criteria and through dynamic screen modifications.
The assignments to input fields in the event block AT SELECTION-SCREEN OUTPUT always affect the selection screen and overwrite the user inputs from previous displays of the same selection screen. Assignments in the event blocks LOAD-OF-PROGRAM oder INITIALIZATION, on the other hand, only have an effect at first program start.
<b>AT SELECTION-SCREEN ON {para|selcrit}</b>
This event is triggered at the screen event PAI of a selection screen if the content of the input field of a parameter para or a line of a selection criterion selcrit was passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or an error message in the event block makes the fields para and selcrit ready for input again.
No parameter that is defined as a radio button can be specified. For this purpose, the addition ON RADIOBUTTON GROUP is provided.
If a user action takes place in the dialog box for the multiple selection of a selection criterion selcrit, the entries of the selection table are passed to the program, line by line. For each line, the event AT SELECTION-SCREEN ON selcrit is triggered.
<b>AT SELECTION-SCREEN ON END OF selcrit</b>
This event is triggered after the selection table selcrit has been fully passed to the program after a user action in the dialog box for the multiple selection has taken place. In the event block, the entire selection table can be checked.
<b>AT SELECTION-SCREEN ON BLOCK block</b>
This event is triggered at the screen event PAI of a selection screen if all the input fields of a block block of the selection screen were passed to the ABAP program. In the event block, the user inputs can be checked. Sending a warning or an error message in the event block makes all the fields of the block block ready for input again.
<b>AT SELECTION-SCREEN ON RADIOBUTTON GROUP radi</b>
This event is triggered at the screen event PAI of a selection screen if all the fields of a radio button group radi of the selection screen were passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or error message in the event block makes all the radion buttons of the block radi ready for input again.
The individual fields of a radio button group are not passed individually and do not trigger the event AT SELECTION-SCREEN ON par.
<b>AT SELECTION-SCREEN { ON { HELP-REQUEST | VALUE-REQUEST } FOR
{para|selcrit-low|selcrit-high} }</b>
The two events ON HELP-REQUEST and ON VALUE-REQUEST are triggered at the screen events POH and POV of a selection screen if - for the input field of a parameter para or one of the input fields of a selection criterion selcrit - the field help F1 or the input help F4 was called. Other selection events are not triggered.
In the event blocks, a self-defined field or input field can be programmed, which overrides any helps possibly defined in the ABAP Dictionary.
These event blocks can only be implemented for fields of the selection screen that are defined in the same ABAP program and not in a possibly linked logical database.
With the events for the field and input help, no data is transported between the selection screen and the ABAP program. As with general screens, suitable function modules must be used for these. The parameters and selection criteria changed for the input help are transported to the selection screen.
<b>AT LINE-SELECTION</b>
This statement defines an event block whose event is triggered by the ABAP runtime environment during the display of a screen list - provided the scren cursor is on a list line and you select a function using the function code PICK. Through the definition of this event block, the standard list status is automatically enhanced in such a way that the function code F2 and, with it, the double-click mouse function is linked up to the function code PICK.
If the function key F2 is linked with a function code different than PICK, each double click will trigger its even, usually AT USER-COMMAND, and not AT LINE-SELECTION.
<b>AT USER-COMMAND</b>
This statement defines an event block whose event is triggered by the ABAP runtime environment if, during the display of a screen list, a function with a self-defined function code was chosen.
Self-defined function codes are all those that include character combinations, except for the following:
The function codes PICK and PF## ("##" stands for 01 to 24) do not cause the event AT USER-COMMAND, but the events AT LINE-SELECTION and AT PF##.
All function codes that start with the character "%" are interpreted as system functions and do not cause the event AT USER-COMMAND. The system functions for lists are listed in the following table 1.
The function codes in the following table 2, likewise, do not cause the event AT USER-COMMAND, but are handled by the list processor.
<b>AT PF##</b>
This statemet defines an event block whose event is triggered by the ABAP runtime environment during list display - provided the screen cursor is on a list line and a function is selected using the function code PF##. Here ## stands for a number between 01 and 24. In the= standard list status, these function codes are assigned to the function keys of the input device.
Instead of AT PF## , AT USER-COMMAND should always be used and special function codes should be assigned to the required function keys.
<b>TOP-OF-PAGE</b>
Effect
This statement defines an event block whose event is triggered by the ABAP runtime environment during the creation of a list. This occurs when a new page is started - that is, immediately before the first line in a new page is to be output. All list outputs that take place in the event block are placed below the standard page header of the list. You cannot output more lines than are available in the page within the event block. The NEW-PAGE statement is ignored within this event block.
The entire output written to the list in the event block belongs to the page header of the current list page. The top page header cannot be moved when you scroll vertically in a list displayed on the screen.
<b>TOP-OF-PAGE DURING LINE-SELECTION</b>
If you do not use an addition, an event block is triggered for event TOP-OF-PAGE during the creation of a basic list. If you use the addition DURING LINE-SELECTION, an event block is triggered for the corresponding events during the creation of details lists. You have to use system fields like sy-lsind to distinguish between the individual details lists.
<b>END-OF-PAGE</b>
This statement defines an event block that is raised by the ABAP-runtime during creation of a basic list, if there is a line reservation in the addition LINE-COUNT of the initiating statement for a page footer, which was reached while writing to this page. A list output that takes place in the event block, is placed in this area. Output statements that exceed the reserved area will be ignored.
<b>Reward if usefull</b>
‎2020 Dec 19 11:56 AM
Hi,
1. At Line Selection.
This event will trigger whenever the user double clicks on any list line. This is used to generate a secondary list. whenever user double clicks on any value.
2. At User Command.
This event will trigger whenever user clicks on any custom buttons of the GUI. To perform the user actions on the screen.
3. At PF Status.
This event will trigger whenever user clicks on any function buttons.
4. Top of Page during Line Selection.
This is used to print heading for secondary lists in interactive reports.
5. Set Pf.
To add GUI status.
Regards,
Nasreen