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: 

Simple Check box query

Former Member
0 Kudos
137

Hiii

i had a query i have two check boxes if i select one then second must be gray if i nselect second one first must me disabled

please send me the dummy code

thanx in advance

Regards

hitesh

6 REPLIES 6

Former Member
0 Kudos
63

hi,

As per your requirement, you have to use radiobutton,

so that at a time u can select only one of it.

Because check boxes are used for multiple selection.

thanks

Dharmishta

Former Member
0 Kudos
63

hi Hitesh,

i am sending dummy code here..

according to ur req.

u change this code and use it.

This code should be written under AT Selection-screen output Event.

and i think u need to use Radio buttons for ur req. instead of Check boxes for selecting.

&----


*& Form modify_screen

&----


  • text

----


form modify_screen .

**Modify the screen

loop at screen.

if p_bdc = c_x.

if screen-name = 'P_SESSN' or screen-name = '%_P_SESSN_%_APP_%-TEXT'.

screen-active = '1'.

endif.

else.

if screen-name = 'P_SESSN' or screen-name = '%_P_SESSN_%_APP_%-TEXT'.

screen-active = '0'.

endif.

endif.

modify screen.

endloop.

endform.

<b>Reward points if useful </b>

Cheers,

Chandra

Message was edited by:

Chandra

Former Member
0 Kudos
63

Hi,

User command for check box as given below

PARAMETERS: p_alvrep as checkbox default ' ' user-command check, "for detail report.

at selection-screen output.

loop at screen.

if screen-name = 'S_REGION-LOW'.

if p_alvrep = 'X'.

screen-ACTIVE = 0.

refresh S_REGION.

else.

screen-ACTIVE = 1.

endif.

modify screen.

endif.

endloop.

Former Member
0 Kudos
63

Hi,

Check this out, this query was asked for radio button, and Seshu and Jonathan have give the solution.....

If your problem is solved reward point to Jonathan / Seshu Maram....

Former Member
0 Kudos
63

Hi,

check the below code:---

Rb_cost & rb_price are the radio button & cb_sanka & cb_sanfe are the check box.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF RB_COST = ' '.

IF screen-name = 'CB_SANKA'.

SCREEN-input = '0'.

ELSEIF SCREEN-NAME = 'CB_SANFE' .

SCREEN-input = '1'.

ENDIF.

ELSE.

IF screen-name = 'CB_SANKA'.

SCREEN-input = '1'.

ELSEIF SCREEN-NAME = 'CB_SANFE' .

SCREEN-input = '0'.

ENDIF.

ENDIF.

Modify screen.

ENDLOOP.

former_member188827
Active Contributor
0 Kudos
63

PARAMETERS: zc1 as CHECKBOX MODIF ID z1 , zc2 as CHECKBOX modif id z2.

at SELECTION-SCREEN output.

if zc1 = 'X'.

loop AT SCREEN.

if screen-group1 = 'Z2'.

screen-input = 0.

MODIFY SCREEN.

endif.

endloop.

ELSEIF zc2 = 'X'.

loop AT SCREEN.

if screen-group1 = 'Z1'.

screen-input = 0.

MODIFY SCREEN.

endif.

endloop.

endif.

after checking a check box, hit enter,other 'll b grayed..