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

radio button...

Former Member
0 Likes
951

if you hav 2 radiobuttons in output.how to deactivate one radiobutton when clicking the other one?is there any syntax? points wil b rewarded...urgent...

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
928

Hi..

this will solve your problem..Just Paste this code.

<b>parameters: p_r1 radiobutton group gr1 modif id RD1 USER-COMMAND ucomm,

p_r2 radiobutton group gr1 modif id RD2 default 'X'.

at selection-screen output.

loop at screen.

if p_r1 = 'X'.

if screen-group1 = 'RD2'.

SCREEN-INPUT = 0.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDLOOP.</b>

8 REPLIES 8
Read only

Former Member
0 Likes
928

Why do you want to decativate the other?

If you group them under same group, then you don't need to bother about habdling themm.

parameters: p_rb1 type xfeld radiobutton group RB1,
            p_rb2 type xfeld radiobutton group RB1.

If you choose one, then the other will auotomatically deselected(Not deactivated).

Regards,

Ravi

Read only

0 Likes
928

if they are declred with different groups then how to handle....?

Read only

0 Likes
928

Hi Sunil,

Try this code:

parameters: p_rb1 type xfeld radiobutton group RB1 user-command UC1,
            p_rb2 type xfeld radiobutton group RB1.

parameters: p_rb3 type xfeld radiobutton group RB2 modif id GR2,
            p_rb4 type xfeld radiobutton group RB2 modif id GR2.

at selection-screen output.
if p_rb1 = 'X'.
loop at screen.
if screen-group1 = 'GR2'.
screen-input = 0.
modify screen.
endif.
endloop.
endif.

Regards,

Ravi

Read only

Former Member
0 Likes
928

hi

<b>If you activate one radiobutton it is not necessary to deactivate

the other radiobuttons in this group; this is done automatically.

For example

Set [Documentation] "X"

in transaction SE38 would deactivate the other radiobuttons

[Source], [Variants], [Attributs],

[Text elements].</b>

regards

ravish

<b>plz reward if helpful</b>

Read only

Former Member
0 Likes
928

Hi,

PARAMETERS: P_UNIX RADIOBUTTON GROUP RAD1 DEFAULT 'X',

P_LOCALD RADIOBUTTON GROUP RAD1.

the radio button is selected if the value of parameter is 'X;. otherwise it is not slected.

Regards,

Kalyani

Read only

0 Likes
928

Hi,

see the code...

PARAMETERS: p_a RADIOBUTTON GROUP rad1 DEFAULT 'X',

p_b RADIOBUTTON GROUP rad1.

they both belong to same group so no need to deactivate it manually it will be done automatically.

reward points if helpfull...

regards,

santosh

Read only

Former Member
0 Likes
928

Hi,

No need to deactivate for radio button when you select one of radio button.

You can group all the radio buttons.

Please try this.


parameters: p_rb1 radiobutton group rb1,
            p_rb2 radiobutton group rb1 default 'X',
            p_rb3 radiobutton group rb1.

parameters: p_rb4 radiobutton group rb2,
            p_rb5 radiobutton group rb2,
            p_rb6 radiobutton group rb2 default 'X'.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
929

Hi..

this will solve your problem..Just Paste this code.

<b>parameters: p_r1 radiobutton group gr1 modif id RD1 USER-COMMAND ucomm,

p_r2 radiobutton group gr1 modif id RD2 default 'X'.

at selection-screen output.

loop at screen.

if p_r1 = 'X'.

if screen-group1 = 'RD2'.

SCREEN-INPUT = 0.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDLOOP.</b>