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 b/w events

Former Member
0 Kudos

what is the diff b/w at selection-screen and at selection-screen o/p

5 REPLIES 5

matt
Active Contributor
0 Kudos

If you're going to ask questions, especially regarding syntax, it's a good idea to be specific. There is no ABAP command "AT SELECTION-SCREEN O/P".

I assume you mean "OUTPUT".

AT SELECTION-SCREEN OUTPUT runs just before the selection screen is displayed, and allows modifications to the fields and values on the screen. It runs in the PBO, if you know what that is.

AT SELECTION-SCREEN runs after all other selection screen processing. Usually used for validation. It runs in the PAI.

matt

Former Member
0 Kudos

at selection-screen will be triggered in pai event

selection-screen o/p will be triggered in pbo event

Former Member
0 Kudos

Hi Jaya,

The difference between Selection Screen and Selection Screen Output is we use the Selection Screen Output Event before the Selection Screen will 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.

Selection-Screen Event will trigger after section-screen is displayed and user action takes place on that.

Thanks,

Vinay

asik_shameem
Active Contributor
0 Kudos

Hi,

AT SELECTION-SCREEN

1) This event is triggered once the ABAP runtime environment has passed all of the input data from the selection screen to the ABAP program.

2) If an error message occurs in this processing block, the selection screen is redisplayed with all of its fields ready for input.

3) This allows you to check input values for consistency.

<b>Example: 1</b>

PARAMETERS: P_PHONE(8).

AT SELECTION-SCREEN.

IF P_PHONE CO ‘0123456789 ’.

MESSAGE I999(ZZ) WITH

‘Correct input’.

ELSE.

MESSAGE E999(ZZ) WITH

‘Wrong input’.

ENDIF.

AT SELECTION-SCREEN OUTPUT event will get triggered before the screen is going to display.

<b>Example : 2</b>

PARAMETERS: TEST1(10) MODIF ID SC1,

TEST2(10) MODIF ID SC2,

TEST3(10) MODIF ID SC1,

TEST4(10) MODIF ID SC2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'SC1'.

SCREEN-INTENSIFIED = '1'.

MODIFY SCREEN.

CONTINUE.

ENDIF.

IF SCREEN-GROUP1 = 'SC2'.

SCREEN-INTENSIFIED = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Former Member
0 Kudos

AT SELECTION-SCREEN

This event is processed before leaving the Selection Screen i.e. when the selection screen has been processed (at the end of PAI once the ABAP runtime environment has passed all the input data from selection screen to the ABAP program).

This event is used to validate the input provided through selection screen. If an error message occurs in this processing block, the selection screen is redisplayed with all of its fields ready for input. This allows you to check input values for consistency.

AT SELECTION-SCREEN OUTPUT

This event gets triggered for the first time when the screen is building up and the screen is about to appear. It gets triggered again and again for every dialog step/the selection screen is refreshed/ enter key is pressed.

This event is to control the display of the screen at runtime. lilke hiding the fields, making the fields Active/Inactive, to modify the field attributes. It is a PBO Event.

Reward if useful.