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. At selection-screen and At selection-screen output

Former Member
0 Kudos
209

what is the exact diff between.. At selection-screen and At selection-screen output..? if possible, with example.

thanku.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
68

Hi,

at selection-screen output .

PBO of selection screen before showing selection screen it will trigger.

at selection-screen.

PAI of selection screen when user interaction will occur it will trigger i.e. if user give some input and press enter it will trigger.

at selection-screen on field

this will trigger for the perticular fuield i.e. if user give input in the perticular field and press enter it will trigger.

but after pressing enter PAI will trigger and again PBO will trigger.

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 if useful.

Regards,

Raj.

5 REPLIES 5

Former Member
0 Kudos
68

Use the SAP help or you could put a break-point at these events to see how they are called.

Former Member
0 Kudos
68

AT SELECTION-SCREEN is PAI of the selection screen

AT SELECTION-SCREEN OUTPUT is the PBO of the selection screen.

First AT SELECTION-SCREEN OUTPUT is executed.

Then the screen is loaded.

After you do some operation

then AT SELECTION-SCREEN is executed.

Reward if helpful.

Former Member
0 Kudos
68

at selection-screen output is fired when the selection screen is about to be displayed....

this event is used to control the visibility and status of fields on the selection screen...i.e which fields to show/hide , which ones to enable/disable etc..

at selection-screen is fired when some event occurs on the selection screen....for example a button click, pressing of ENTER, etc...

this event is used to do the validations on the screen to ensure proper data has been entered before the output is displayed

Former Member
0 Kudos
69

Hi,

at selection-screen output .

PBO of selection screen before showing selection screen it will trigger.

at selection-screen.

PAI of selection screen when user interaction will occur it will trigger i.e. if user give some input and press enter it will trigger.

at selection-screen on field

this will trigger for the perticular fuield i.e. if user give input in the perticular field and press enter it will trigger.

but after pressing enter PAI will trigger and again PBO will trigger.

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 if useful.

Regards,

Raj.

former_member705122
Active Contributor
0 Kudos
68

Hi,

Selection Screen Output Event get triggers before the Selection Screen is displayed.

Eg: Suppose if we want to disable some fields and enable some fields in the Selection Screen then we can code that in Section-Screen Output event.

Regards

Adil