03-20-2008 12:50 PM
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.
03-20-2008 12:53 PM
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
03-20-2008 12:53 PM
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
03-20-2008 1:28 PM
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?
03-20-2008 1:32 PM
"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?
03-20-2008 1:48 PM
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
03-20-2008 2:03 PM
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.
03-20-2008 2:10 PM
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
03-20-2008 2:38 PM
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.
03-21-2008 7:53 AM
Yeah I know but these are difficult people to deal with and for me it's easier to just do what they want
03-21-2008 3:17 PM
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.
03-25-2008 7:29 AM
Thanks for answer but user should see those fields after choosing value in field not after hitting Run key.