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

Radiobuttons without default value

bernhard_fr
Explorer
0 Likes
3,717

Hi community!

Is it possible to define a radiobutton-group with no default value? I want 3 radiobuttons and no button should have been marked.

When I do not use the appendix default 'X' automatically the first button is the default value.

Thanks a lot!

Regards,

Bernhard

Message was edited by:

Bernhard Frey

7 REPLIES 7
Read only

anversha_s
Active Contributor
0 Likes
1,650

hi,

no its not possible.

Other wise u have to use Check box for this.

in radio button not possible.

rgs

anver

Read only

Former Member
0 Likes
1,650

HI,

You cant define the radiobutton without a default value. Even if you dont mention any default it automatically takes the first button as default.

-Priyanka.

Read only

Former Member
0 Likes
1,650

sorry you cannot define that.

if you are not specifying default value for any radio button then 1st radiobutton of this group will be display s marked.

regards

shiba dutta

Read only

Former Member
0 Likes
1,650

hi Bernhard,

i think there is no procedure to disable the default value of a radiobutton group.

but i can give u a suggesstion.

instead of using 3 radiobuttons, use 4 radiobuttons, make the first one default and use NO DISPLAY.

i think that will show the other 3 radiobuttons selected none.

thx

pavan

Read only

0 Likes
1,650

I TRIED THE FOLLOWING CODE bt it doesnt worked so u can not do that .here is the code for ur assurance and no-display option can not be used with radiobuttons with group..

parameters: p_rad1 radiobutton group AB ,

p_rad2 radiobutton group AB,

p_rad3 radiobutton group AB,

P_RAD4 RADIOBUTTON GROUP AB MODIF ID ABC DEFAULT 'X'.

initialization .

p_rad1 = p_rad2 = p_rad3 = SPACE.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN .

IF P_RAD4 = 'X'.

IF SCREEN-GROUP1 EQ 'ABC'.

SCREEN-INVISIBLE = 1.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

Read only

Former Member
0 Likes
1,650

Hi,

With the below code the checkbox functions similer to the radiobutton functionality. and we can uncheck all of them.

If we disable, the user cant reselect the checkbox again.

Hope the bellow this will be helpful.

PARAMETERS: a AS CHECKBOX USER-COMMAND chk,

b AS CHECKBOX USER-COMMAND chk1,

c AS CHECKBOX USER-COMMAND chk3.

AT SELECTION-SCREEN.

IF a = space AND b = space AND c = space.

EXIT.

ENDIF.

IF sy-ucomm = 'CHK'.

IF a = 'X' .

CLEAR: b, c.

ENDIF.

ENDIF.

IF sy-ucomm = 'CHK1'.

IF b = 'X' .

CLEAR: a, c.

ENDIF.

ENDIF.

IF sy-ucomm = 'CHK3'.

IF c = 'X' .

CLEAR: a, b.

ENDIF.

ENDIF.

Regards,

vasavi.K

Read only

Former Member
0 Likes
1,650
parameters : r0 radiobutton group rad1 user-command c1 ,
             r1 radiobutton group rad1 ,
             r2 radiobutton group rad1 ,
             r3 radiobutton group rad1 .

             at selection-screen on radiobutton group rad1. "on radiobutton group
             loop at screen.
             if screen-group1 = 'C1'.
             screen-invisible = 1.
             modify screen.
             endif.
             endloop.

No this is not giving a hit. It is not possible to trigger a radiobutton group without a default value .

may be the design is not allowning me to do or capture that event . cant get a hand on that criteria.

i think in that option u can go for Check box event and disable the other two check boxes like that stuff in the logic itself as .

if c2 = 'X' clear c1 and c3 .

regards,

vijay