Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

selection

Former Member
0 Likes
465

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
438

Hi,

try this:

and this:

http://help.sap.com

Regards, Dieter

2 REPLIES 2
Read only

Former Member
0 Likes
439

Hi,

try this:

and this:

http://help.sap.com

Regards, Dieter

Read only

Former Member
0 Likes
438

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