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: 

enable check box

Former Member
0 Kudos

Hi ,

I have two check boxes (P_box1 , P-box2).

If i Enable box2 should be in Inactive mode.

If i disable box2 box1 should be active mode.

I wrote my code like this .But its not working

AT SELECTION-SCREEN OUTPUT.

if P_box2 = 'x'.

LOOP AT SCREEN.

if screen-name = 'P_BOX1'.

screen-input = '0'.

modify screen.

endif.

endloop.

*

elseif P_box2b = ' '.

LOOP AT SCREEN.

if screen-name = 'P_BOX1'.

screen-input = '1'.

modify screen.

endif.

endloop.

ENDIF.

Cany any help me in this issue ?

Thanks

3 REPLIES 3

Former Member
0 Kudos

It does not look to be wrong but would be helpful if you give more details as to what is incorrect !!

Regards

Anurag

laxmanakumar_appana
Active Contributor
0 Kudos

Hi,

Check this code :

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF P_BOX2 = 'X'.

IF screen-name = 'P_BOX2'.

screen-input = '0'.

modify screen.

endif.

IF screen-name = 'P_BOX1'.

screen-input = '1'.

modify screen.

endif.

ENDIF.

IF P_BOX1 = 'X'.

IF screen-name = 'P_BOX2'.

screen-input = '1'.

modify screen.

endif.

IF screen-name = 'P_BOX1'.

screen-input = '0'.

modify screen.

endif.

ENDIF.

endloop.

Regards

Appana

Former Member
0 Kudos

hi

good

without giving in the if statement use the same statement in the case ...endcase statement,it will work fine.

this

if screen-name = 'P_BOX1'.

screen-input = '0'.

modify screen.

endif.

endloop.

*

elseif P_box2b = ' '.

LOOP AT SCREEN.

statement

you use under the case ...endcase statement.

thnaks

mrutyun