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

Deactivating a Radiobutton based on a value in a parameter

Former Member
0 Likes
671

Hi all,

I have a parameter for company code.

Based on the value in the comapny code i have to make one of the three radiobutton of the same group to be inactive.

Is there any ways to do it.

Thanks,

Gokul

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
652

go to in the dynpro, and assing a group name at your radiobutton... ( ex. grop1 = G1 )

(one group different for each radiobutton)

and after manage like the follow:

process before output:

if your condition is true.

loop at screen.

if screen-group1 = 'G1' .

screen-input = 0.

modify screen.

endloop.

endif.

Hi all,

I have a parameter for company code.

Based on the value in the comapny code i have to make one of the three radiobutton of the same group to be inactive.

Is there any ways to do it.

Thanks,

Gokul

4 REPLIES 4
Read only

Former Member
0 Likes
653

go to in the dynpro, and assing a group name at your radiobutton... ( ex. grop1 = G1 )

(one group different for each radiobutton)

and after manage like the follow:

process before output:

if your condition is true.

loop at screen.

if screen-group1 = 'G1' .

screen-input = 0.

modify screen.

endloop.

endif.

Read only

Former Member
0 Likes
652

Hi Gokul,

We cannot get this scenario. Instead go for checkboxes rather than radio buttons. Because radio buttons will be operated as a group, where as checkboxes can be operated individually in the SCREEN table. And I am sure you can get the functionality you desire with the checkboxes.

Regards,

Swapna.

Read only

Mohamed_Mukhtar
Active Contributor
0 Likes
652

Hi,

Try in this way,

PARAMETERS : p_bukrs TYPE t001-bukrs ,
             r1 RADIOBUTTON GROUP gr1 MODIF ID m1 DEFAULT 'X',
             r2 RADIOBUTTON GROUP gr1 MODIF ID m2  ,
             r3 RADIOBUTTON GROUP gr1 MODIF ID m3  .

AT SELECTION-SCREEN OUTPUT.

  IF p_bukrs = 0001.
    LOOP AT SCREEN.
      IF screen-group1 = 'M2'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.

Thanks & Regards

Read only

Former Member
0 Likes
652

Hi,

Say you have declared the radiobuttons as below.

parameters: r1_obj_l radiobutton group g1 user-command prm default 'X',

r1_dvcls radiobutton group g1,

r1_obj_t radiobutton group g1,

r1_tl radiobutton group g1,

r1_obj_c radiobutton group g1.

The logic to inactivate the code is below( For the first radio button declared ).

loop at screen.

if screen-name = 'r1_obj_l'.

screen-input = 0.

Modify screen.

endif.

endloop.

Regards,

Murthy.