‎2008 Jul 02 4:59 PM
Hello Experts
I have following requirement
Radio button 1
Parameters
SELECT-OPTIONS1a
SELECT-OPTIONS1b
Radiobutton 2
Parameters
SELECT-OPTIONS2a
SELECT-OPTIONS2b
If we select Radiobutton 1 then radiobutton2 and its options should be grayed out or invisible. If we select Radiobutton 2 then radiobutton1 and its options should be grayed out or invisible.
I am using Loop at screen and using screen-input = '1' for individual radiobutton group. But in this case it is not allowing to go back to previous radiobutton group.
Please let me know If anyone has any Idea for this
Thanks in Advance
-Hark
‎2008 Jul 02 5:06 PM
Hello Harkamal Singh,
There is an event called AT SELECTION-SCREEN OUTPUT.
Make use of this to acheive ur functionality.
plz Assign points, if helpful.
Rgds,
Raghu.
‎2008 Jul 02 5:23 PM
Hello,
To achieve this you can't set one of the radiobuttons disabled, only the dependent fields.
See the code bellow:
TABLES spfli.
DATA lv TYPE c LENGTH 3.
PARAMETERS:
p1 RADIOBUTTON GROUP 1 DEFAULT 'X' USER-COMMAND cm1,
p2 RADIOBUTTON GROUP 1.
SELECT-OPTIONS: s1 FOR spfli-carrid MODIF ID m1,
s2 FOR spfli-connid MODIF ID m2.
AT SELECTION-SCREEN OUTPUT.
IF p1 IS NOT INITIAL.
lv = 'M1'.
ELSE.
lv = 'M2'.
ENDIF.
LOOP AT SCREEN.
IF screen-group1 = lv.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Regards.
‎2008 Jul 02 5:26 PM
Check out this code:
*&---------------------------------------------------------------------*
*& Report ZTEST_SOURAV9
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ztest_sourav9.
PARAMETERS:
p_desk RADIOBUTTON GROUP 1 DEFAULT 'X' USER-COMMAND flag, "Desktop location
p_unix RADIOBUTTON GROUP 1 , "Unix location
p_file1 LIKE rlgrap-filename MODIF ID m1 DEFAULT 'File 1' ,
p_file2 LIKE filename-fileextern MODIF ID m2 DEFAULT 'File 2'.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_desk = 'X' AND
screen-group1 = 'M2'.
screen-active = '0'.
ELSEIF p_unix = 'X' AND
screen-group1 = 'M1'.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
*....
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file2.
*...
START-OF-SELECTION.
IF p_desk = 'X'.
WRITE: p_file1.
ELSE.
WRITE: p_file2.
ENDIF.