‎2008 Apr 29 4:20 PM
Hi,
Could any body help me what is the difference between at selection screen and at selection screen output.
Regards,
Koti
‎2008 Apr 29 4:23 PM
Hi,
AT SELECTION SCREEN:
when user enters the values in the fields of the selection screen and clicks on execution button,this event gets triggered.this event is basically for checking the value entered by the user for the field of the selection screen i.e data validity checking.this event is for entire selection screen.
AT SELECTION SCREEN OUTPUT:
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.
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.
The addition MODIF ID XYZ to the key word SELECT-OPTIONS
assigns all fields of the selection option NAME to a group you can read in the field SCREEN-GROUP1 .
At PBO of the selection screen, all these fields are then set to highlighted
Regards,
Sunil
‎2008 Apr 29 4:25 PM
Hello Koti
AT SELECTION SCREEN
It is used when using an element on the screen...parameter...select options radio button...etc
AT SELECTION SCREEN OUTPUT
OPTION It is used as an event, This event is triggered at the screen event PBO of a selection screen.
Hope this helps!!!
please reward
Gabriel P-
‎2008 Apr 29 4:49 PM
AT SELECTION-SCREEN - Used for validation purpose and
AT SELECTION-SCREEN OUTPUT - used to alter / add properties of selection screen elements ( parmeters / soptions).
‎2008 Apr 29 5:10 PM
Hi,
At Selection Screen------ Used for the validating the fields in the Selection screen
By this event u will get F4 value, screen field validations like data is availabe or not when user enter data in a field.
At Selection Screen Output -
This is used for the dynamic feld validation
like if u dont want a field in selection screen to be an input field.
Thanks
Prashanth
‎2008 Apr 30 2:30 AM
hi,
At Selection-Screen: With this user can implement validations in ABAP reports. It triggers after processing user input still selection screen in active mode.
for eg :
AT SELECTIONSCREEN on Vendor.
IF Vendor-low < 500. or
Vendor - High>4000.
Message E000(0) with 'enter proper input'.
Endif.
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.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 .you can use LOOP AT SCREEN or MODIFY SCREEN to change the input/output attributes of selection screen fields.
for eg :
Output all fields of the SELECT-OPTION NAME highlighted:
<![if !supportEmptyParas]> <![endif]>
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.
pls reward if helpful.
Edited by: Rajyalakshmi Attili on Apr 30, 2008 12:03 PM