‎2007 Nov 20 2:23 PM
can we write a program with out start-of-selection as well as end-of-selection.Exactly what is purpose of both the events and the difference between them.
‎2007 Nov 20 2:26 PM
‎2007 Nov 20 2:26 PM
‎2007 Nov 20 2:31 PM
hi ,
the following thread says that end of selection is optional
<b>START-OF-SELECTION</b>
This event occurs after the selection screen has been processed and before data is read using the logical database. You can use it to prepare for reading data and creating the list by, for example, setting values for internal fields and writing introductory notes on the output list.
In an executable program, any non-declarative statements that occur between the REPORT or PROGRAMstatement and the first processing block are also processed in the START-OF-SELECTION block. See also Defining Event Blocks.
The following executable program is connected to the logical database F1S.
REPORT demo_program_start_of_selectio.
NODES spfli.
...
AT SELECTION-SCREEN.
...
START-OF-SELECTION.
WRITE: / 'List of Flights' COLOR COL_HEADING,
/ 'Created by', SY-USERID, 'on', sy-datum.
ULINE.
GET spfli.
<b>END-OF-SELECTION</b>
This is the last of the events called by the runtime environment to occur. It is triggered after all of the data has been read from the logical database, and before the list processor is started. You can use the corresponding event block to process and format all data that the program has stored in sequential datasets, such as internal tables or extracts, during the various GET events.
The following executable program is connected to the logical database F1S.
REPORT demo_program_end_of_selection.
NODES spfli.
DATA: spfli_tab TYPE SORTED TABLE OF spfli
WITH UNIQUE KEY cityfrom cityto carrid connid,
spfli_line TYPE spfli.
START-OF-SELECTION.
WRITE 'Demo program for END-OF-SELECTION'.
SKIP.
GET spfli FIELDS carrid connid cityfrom cityto.
MOVE-CORRESPONDING spfli TO spfli_line.
INSERT spfli_line INTO TABLE spfli_tab.
END-OF-SELECTION.
LOOP AT spfli_tab INTO spfli_line.
WRITE: / spfli_line-cityfrom,
spfli_line-cityto,
spfli_line-carrid,
spfli_line-connid.
ENDLOOP.
This program fills a sorted table with data from the logical database in the GET spfli event
<b>Reward points if useful</b>
regards,
pavan