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
489

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

3 REPLIES 3
Read only

Former Member
0 Likes
461

Hi Sumit,

Check this info.

1. at selection-screen on field

2. at selection-screen output

3. at selection-screen block

4. at selection-screen on value-request

5. at selection-screen on help-request.

For knowing Selection-screens:

First you must have right understanding of Events.

- Events are introduced by Event Keyword. They end when again next processs begins.

Selection-screens are special screen defined in ABAP.

- This ABAP at run time only controls the flow logic of Selection-screens. The PBO and PAI triggers the num of. selection-screens.

The basic form of the selection screen events is the AT SELECTION-SCREEN event. This event occurs after the runtime environment has passed all input data from the selection screen to the ABAP program. The other selection screen events allow programmers to modify the selection screen before it is sent and specifically check user input.

At Selection-screen OUTPUT is trigerred in PBO of selection-screen.

- This allows you to modify the Selection-screen, before it is displayed.

At Selection-screen On Field is triggered in PAI of selection-screens.

- The input fields can b checked,in the corresponding event block. If an error message occurs within this event block, the corresponding field is made ready for input again on the selection screen.

At Selection-screen On Block is trigerred in PAI event.

- You define a block by enclosing the declarations of the elements in the block between the statements SELECTION-SCREEN BEGIN OF BLOCK block - END OF BLOCK block. You can use this event block to check the consistency of the input fields in the block.

At Selection-screen On value request.

- This event is trigerred for F4 help.

At Selection-screen On help request .

- This event is triggered when the user clicks F1 for help on fileds.

Hope this resolves your query.

Reward all the helpful answers.

Regards

Read only

Former Member
0 Likes
461

hi

<b>Selection-screens are special screen defined in ABAP. </b> - This ABAP at run time only controls the flow logic of Selection-screens. The PBO and PAI triggers the num of. selection-screens.

The basic form of the selection screen events is the AT SELECTION-SCREEN event. This event occurs after the runtime environment has passed all input data from the selection screen to the ABAP program. The other selection screen events allow programmers to modify the selection screen before it is sent and specifically check user input.

<b>At Selection-screen OUTPUT is trigerred in PBO of selection-screen. </b>

- This allows you to modify the Selection-screen, before it is displayed.

<b>At Selection-screen On Field is triggered in PAI of selection-screens.</b> - The input fields can b checked,in the corresponding event block. If an error message occurs within this event block, the corresponding field is made ready for input again on the selection screen.

<b>At Selection-screen On Block is trigerred in PAI event.</b>

- You define a block by enclosing the declarations of the elements in the block between the statements SELECTION-SCREEN BEGIN OF BLOCK block - END OF BLOCK block. You can use this event block to check the consistency of the input fields in the block.

<b>At Selection-screen On value request.</b>

- This event is trigerred for F4 help.

<b>At Selection-screen On help request</b> .

- This event is triggered when the user clicks F1 for help on fileds.

hope ur doubts will be clerar

regards

ravish

<b>plz reward if helpful</b>

Read only

Former Member
0 Likes
461

hi sumit

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.

At-Selection screen

This is PAI--Process after Input...

Case 1:

=======

"At-Selection screen" output Event is triggered before screen is diplayed to the user.

Example:

========

You have two radio buttons and three input fields. Out of which one field is common to both the radio button and other button should be displayed depending up on the radio button selected, in this case you can make the 2nd and 3rd field visible/invisible depending up on the radio button selected. So when you click a radio button the event "At-Selection screen" will be triggered, so you can make the necessary field ( 2nd or 3rd) visible/invisible using this.

This is as similar to PBO(Process Before Output).

Case 2:

=======

"At-selection screen ON....."

Example:

=======

Suppose if you want to restrict a value that you are entering in the field on the screen then you can use this event,

At-selection screen <P_VAR>.

If the report starts an error dialog at this point, precisely these fields become ready for input again until you enter correct value.

AT-SELECTION SCREEN ON FIELD

This event is for validating a particular field in the selection-screen.

it 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, the corresponding field is made ready for input again on the selection screen.

The program below is connected to the logical database F1S:

REPORT EVENT_DEMO.

NODES SPFLI.

AT SELECTION-SCREEN ON CITY_FR.

IF CARRID-LOW EQ 'AA' AND CITY_FR NE 'NEW YORK'.

MESSAGE E010(HB).

ENDIF.

If the user enters "AA" in the first input field, but not NEW YORK for the departure city, an error message is displayed in the status line until the user enters the correct city

AT SELECTION-SCREEN.

is the basic form for events on selection screen and used for validating all the selection-screen fields.

regards

navjot

reward points if helpfull

Message was edited by:

navjot sharma