2007 Mar 05 5:23 PM
i have two check boxes.
if i selected one specific check box i want the other to be disabled.
plz tell me the code for that.
2007 Mar 05 5:30 PM
Hi Sripathi,
Use LOOP AT SCREEN ...ENDLOOP in AT SELECTION-SCREEN OUTPUT event and disable the check box using SCREEN-ACTIVE = '0'.
PARAMETERS: CB_ONE AS CHECKBOX USER-COMMAND USR.
PARAMETERS: CB_TWO AS CHECKBOX MODIF ID M1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'M1' AND CB_ONE = 'X'.
SCREEN-ACTIVE = '0'.
MODIFY SCREEN.
ELSEIF SCREEN-GROUP1 = 'M1' AND CB_TWO = 'X'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Thanks,
Vinay
2007 Mar 05 5:28 PM
Hi,
check this example..
PARAMETERS: p_c1 AS CHECKBOX USER-COMMAND usr1 .
PARAMETERS: p_c2 AS CHECKBOX MODIF ID m1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'M1' AND p_c1 = 'X'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Thanks,
Naren
2007 Mar 05 5:30 PM
Hi Sripathi,
Use LOOP AT SCREEN ...ENDLOOP in AT SELECTION-SCREEN OUTPUT event and disable the check box using SCREEN-ACTIVE = '0'.
PARAMETERS: CB_ONE AS CHECKBOX USER-COMMAND USR.
PARAMETERS: CB_TWO AS CHECKBOX MODIF ID M1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'M1' AND CB_ONE = 'X'.
SCREEN-ACTIVE = '0'.
MODIFY SCREEN.
ELSEIF SCREEN-GROUP1 = 'M1' AND CB_TWO = 'X'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Thanks,
Vinay
2007 Mar 05 5:34 PM
Hi,
Please try this.
parameters: p_check1 as checkbox,
p_check2 as checkbox.
at selection-screen output.
loop at screen.
if screen-name = 'P_CHECK2' and P_CHECK1 = 'X'.
screen-input = '0'.
modify screen.
endif.
endloop.
.
Regards,
Ferry Lianto
2007 Mar 05 6:02 PM
An addition...which ever check box you choose the other one will be disabled...
PARAMETERS: p_c1 AS CHECKBOX USER-COMMAND usr1 modif id m.
PARAMETERS: p_c2 AS CHECKBOX user-command usr2 MODIF ID m1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'M1' AND p_c1 = 'X'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
if screen-group1 = 'M' and p_c2 = 'X'.
screen-input = 0.
modify screen.
endif.
ENDLOOP.
check this and award points if it helps