‎2008 Apr 05 1:21 PM
Hi Experts.
I need to change the screen layout in the following way:
if first radiobutton is selected ,parameter field is not mandatory
if second radiobutton is selected,parameter field is mandatory.
I have written piece of code for this but it does not works:
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = c_m1.
IF rd1 EQ c_check.
screen-active = 0.
ENDIF.
ELSEIF screen-group1 = c_m2.
IF rd2 EQ c_check.
screen-active = 0.
ENDIF.
ENDIF.
Please advice.
‎2008 Apr 05 1:30 PM
Hi ,
Declare the radio button like :
parameters: rd1 radiobutton group g1 default 'X' modif id xyz.
just add default 'X' to ypur radiobutton declaration,
it will work,,
Regards,
Talwinder
‎2008 Apr 05 1:54 PM
Check the below code. This code hides the p_param field (parameter) when rb_1 is selected.
PARAMETERS: rb_1 RADIOBUTTON GROUP g1 default 'X' user-command u1,
rb_2 RADIOBUTTON GROUP g1.
PARAMETERS: p_param TYPE c MODIF ID m1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'M1'.
IF rb_1 = 'X'.
screen-active = 0.
ELSE.
screen-active = 1.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Hope this helps.
Thanks,
Balaji
‎2008 Apr 05 2:04 PM