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

CHECKBOX

Former Member
0 Likes
1,046

HI ALL

am taking the 3 checkbox as shown below

PARAMETERS:A AS CHECKBOX.

PARAMETERS:B AS CHECKBOX.

PARMETERS:C AS CHECKBOX.

and after dis am writing the code as

IF A = 'X'.

CODE

ELSEIF B = 'X'

CODE

ELSEIF C = 'X'

CODE

ENDIF.

So the output is coming but i want to select only one of the checkbox but when am selecting all the checkboxes it is getting selected...please help me in telling me how to select only one check box

with regards

vijay

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,008

hi,

instead of using checkbox use radiobuttons in parameters.

PARAMETERS:A radiobutton group r1.

PARAMETERS:B radiobutton group r1.

PARAMETERS:C radiobutton group r1.

IF A = 'X'.

CODE

ELSEIF B = 'X'

CODE

ELSEIF C = 'X'

CODE

ENDIF.

reward with points if helpful

Message was edited by:

Vinutha YV

9 REPLIES 9
Read only

Former Member
0 Likes
1,008

Hello Vijay,

Instead of check box you can use Radiobuttons.

REgards,

Vasanth

Read only

Former Member
0 Likes
1,008

use radiobuttons

PARAMETERS:A radiobutton group rad user-command abc.
PARAMETERS:B radiobutton group rad
PARMETERS:C radiobutton group rad.

Read only

Former Member
0 Likes
1,008

If ur writing IF..ELSEIF...ENDIF.

then take radio buttons instead of checkbox.

Read only

Former Member
0 Likes
1,008

sorry i am not enough clear about your query you can use radio button instead of check box..

PARAMETERS: A radiobutton group rb1,

b radiobutton group rb1,

c radiobutton group rb1.

IF A = 'X'.

CODE

ELSEIF B = 'X'

CODE

ELSEIF C = 'X'

CODE

ENDIF.

regards

shiba dutta

Read only

Former Member
0 Likes
1,008

Hi Vijay,

Instead of that you can use radiobutton.

Parameters : A radiobutton group zig,

B radiobutton group zig,

C radiobutton group zig.

IF A = 'X'.

CODE.

ELSEIF B = 'X'.

CODE.

ELSEIF C ='X'.

CODE.

ENDIF.

Reward for useful answers.

Read only

Former Member
0 Likes
1,008

In your case if you want ot select only one then please use radiobutton instead of a check bos..

use systam:

Paramters: a as radiobutton group xyz.

here xyz is the group name given ... and please keep all the radiobutton in the same group for selecting only one radiobutton..../

Read only

Former Member
0 Likes
1,008

hh

Read only

Former Member
0 Likes
1,009

hi,

instead of using checkbox use radiobuttons in parameters.

PARAMETERS:A radiobutton group r1.

PARAMETERS:B radiobutton group r1.

PARAMETERS:C radiobutton group r1.

IF A = 'X'.

CODE

ELSEIF B = 'X'

CODE

ELSEIF C = 'X'

CODE

ENDIF.

reward with points if helpful

Message was edited by:

Vinutha YV

Read only

Former Member
0 Likes
1,008

Hi,

chk this..

PARAMETERS: chk1 AS CHECKBOX USER-COMMAND chk1,

chk2 AS CHECKBOX USER-COMMAND chk2,

chk3 AS CHECKBOX USER-COMMAND chk3.

AT SELECTION-SCREEN.

CASE sy-ucomm.

WHEN 'CHK1'.

chk1 = 'X'.

chk2 = ' '.

chk3 = ' '.

WHEN 'CHK2'.

chk1 = ' '.

chk2 = 'X'.

chk3 = ' '.

WHEN 'CHK3'.

chk1 = ' '.

chk2 = ' '.

chk3 = 'X'.

ENDCASE.