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

reports

Former Member
0 Likes
707

hi,

could you pls tell me what is at selection screen output, at selection screen value request, at selection screen on, does

1 ACCEPTED SOLUTION
Read only

dani_mn
Active Contributor
0 Likes
653

HI,

<b>AT SELECTION-SCREEN OUTPUT.</b>

it is process before output(PBO) event of selection screen.

<b>AT SELECTION-SCREEN.</b>

it is process after input(PAI) event of selection screen.

<b>AT SELECTION-SCREEN ON VALUE-REQUEST FOR FIELD.

</b>

Use for providing search help for the field of selection screen.

<b>at selection screen on field.</b>

Use to check the value of field and if error occurs only this field is ready for input again.

Regards,

5 REPLIES 5
Read only

dani_mn
Active Contributor
0 Likes
654

HI,

<b>AT SELECTION-SCREEN OUTPUT.</b>

it is process before output(PBO) event of selection screen.

<b>AT SELECTION-SCREEN.</b>

it is process after input(PAI) event of selection screen.

<b>AT SELECTION-SCREEN ON VALUE-REQUEST FOR FIELD.

</b>

Use for providing search help for the field of selection screen.

<b>at selection screen on field.</b>

Use to check the value of field and if error occurs only this field is ready for input again.

Regards,

Read only

Former Member
0 Likes
653

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.

2.AT SELECTION-SCREEN ON <field>

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.

3)Use for providing search help for the field of selection screen

Refer to this sample program

http://www.sap-img.com/abap/value-request-for-parameter.htm

Read only

Former Member
0 Likes
653

Hi,

AT SELECTION-SCREEN OUTPUT.

Is use to disable or enable the fields in the selection-screen.It is like PBO in the dialog programming.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'A'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

AT SELECTION-SCREEN ON 'P_BUKRS'.

Is used for selection screen validations for a particular field. In case of error that field alone will be open for input..Whether the user has entered a valid data.

SELECT SINGLE * FROM T001

WHERE BUKRS = P_BUKRS.

IF SY-SUBRC <> 0.

MESSAGE E000 WITH 'INVALID COMPANY CODE'.

ENDIF.

AT SELECTION-SCREEN VALUE REQUEST.

Is used for custom value request for a paramter.

Thanks,

Naren

Read only

Former Member
0 Likes
653

HI PRAKASH,

CHECK THIS.. FROM HELP....

<b>AT SELECTION-SCREEN OUTPUT.</b>

... OUTPUT

Effect

This event is triggered at the screen event PBO of a selection screen. In the event block, the selection screen can be prepared through assignments to the data objects of parameters and selection criteria and through dynamic screen modifications.

Note

The assignments to input fields in the event block AT SELECTION-SCREEN OUTPUT always affect the selection screen and overwrite the user inputs from previous displays of the same selection screen. Assignments in the event blocks LOAD-OF-PROGRAM oder INITIALIZATION, on the other hand, only have an effect at first program start.

<b>at selection screen value request</b>

... { ON { HELP-REQUEST | VALUE-REQUEST } FOR

{para|selcrit-low|selcrit-high} }

Effect

The two events ON HELP-REQUEST and ON VALUE-REQUEST are triggered at the screen events POH and POV of a selection screen if - for the input field of a parameter para or one of the input fields of a selection criterion selcrit - the field help F1 or the input help F4 was called. Other selection events are not triggered.

In the event blocks, a self-defined field or input field can be programmed, which overrides any helps possibly defined in the ABAP Dictionary.

Notes

These event blocks can only be implemented for fields of the selection screen that are defined in the same ABAP program and not in a possibly linked logical database.

With the events for the field and input help, no data is transported between the selection screen and the ABAP program. As with general screens, suitable function modules must be used for these. The parameters and selection criteria changed for the input help are transported to the selection screen.

<b>at selection screen on</b>

... ON {para|selcrit}

Effect

This event is triggered at the screen event PAI of a selection screen if the content of the input field of a parameter para or a line of a selection criterion selcrit was passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or an error message in the event block makes the fields para and selcrit ready for input again.

No parameter that is defined as a radio button can be specified. For this purpose, the addition ON RADIOBUTTON GROUP is provided.

Note

If a user action takes place in the dialog box for the multiple selection of a selection criterion selcrit, the entries of the selection table are passed to the program, line by line. For each line, the event AT SELECTION-SCREEN ON selcrit is triggered.

HOPE THIS HELPS,

DO REWARD IF IT HELPS,

PRIYA.

Read only

Former Member
0 Likes
653

Hi,

... OUTPUT

Effect

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.

... ON VALUE-REQUEST FOR psel_low_high

Effect

In this addition, the field psel_low_high is either the name of a report parameter or of the form sel-LOW or sel-HIGH, where sel is the name of a selection criterion. The effect of this is twofold:

The possible entries pushbutton for F4 appears beside the appropriate field.

When the user activates this pushbutton or presses F4 for the field, the event is executed. You can thus implement a self-programmed possible entries routine for the input/output fields of the selection screen. If the program contains such an event and the user presses F4, the system processes this rather than displaying the check table or the fixed values of the Dictionary field - even if the report parameter or the selection option with LIKE or FOR points to a Dictionary field. You can, for example, use the CALL SCREEN statement to display a selection list of possible values. The contents of the field psel_low_high at the end of this processing block are copied to the appropriate input/output field.

This addition is only allowed with report-specific parameters (PARAMETERS) or selection options (SELECT-OPTIONS). For database-specific parameters or selection options, you can achieve the same effect by using the addition VALUE-REQUEST FOR ... with the key word PARAMETERS or SELECT-OPTIONS in the include DBxyzSEL (where xyz = name of logical database). In this case, you must program the possible entries in the database program SAPDBxyz.

AT SELECTION-SCREEN event is triggered in the PAI of the selection screen once the ABAP runtime environment has passed all of the input data from the selection screen to the ABAP program.

AT SELECTION-SCREEN OUTPUT - This event block allows you to modify the selection screen directly before it is displayed.

Regards,

Shalini