11-05-2007 8:00 AM
Hi All,
I have the following code:
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF r_sonum = 'X'.
IF screen-group1 = 'SC1'.
screen-invisible = '0'.
ELSEIF screen-group1 = 'SC2'.
screen-active = '0'.
screen-invisible = '1'.
ENDIF.
MODIFY SCREEN.
CONTINUE.
ELSEIF r_contra = 'X'.
IF screen-group1 = 'SC2'.
screen-invisible = '0'.
ELSEIF screen-group1 = 'SC1'.
screen-active = '0'.
screen-invisible = '1'.
ENDIF.
MODIFY SCREEN.
CONTINUE.
ENDIF.
ENDLOOP.
I want certain fields to be hidden depending on the radio button they choose. However, If I try to press another radio button, I have to hit enter before the other fields are hidden. How do I make this automatic than when user click a certain radio button, fields are hidden?
Thanks
11-05-2007 8:02 AM
Hi,
u can do it with user command..check the beloe sample code for it..
PARAMETERS : p_lpn TYPE filename-pathintern
DEFAULT c_lpn OBLIGATORY , "Logical Path Name
p_aserv RADIOBUTTON GROUP grp
USER-COMMAND app, "Application server
p_afile1 TYPE filename-fileextern , "Application File
"Name for contracts
p_afile2 TYPE filename-fileextern , "Application
"FileName for
"Long text
p_aerfl1 TYPE filename-fileextern , "Error File
"forcontracts
p_aerfl2 TYPE filename-fileextern , "Error File
"for Longtext
p_pserv RADIOBUTTON GROUP grp, "Presentation Server
p_pfile1 TYPE rlgrap-filename , "Presentation File
"Name forcontracts
p_pfile2 TYPE rlgrap-filename , "Presentation File
"Name for long
"texts
p_errfl1 TYPE rlgrap-filename ,
"Error File for
"contracts
p_errfl2 TYPE rlgrap-filename . "Err File Long text
Rewrad if helpful.
Regards,
nagaraj
11-05-2007 8:02 AM
Hi,
u can do it with user command..check the beloe sample code for it..
PARAMETERS : p_lpn TYPE filename-pathintern
DEFAULT c_lpn OBLIGATORY , "Logical Path Name
p_aserv RADIOBUTTON GROUP grp
USER-COMMAND app, "Application server
p_afile1 TYPE filename-fileextern , "Application File
"Name for contracts
p_afile2 TYPE filename-fileextern , "Application
"FileName for
"Long text
p_aerfl1 TYPE filename-fileextern , "Error File
"forcontracts
p_aerfl2 TYPE filename-fileextern , "Error File
"for Longtext
p_pserv RADIOBUTTON GROUP grp, "Presentation Server
p_pfile1 TYPE rlgrap-filename , "Presentation File
"Name forcontracts
p_pfile2 TYPE rlgrap-filename , "Presentation File
"Name for long
"texts
p_errfl1 TYPE rlgrap-filename ,
"Error File for
"contracts
p_errfl2 TYPE rlgrap-filename . "Err File Long text
Rewrad if helpful.
Regards,
nagaraj
11-05-2007 8:02 AM
************************************************************************
*AT SELECTION-SCREEN OUTPUT.
AT SELECTION-SCREEN OUTPUT.
loop at screen.
if screen-name eq 'PNPS$MSL'.
screen-active = 0.
endif.
modify screen.
endloop.
Message was edited by:
Karthikeyan Pandurangan
11-05-2007 8:04 AM
HI,
u have to use ser-command.
Define one of the radio button like this,,,
parameter:r_radio1 radio button grioup gr1 <b>user-command</b> usr1.
thanks,CSR
11-05-2007 8:04 AM
Hi,
You need to handle AT SELECTION-SCREEN ON RADIOBUTTON GROUP <radi>
Just refer below link
http://help.sap.com/saphelp_nw04/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm
Regards,
Atish
11-05-2007 8:05 AM
Hi,
try to define your radiobuttons like this:
parameters:
p_op1 radiobutton group rb1 default 'X' user-command all,
p_op2 radiobutton group rb1 user-command all,
p_op3 radiobutton group rb1 user-command all.
It must be works.