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

one simple question.

Former Member
0 Likes
769

Hi All,

Can any one tell me which event in Reports(Initialization,At selection-screen,on field,output,start-of-selection,end-of-selection) is similar to PBO event of Module pool?

Points are rewarded for correct answer .

Thanks,

Priya.

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
752

The event is : AT SELECTION-SCREEN OUTPUT.

Regards

7 REPLIES 7
Read only

RaymondGiuseppi
Active Contributor
0 Likes
753

The event is : AT SELECTION-SCREEN OUTPUT.

Regards

Read only

Former Member
0 Likes
752

Yes, AT SELECTION-SCREEN OUTPUT is the event which executes before displaying of the selection screen.

Regards,

Sankar

Read only

0 Likes
752

Can u explain me in detail both the events? AND

What is the difference between pbo and at selection-screen output.?

Thanks,

Priya.

Read only

0 Likes
752

Hi,

At Selction-Screen Output can be said to be equivalent to PBO .

Now as PBO is the processing done before the screen is displayed in a module pool , in the same way for reports if you want to do some processing before the selection screen is displayed , you can write your code in it.

Few operations are

1. Assign initial values to input , but each time you go to selection screen there values will be assigned irrespective of the input you gave.

The scenario i am talking about is

Selection Screen --> Program Execution --> Report --> Back to Seelction Screen.

If you assign intial value here irrespecive of what value you gave as input the value u assign in this event will be shown in the selectionscreen (2)

So it is better to use initialization to assign initial values , as it is executed only once

2. A more important purpose is suppose you have 2 radiobuttons and about 6 fields as input , when u select one radio button and u want 3 fields to be disable and other enabled , you write code to do this in at selection-screen output.

Regards,

Sankar

Read only

0 Likes
752

AT SELECTION-SCREEN OUTPUT is executed in the generated dynpro (1000 or so) in PBO MODULE PBO_REPORT.

Regards

Read only

0 Likes
752

Hi Priya,

check this link: -

http://www.sap-img.com/abap/different-types-of-selection-screens.htm

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

You can have all info about at selection-screen, if you enter it into an ABAP editor (SE38) and press F1 on the text...

AT SELECTION-SCREEN OUTPUT is triggered before showing the selection-screen so it's used to change the attributes of the input/output fields (like parameter and select-option). For example it can use to hide some fields:

LOOP AT SCREEN.

IF SCREEN-NAME = <......>.

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Read only

Former Member
0 Likes
752

Hi Priya,

Both Initialization and AT SELECTION SCREEN OUTPUT.

In your PBO,

If you have a date field...just try like this:

PBO---->

if date is not initial.

p_date = sy-datum.

endif.

Regards,

Hari krishna