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

at selection-screen

Former Member
0 Likes
755

diff b/w at selection-screen and at selection-screen output

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
728

Hi Ali,

at selection screen------when user enters the values in the feilds 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 feild 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.

Reward Points if Useful

6 REPLIES 6
Read only

Former Member
0 Likes
728

Hi,

The event AT SELECTION-SCREEN is the basic form of a whole series of events that occur while the selection screen is being processed.

The standard selection screen in an executable program or in the logical database linked to it is automatically called between the INITIALIZATION and START-OF-SELECTION events. When you call the selection screen, and when users interact with it, the ABAP runtime environment generates selection screen events, which occur between INITIALIZATION and START-OF-SELECTION.

You can define event blocks for these events in your program to change the selection screen or process user input.

Read only

Former Member
0 Likes
728

Hi,

At selection screen output, if you want any default values to be displayed in the selection screen, you can use at selection-screen output.

At selection-screen.

If you want to validate any data that is entered.

Thanks,

Sriram Ponna.

Read only

SureshRa
Active Participant
0 Likes
728

AT SELECTION-SCREEN is a PAI event (fires after user entry)

AT SELECTION-SCREEN OUTPUT is a PBO event (before selection screen appears)

Suresh Radhakrishnan

Edited by: Suresh Radhakrishnan on May 28, 2008 9:45 PM

Read only

Former Member
0 Likes
729

Hi Ali,

at selection screen------when user enters the values in the feilds 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 feild 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.

Reward Points if Useful

Read only

Former Member
0 Likes
728

Hi,

If you want to make any field attributes before displaying the selection screen then you need to write the code under AT SELECTION-SCREEN OUTPUT. You can do the field validations in the AT SELECTION-SCREEN event.

Rgds,

Bujji

Read only

Former Member
0 Likes
728

Hi Ali,

At selection-screen will be used for coding the validation of the input fields in the selection screen.

The code under this event will be executed after you enter the values in input fields of the selection screen and pressing the 'execute' button.

At selection-screen output will be used to set the values or properties of the input fields like disabling the input field etc., in the selection screen. The code under this event will be executed before the report program shows you the selection screen and after you execute your program.

At selection-screen output will be executed before the program shows you the selection screen.

At selection-screen will be executed after you provide the values in the selection screen and execute.

Satya.