‎2007 May 02 12:02 PM
hi frens,
i got a requirement like..i have three checkboxes..by default if i click on one check box it should be in disabled mode..i mean it should be grayed out..pls help me..
thanks and regards,
malath.
‎2007 May 02 12:06 PM
parameters: p_cb as checkbox user-command uc1.
at selection-screen output.
if p_cb = 'X'.
loop at screen.
if screen-name = 'P_CB'.
screen-input = 0.
screen-output = 1.
*screen-active = 0.
modify screen.
endif.
endloop.
endif.
Regards,
ravi
Message was edited by:
Ravi Kanth Talagana
‎2007 May 02 12:06 PM
in pbo you have to write the code.. if it is selection screen
at selection-screen output.
if ch1 = 'X'.
loop at screen.
if screen name = 'CH1'.
screen-input = '0'.
modify screen.
endif.
endloop.
endif.
regards
shiba dutta
‎2007 May 02 12:08 PM
PARAMETERS: P_C1 AS CHECKBOX USER-COMMAND USR1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF P_C1 = 'X'.
SCREEN-INPUT = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
if helpful, reward
Sathish. R
‎2007 May 02 12:17 PM
hi
good
take a flag and assign that flag into that check box,check the condition if that flag is trure than activate the checkbox otherwise just deactivate the checkbox.
thanks
mrutyun^
‎2007 May 02 1:06 PM
Hi,
If it is a module pool program then U need to first palce 3 check boxes with the FCT code for all as 'BUT' (Some function code which U like-Meaningful).
Let us assume the buttons names are w_but1,w_but2,w_but3.
In the PBO.
LOOP AT SCREEN.
IF sy-ucomm = 'BUT' and
( screen-name1 = w_butt1 or
screen-name1 = w_butt2 or
screen-name1 = w_butt3 ).
If w_but1 = 'X' and
screen-name1 = w_butt1 .
screen-input = 0.
modify screen.
else.
screen-input = 1.
modify screen.
endif.
If w_but2 = 'X' and
screen-name1 = w_butt2 .
screen-input = 0.
modify screen.
else.
screen-input = 1.
modify screen.
endif.
If w_but3 = 'X' and
screen-name1 = w_butt3.
screen-input = 0.
modify screen.
else.
screen-input = 1.
modify screen.
endif.
endif.
endloop.
I have written this code from my understanding that:
U have 3 check boxes. Once U select a check box that should be disabled.
U have to replace the sy-UCOMM with the ok_code which u set in the element list.