Application Development 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: 

diff bt initialization and srt of sel

Former Member
0 Kudos

hai too all,

can u clearly tel me the difference between initialization and star-of-selection .

with some easy example

thank u in advance

8 REPLIES 8

Former Member
0 Kudos

hi,

intialization will trigger the selection screen display. it is used for initialzing the seelction screen input fields.

start of selection: will trigger after the selection screen has been processed and before the data retrieval from the database.

regards,

madhu

Former Member
0 Kudos

initialization.

this is the place you initialize values that has to be displayed on screen if you execute the program ( if it has selection-screen).

start-of-selection. this is the place where you start all coding like.

write : all select statements & processing.

regds,

kiran

anversha_s
Active Contributor
0 Kudos

hi,

First event -

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 : before leaving the selection screen.

start-of-selection : the first event for displaying the report.

Rgds

Anver

Former Member
0 Kudos

Initialization: event is used to initialize the declared variables in the program,

In start-of-selection event we manipulate the data as per requirements.

Ex:

data: a type i, b(10) type c.

initialization.

a = 100.

b = 'initialization'.

start-of-selection.

if a < 50.

-


-


else.

---

-


endif.

CHeers.

Former Member
0 Kudos

HI,

In INITIALIZATION, the selection-screen can be supplied with default values.

In START-OF-SELECTION, Processing starts.

Hope this helps.

Reward if helpful.

Regards,

Sipra

Former Member
0 Kudos

hi,

the sequence for execution of events is as follows,

LOAD-OF-PROGRAM.

INITIALIZATION.

AT SELECTION-SCREEN.

START-OF-SELECTION.

TOP-OF-PAGE.

END-OF-PAGE.

END-OF-SELECTION.

both LOAD-OF-PROGRAM AND INITIALIZATION are used to initialize the global variables with initial data.

The next event to be trigered is AT SELECTION-SCREEN which will be trigered when the user has interacted with the selection-screen i.e., after giving input to selection screen, usually input validation and authorization check are carried out in the AT SELECTION-SCREEN event.

The START-OF-SELECTION event is normally used to generate the list i.e., it has the selection querry based on the input from the selection-screen as well as the output formating to generate the list.

START-OF-SELECTION IS THE DEFAULT EVENT IN ABAP PROGRAM, IF YOU DONT SPECIFY ANY EVENT IN AN ABAP PROGRAM THE ABAP RUNTIME DEFAULTY ADD START-OF-SELECTION EVENT TO YOUR PROGRAM AT RUN TIME.

Former Member
0 Kudos

INITIALIZATION.

<b>Effect</b>

Processing event.

Executed before the selection screen is displayed.

The parameters (PARAMETERS ) and selection criteria (SELECT-OPTIONS ) defined in the program already contain default values (if specified). You can assign different values here and also change the database-specific selections.

In contrast to R/2 , this event is also executed during background processing

START-OF-SELECTION.

<b>Effect</b>

This is an event key word.

Before the first logical database table access, it introduces any initial processing to be executed prior to the block specified under the next event key word

Note

The REPORT statement automatically starts the START-OF-SELECTION processing. Any processing between the REPORT statement and the subsequent event key word is executed at START-OF-SELECTION .

Immediately after, the processing block introduced by an explicit START-OF-SELECTION is executed.

Regards,

U. Uma

Former Member
0 Kudos

INITIALIZATION:

When you start a program in which a selection screen is defined (either in the program itself or in the linked logical database program), the system normally processes this selection screen first. If you want to execute a processing block before the selection screen is processed, you can assign it to the event keyword INITIALIZATION.

START-OF-SELECTION :

The event START-OF-SELECTION gives you the possibility of creating a processing block after processing the selection screen and before accessing database tables using a logical database. You can use this processing block, for example, to set the values of internal fields or to write informational statements onto the output screen.

At the START-OF-SELECTION event, also all statements are processed that are not attached to an event keyword except those that are written behind a FORM-ENDFORM block