‎2006 Nov 15 10:05 AM
hi all,
what is difference between initialization & at selection-screen output?
‎2006 Nov 15 10:07 AM
Sanjeev..
Initialization: Triggers before selection-screen displays. Triggers only once.
at selection-screen output: on clicking some event of selection screen it triggers.
triggers all the time user enters some thing on screen.
-Anu
‎2006 Nov 15 10:07 AM
Sanjeev..
Initialization: Triggers before selection-screen displays. Triggers only once.
at selection-screen output: on clicking some event of selection screen it triggers.
triggers all the time user enters some thing on screen.
-Anu
‎2006 Nov 15 10:09 AM
Initialization is the first event
you can also declare low and hig values in initialization..
at selection-screen output triggers when user enters something in selection screen.
‎2006 Nov 15 10:10 AM
Hi,
initialization:
only once this will be triggered,at the time of starting the program execution
at selection-screen output
whenever selection screen displayes this event will be called
INITIALIZATION events in your program, this will be fired first when running the program, before the selection screen, if there is one, is fired. If there is a selection screen, the the AT SELECTION-SCREEN OUTPUT event will be fired automatically before the screen is shown
also check this link,
Regards,
Ram
Pls reward points if helpful...
‎2006 Nov 15 10:10 AM
‎2006 Nov 15 10:10 AM
hi,
At selection screen o/pevent is executed at PBO of the selection screen every time the user presses ENTER - in contrast to INITIALIZATION . Therefore, this event is not suitable for setting selection screen default values. Also, since AT SELECTION-SCREEN OUTPUT is first executed after the variant is imported (if a variant is used) and after adopting any values specified under SUBMIT in the WITH clause, changing the report parameters or the selection options in AT SELECTION-SCREEN OUTPUT would destroy the specified values.
Here, however, you can use LOOP AT SCREEN or MODIFY SCREEN to change the input/output attributes of selection screen fields.
Example
Output all fields of the SELECT-OPTION NAME highlighted:
SELECT-OPTIONS NAME FOR SY-REPID MODIF ID XYZ.
...
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CHECK SCREEN-GROUP1 = 'XYZ'.
SCREEN-INTENSIFIED = '1'.
MODIFY SCREEN.
ENDLOOP.
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.
Example
Define the last day of the previous month as the key date:
PARAMETERS QUAL_DAY TYPE D DEFAULT SY-DATUM.
INITIALIZATION.
QUAL_DAY+6(2) = '01'.
QUAL_DAY = QUAL_DAY - 1.
Here, the default value of QUAL_DAY is the current date, e.g. 05.04.88 ( QUAL_DAY = '19880405'). Two subseqent statements set the date first to the beginning of the month, e.g. 01.04.88 ( QUAL_DAY = '19880401') and then, by subtracting one day, to the last day of the previous month, e.g. 31.03.88 ( QUAL_DAY = '19880331').
Note
In more precise terms, INITIALIZATION is executed in the following steps:
Specify default values for the selections. Execute the event INITIALIZATION. Import variant (if used to start the report). On SUBMIT , the values specified for each WHERE clause are also transferred, if necessary. Execute the event AT SELECTION-SCREEN OUTPUT , if it occurs in the report (unlike INITIALIZATION , this event is always executed for PBO of a selection screen). Display selection screen. Transport the screen fields containing user input to the report fields. Continue with START-OF-SELECTION .
regards,
keerthi
‎2006 Nov 15 10:10 AM
HI Sanjeev,
<b>INITIALIZATION</b> Point before the selection screen is displayed
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.
<b>AT SELECTION-SCREEN</b> Point after processing user
input on the selection screen while the selection screen is still active
The event keyword AT SELECTION-SCREEN provides you with several possibilities to carry out processing blocks while the system is processing the selection screen.
<b>AT SELECTION-SCREEN OUTPUT</b> This event is executed at PBO of the selection screen every time the user presses ENTER - in contrast to INITIALIZATION. Therefore, this event is not suitable for setting selection screen default values. Also, since AT SELECTION-SCREEN OUTPUT is first executed after the variant is imported (if a variant is used) and after adopting any values specified under SUBMIT in the WITH clause, changing the report parameters or the selection options in AT SELECTION-SCREEN OUTPUT would destroy the specified values.
Here, however, you can use LOOP AT SCREEN or MODIFY SCREEN to change the input/output attributes of selection screen fields.
Hope this helps.
Manish
‎2006 Nov 15 10:11 AM
Hi Sanjeev,
Initialization we will initialise the variable.
All the Variable are assigned with soem value.
At Selection-screen output. Suppose there are two radio buttons
One 'X' and realetd to X if u want to enter some thing (means a TextBox) related to X. then the Text field of Y should be Disabled.
Similarly 'Y' is the second radio Button. and when u select y the Text Box of X should be disable.
this Logic is Written in At Selection-Screen output.
using Modify Screen.
Bye
Murthy
‎2006 Nov 15 10:11 AM
Initialization event is triggered only one time when the program is started but
At Selection Screen output event is triggered for each cycle of a screen (PBO in dialog)
With Regards.
Kalpanashri Rajendran.
‎2006 Nov 15 10:12 AM
Hi Sanjeev,
<b>Initialization</b>:This event occurs before the standard selection screen is called.
<b>At selection-screen output</b>:In the PBO of the selection screen, the
AT SELECTION-SCREEN OUTPUT
event is triggered. This event block allows you to modify the selection screen directly before it is displayed.
For more help on this , Check this
Regards,
Raghav
‎2006 Nov 15 10:16 AM
hi
Initialization triggers before at selection-screen.
The difference is in the initialization event we will assign the values to selection screen data.
but in at selection-screen output event we will change properties of the selection screen data.
let us think in the selection screen there are two parameters.
in that i want one of them should disable that means it should not allow any input.
in that case we will use the at selection-screen output.
for example.
parameters: p1 type c modif id xyz.
p2 type c.
at selection-screen output.
loop at screen.
if screen-group1 = 'xyz'.
screen-input = 0.
endif.
modifty screen.
endloop.
here modify screen is necessary. here we will assign screen data to some modification group. here it is 'xyz'.
there is one internal table called SCREEN. in that these values will be stored.
hope it can make u to understand what is the difference.
‎2006 Nov 15 10:18 AM
Hi,
initialization is the event where you can initialize the selection with some default values.
this is the first event which triggers after load of program.
and coming to at selection-screen output , it is like PBO it will trigger twice for every run.
one is before display and another one is after display of selection screen.
here you can make the screen fields input enable and disable, active , inactive by looping the screen table.
Regards
vijay
‎2006 Nov 15 10:46 AM