Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

check box

Former Member
0 Likes
668

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.

5 REPLIES 5
Read only

Former Member
0 Likes
630

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

Read only

Former Member
0 Likes
630

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

Read only

Former Member
0 Likes
630

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

Read only

Former Member
0 Likes
630

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^

Read only

Former Member
0 Likes
630

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.