‎2007 May 22 6:53 AM
is there any possibility of coding like the following
IF p_1 = 'X'.(radiobutton one)
parameters: p_fname1 type localfile.
ENDIF.
IF p_2 = 'X'.(radiobutton two)
parameters: p_fname2 type localfile.
ENDIF.
coz i need to get the parameters after i checking any of the two radiobuttons on the selection screen and on the same selection screen i should be getting the appropriate windows added at the last.
if i do so i am getting an error message saying that the "parameters cannot be defined locally(form routine or get active)"
‎2007 May 22 6:57 AM
Hi
PARAMETERS can only be declared in the SELECTION SCREEN.
But it seems you are declaring them in AT SELCTION-SCREEN output which is wrong, so you are getting this error.
DO what I suggested in the previous thread.
Reward points if useful
Regards
Anji
‎2007 May 22 6:57 AM
yes u need to modify the screen
go to se11 and any domain there the same logic is present.
What u have to do is depending on the radiobutton u need to make some fields ready to input and some other fields only ready to o/p/
‎2007 May 22 7:04 AM
Hi,
Declare these all the radibuttons & corresponfong fiel o/o fields.
and hide the file field in at selection-screen output. using
Loop at screen.
if P_1 eq 'X' and screen-name eq P_fname2.
screen-active = 0.
elseif P_2eq 'X' and screen-name eq P_fname1
screen-active = 0.
endif.
modify screen.
endloop.
Thanks
Sandeep
Reward if helpful
‎2007 May 22 7:09 AM
First you should define the two parameters with MODIF ID.
PARAMETERS: p_fname1 TYPE localfile MODIF ID p01.
PARAMETERS: p_fname2 TYPE localfile MODIF ID p02.
In the SELECTION-SCREEN OUTPUT (PBO) section you can then (in)activate the parameters
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CASE screen-group1.
WHEN 'P01'.
IF p_1 = 'X' IS INITIAL.
screen-active = '0'.
ELSE.
screen-active = '1'.
ENDIF.
WHEN 'P02'.
(...)
ENDCASE.To insure a "good looking" assign a dummy function code to the radiobutton group. So when the user will click a button of the group, the screen will be read and the program logic will redisplay the screen. (no coding necessary for the dummy function code)
PARAMETERS: p-1 RADIOBUTTON GROUP rad
USER-COMMAND rad DEFAULT 'X',
p-2 RADIOBUTTON GROUP rad.Regards
‎2007 May 22 7:11 AM
Hi,
Yes. i agree with Sandeep what he suggested. You have to first declare which are all Parameters you want. Later on depending on conditions which parameters you want to see and which you do not want to see should be handled under event At Selection Screen Output. If you want to handle on Selection Screen Blocks then you have to write event on that Block itself.
thanks,
sksingh
‎2007 May 22 7:26 AM
can you pls help me out in solving this problem
i want the code also if you can pls provide
in the selection screen
first block should contain the radiobuttons
one for presentation server
second for application server
if we select first radiobutton then we should get the block asking for the file path
if we select the second radiobutton then we should get the block asking for server path and file name