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: 

Enforcing event AT-SELECTION-SCREEN OUTPUT

marcin_cholewczuk
Active Contributor
0 Kudos

Hi Gurus

Does anybody know how to force event AT-SELECTION-SCREEN OUTPUT ?

What I'm aiming for is changing screen somewere outside of this event. For example.


AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_param.
  IF p_param = 'change'.
    changes_in_screen = 'X'.
    *???*   "forcing AT-SELECTION-SCREEN OUTPUT event
  ENDIF.

AT-SELECTION-SCREEN OUTPUT.
  IF changes_in_screen = 'X'.
    LOOP AT SCREEN.
      "do something
    ENDLOOP.
  ENDIF.

I would be grateful for any hints.

1 ACCEPTED SOLUTION

JozsefSzikszai
Active Contributor
0 Kudos

hi Marcin,

you have to put a USER-COMMAND xxxx statement after p_param parameter:

PARAMETERS : p_param TYPE ... USER-COMMAND xxxx.

hope this helps

ec

10 REPLIES 10

JozsefSzikszai
Active Contributor
0 Kudos

hi Marcin,

you have to put a USER-COMMAND xxxx statement after p_param parameter:

PARAMETERS : p_param TYPE ... USER-COMMAND xxxx.

hope this helps

ec

0 Kudos

It's only possible when p_param is defined as character

parameters p_param type c.

So it's not good for me. Any other ideas?

0 Kudos

"IF p_param = 'change'."

if p_param is not character type than what is it?

Can you let me know the whole scenario, i.e. what should be on the selection screen and what should happen?

0 Kudos

Yes but it has to be single character parameter to use USER-COMMAND.

Whole scenario looks like this:

Client what that selection screen looks like this

Client_type

First_name

Last_name

Company_Name

Organization_name

On the beginning Last_name Company_Name Organization_name are hidden. When user set client type (private, organization, company) than corresponding parameter should be shown. So

AT SELECTION-SCREEN ON VALUE-REQUEST FOR Client_type.

popup with possible values

forcing AT SELECTION-SCREEN OUTPUT (which I don't know how to do) to show one of three parameters to user

that's how my problem looks like.

Edited by: Marcin Cholewczuk on Mar 20, 2008 2:54 PM

0 Kudos

if my understanding is right, client can have three different types (private, organization, company). If it is so, I would set it up as three radiobuttons and you can use the USER COMMAND with the radiobuttons.

0 Kudos

Well that's how client what it and I'm not in postition to change this, so no radio buttons. It should work the way I described

0 Kudos

what about displaying the field AS LISTBOX, than you can still use USER COMMAND...

PS.: Out job is not to follow blindly what clients ask for, but to provide the best, cheapest, easiest maintainable, etc. solution.

0 Kudos

Yeah I know but these are difficult people to deal with and for me it's easier to just do what they want

0 Kudos

One alternative to define two selection screens. First selection screen (default selection screen of report #1000) having Client_type. After user hits execute (F8) then show the second selection screen with corresponding parameters.


PARAMETERS: p_client(1).

SELECTION-SCREEN BEGIN OF SCREEN 9000 AS WINDOW.
PARAMETERS: p_name(20),
            p_lname(20),
            p_cname(20),
            p_oname(20).
SELECTION-SCREEN END OF SCREEN 9000.

AT SELECTION-SCREEN OUTPUT.
  CHECK sy-dynnr = '9000'.
*  Hide corresponding fields on second selection screen
*  based on values of P_CLIENT.
*  Also should make key parameters obligatory!

START-OF-SELECTION.
  CALL SELECTION-SCREEN 9000 STARTING AT 5 5.

Another alternative is to use a dialog/module pool program to handle this. Such screen field controlling can easily be done in dialog programs because you have full PAI/PBO control, unlike report program selection screen 1000. Unfortunately in a dialog program it is not easy to reproduce the functionality of a select-option.

0 Kudos

Thanks for answer but user should see those fields after choosing value in field not after hitting Run key.