Application Development 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: 

how to check whether a checkbox is checked or not

Former Member
0 Kudos

hi all,

how should i check whether a checkbos is checked or not. if it is checked then a parameter should be made as enabled can i make it in report program..

thanks and regards,

yogesh

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi all,

the parameter box should be disabled at first. but once the checkbox is being checked the parameter box should be enabled and could enter the value. Could you suggest for this...

thanks and regards,

yogesh

11 REPLIES 11

Former Member
0 Kudos

Hi,

See in the code

if that is checked

somewhere it will be written like

if V_CHK = 'X'. (check for that checkbox name)

you will know.

reward if useful

regards,

ANJI

Former Member
0 Kudos

HI Yogesh

Just check the value of checkbox

<b>If w_checkbox = 'X'</b> ""The W_checkbox is the name of check box if its value is 'X' then it is checked if not it is not checked

write: ' then it is checked'

endif.

Regards Rk

Former Member
0 Kudos

if

check1 = 'X'.

do

else

do

endif.

Regards

Prabhu

Former Member
0 Kudos

Hi,

Yes, suppose the name of the check box is p_check.

IF p_check = 'X' ==> Checkbox is CHECKED.

ELSE NOT CHECKED.

Reward is useful,

Regards,

Tanmay

Former Member
0 Kudos

HI

PARAMETERS: P_CK AS CHECKBOX USER-COMMAND CHK,
                         P1 MODIF ID AAA,
                         P2 MODIF ID BBB.

AT SELECTION-SCREEN OUTPUT.


    LOOP AT SCREEN.
       CASE SCREEN-GROUP1.
          WHEN  'AAA'.
             IF P_CK = 'X'.
                SCREEN-ACTIVE = 0.
             ENDIF.
          WHEN 'BBB'.
               IF P_CK = SPACE.
                SCREEN-ACTIVE = 0.
             ENDIF.            
         ENDCASE. 
         modify screen.  
    ENDLOOP.

Max

Former Member
0 Kudos

<b>u can use at selection screen output event in that check if checkbox is checked then just loop at screen table which is their befor ethe creation of the selection screen......

just write down

loop at screen

if screen-name = 'Parameter name'.

screen-input = 1.

endif.

modify screen.

endloop.</b>

Former Member
0 Kudos

<b>hope it will solve ur problem...

reward points if its helpfullll<b></b></b>

Former Member
0 Kudos

hi all,

the parameter box should be disabled at first. but once the checkbox is being checked the parameter box should be enabled and could enter the value. Could you suggest for this...

thanks and regards,

yogesh

Hi Yogesh

It will give you the required output.

PARAMETERS: P_CK AS CHECKBOX USER-COMMAND CHK,
                  P1(10) MODIF ID AAA.


AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCREEN.
       CASE SCREEN-GROUP1.
          WHEN  'AAA'.
             IF P_CK <> 'X'.
                SCREEN-input = 0.
             else.
                SCREEN-input = 1.
             ENDIF.
         ENDCASE.
         modify screen.
    ENDLOOP.

Regards Rk

Former Member
0 Kudos

<b>use at selection screen output event

loop at screen

if screen-name = 'Parameter name'.

screeninput = 0.

endif.

modify screen.

endloop.

this will disable the parameter and once the checkbox is checed

write down another code if checkbx is checked.

if chk_box = 'x'.

loop at screen

if screen-name = 'Parameter name'.

screeninput = 1.

endif.

modify screen.

endloop.

endif..

both should be in at selection screen output only.</b>

0 Kudos

Hi, the checkbox is disabled, it is impossible to change its value. But the point is how to retrieve this value via VBA?