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

objected oriented

Former Member
0 Likes
527

hi all

cud any1 please tell me why we are using

START-OF-SELECTION .

means what event this trigers

please explain it in detrail

thanks in advance

anuj

4 REPLIES 4
Read only

Former Member
0 Likes
509

HI,

<b>Syntax</b>

START-OF-SELECTION.

<b>Effect</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.

<b>Note</b>

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>Example</b>

Note the following three programs, each with the same function.

The first program contains an explicit event block START-OF-SELECTION and shows the recommended spelling.

REPORT test_start_of_selection.

DATA text TYPE string.

START-OF-SELECTION.

text = `Hello World!`.

WRITE text.

In the second program, there is an assignment before the first processing block, which is inserted in the event block START-OF-SELECTION.

REPORT test_start_of_selection.

DATA text TYPE string.

text = `Hello World!`.

START-OF-SELECTION.

WRITE text.

In the third program, there is no explicit processing block. All statements form the event block START-OF-SELECTION.

REPORT test_start_of_selection.

DATA text TYPE string.

text = `Hello World!`.

WRITE text.

Regards,

Padmam.

Read only

Former Member
0 Likes
509

hi

Start-Of-Selection

The REPORT statement always executes a START-OF-SELECTION implicitly.

Consequently all processing logic between the REPORT statement and the next event keyword is automatically processed in the START-OF-SELECTION event.

Processing block is executed after processing the selection screen

All the data is selected in this block.

All the main processing on the data except for interactive reporting is handled in this block.

regards

swati

Read only

former_member189596
Active Participant
0 Likes
509

Hi anuj,

START-OF-SELECTION :

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.

...

if useful, reward some points

regards,

bhaskar

Read only

Former Member
0 Likes
509

Hi Anuj

if u define any event before the start-of-selection event ,

to break that event we normally use start-of-selection.

suppose if u write: initialization event then if u dont write SOS event then all the statements are under init event

reward points to all helpful answers

kiran.M