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

event

Former Member
0 Likes
471

what is the use of at-selection screen output,atselection screen on feild and at selection? could u plzz tell me the answer

3 REPLIES 3
Read only

Former Member
0 Likes
453

Hi

The AT SELECTION SCREEN ... events are implemented internally as FORM routines. All data objects created using DATA are therefore local - only recognized and addressable within the event.

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.

Regards,

Prasanth

  • Reward if helpful

Read only

Former Member
0 Likes
453

Hi,

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

1) AT SELECTION-SCREEN event is triggered in the <b>PAI of the selection screen</b>.

Once the ABAP runtime environment has passed all of the input data from the selection screen to the ABAP program, this gets trigered.

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

This allows us to check input values for consistency.

2) AT SELECTION-SCREEN OUTPUT

event is triggered in the <b>PBO of the selection screen</b>.

This event block allows us to modify the selection screen directly <b>before it is displayed</b>.

3) AT SELECTION-SCREEN ON <field>

In the <b>PAI event of the selection screen</b>, the event

is triggered.

When the contents of each individual input field are passed from the selection screen to the ABAP program. The input field <field> can be checked in the corresponding event block.

If an error message occurs within this event block, <b>only the corresponding field is made ready for input again</b> on the selection screen.

Apart from these there are other forms

4)AT SELECTION-SCREEN ON BLOCK <block> :-fields in a block

5)AT SELECTION-SCREEN ON RADIOBUTTON GROUP <radi>

6)AT SELECTION-SCREEN ON <seltab>

7)AT SELECTION-SCREEN ON HELP-REQUEST FOR <field>:- F1 help

8)AT SELECTION-SCREEN ON VALUE-REQUEST FOR <field>:- F4 help

Hope it clears your doubt.

Reward if useful.

Regards,

Saumya

Read only

Former Member
0 Likes
453

at selection-screen output is the PBO of selection screen so generally we are setting the attributes of selection screen here.

at selection-screen on field is PAI of selection screen when we are entering a value for the field and make any user interaction it triggers we can validate the value of that field.

at selection-screen is the PAI which is triggering for any user interaction irrespective of entering value for perticular field or not.

pls check the link

<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm</a>

regards

shiba dutta