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 buttons in report programing

Former Member
0 Likes
2,045

Hello Experts,

I have few requirement in my program

In radio button group by default the first radio button is selected , i want none of the radio buttons should be selected.

Please tell me any solution for that code snippet would be appreciated.

Thanks in advance.

10 REPLIES 10
Read only

Former Member
0 Likes
1,238

hi

i radio button group it is mandatory to select any one from them as default ,

other wise u cannot define them in group,

check box is there for same as required.

reward if helpful.

Read only

Former Member
0 Likes
1,238

Hi,

There will be a radiobutton selected by default. What is the requirement to have both the radiobuttons unselected? If u are fetching some data on the basis of radiobutton values and if u want to fetch the data when one of them is checked, then simply dont include them in the selection criteria.

Thank you.

Reward points if found useful.

Read only

Former Member
0 Likes
1,238

Hi Sachin,

Atleast One radio button should be selected in group and u can select any one of the radio button in the group by default.

Regards

Nani

Read only

Former Member
0 Likes
1,238

Hi,

For ur requirement I jus tried bthis below code n it works fine.

PARAMETERS: radbut1 RADIOBUTTON GROUP rad1 DEFAULT 'X',

radbut2 RADIOBUTTON GROUP rad1,

radbut3 RADIOBUTTON GROUP rad1,

radbut4 RADIOBUTTON GROUP rad1.

AT SELECTION-SCREEN OUTPUT.

IF radbut1 = 'X'.

LOOP AT SCREEN.

IF screen-name = 'RADBUT2'.

CLEAR radbut2.

screen-input = 0.

MODIFY SCREEN.

ELSEIF screen-name = 'RADBUT3'.

CLEAR radbut3.

screen-input = 0.

MODIFY SCREEN.

ELSEIF screen-name = 'RADBUT4'.

CLEAR radbut4.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Do execute this code n if u still ve doubts, u can always revert back.

Hope this helps u...

Regards,

Ramya

Read only

0 Likes
1,238

Thank you for ur concern but I want on selection of a particular radio button other group of radio button should be disabled.

Read only

0 Likes
1,238

Hi,

I used here parameters but as per your req change the code:

selection-screen : begin of block b1 with frame no intervals.

parameter : p_plant radiobutton group g1 user-command radio default 'X',

p_mrp radiobutton group g1.

selection-screen end of block b1.

selection-screen begin of block b2 with frame no intervals.

parameter : p_werks type marc-werks modif id sp1.

parameter : p_berid type smdma-berid modif id sp2.

selection-screen end of block b2.

at selection-screen output.

loop at screen.

check screen-group1 = 'SP1' or

screen-group1 = 'SP2'.

if p_plant = 'X'.

if screen-group1 = 'SP2'.

screen-input = 0.

screen-invisible = 0.

screen-required = 1.

modify screen.

endif.

else.

if screen-group1 = 'SP1'.

screen-input = 0.

screen-invisible = 0.

screen-required = 1.

modify screen.

endif.

endif.

endloop.

Regards,

Raghu

Read only

0 Likes
1,238

HI,

try this code.


selection-screen : begin of block b1 with frame no intervals.
parameter : r_enable radiobutton group g1 user-command ucom1
            default 'X',
r_disabl radiobutton group g1.
selection-screen end of block b1.

selection-screen begin of block b2 with frame no intervals.
parameter : r3 radiobutton group g2 user-command ucom2 default 'X'
            MODIF ID mod,
r4 radiobutton group g2 MODIF ID mod.
selection-screen end of block b2.

at selection-screen output.

IF r_enable = 'X'.
  loop at screen.
     if screen-group1 = 'MOD'.
       screen-active = 1.
       modify screen.
     endif.
   endloop.
else.
  loop at screen.
     if screen-group1 = 'MOD'.
       screen-active = 0.
       modify screen.
     endif.
  endloop.
ENDIF.

rgds,

bharat.

Read only

Former Member
0 Likes
1,238

Hi Satyamkumar,

If u want tht code to work on the selection of a particular radiobutton(say radbut1) then do remove the "default" for

the first radiobutton n try the code.

On clicking the first radio button all other radiobuttons will

get disabled.

hope this is clear.

Regards,

Ramya

Read only

Former Member
0 Likes
1,238

try this.

PARAMETERS: pa_1 RADIOBUTTON GROUP rad1 USER-COMMAND abc,

pa_2 RADIOBUTTON GROUP rad1,

pa_3 RADIOBUTTON GROUP rad1.

at selection-screen OUTPUT.

case 'X'.

when pa_1.

loop at screen.

if screen-name = 'PA_2' OR screen-name = 'PA_3'.

screen-input = 0.

*screen-output = 1.

*screen-active = 0.

modify screen.

endif.

endloop.

when pa_2.

loop at screen.

if screen-name = 'PA_1' OR screen-name = 'PA_3'.

screen-input = '0'.

*screen-output = '0'.

*screen-active = '0'.

modify screen.

endif.

endloop.

when pa_3.

loop at screen.

if screen-name = 'PA_2' OR screen-name = 'PA_1'.

screen-input = 0.

*screen-active = 0.

*screen-output = 0.

modify screen.

endif.

endloop.

endcase.

hope it gives some idea.

Read only

Former Member
0 Likes
1,238

Hi,

If you have a group radio buttons assigned to one group, at any given point of time you will be able to select only one radio button.

Thanks,

Sriram Ponna.