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

regarding selection screen

Former Member
0 Likes
679

hi,

i have 4 radio buttons in my selection screen.

ex 1,2,3,4.

i want to click if 1 , then 3 should automatically active state,

same when i click radiobutton 2, 4 will come.

how to do this ....???

please help,

yours regards

subhasis

5 REPLIES 5
Read only

vinod_vemuru2
Active Contributor
0 Likes
650

Hi Subhashis,

If your radio buttons is in the same group then u cant do this. Because in one group u can select only one radio button at any time.

If first 2 are in group1 and last 2 are in group2 then U can do like this. Copy paste this code in ur system and check the functionality.

SELECTION-SCREEN: BEGIN OF BLOCK BLK1 WITH FRAME.

PARAMETER: P_RADIO1 RADIOBUTTON GROUP GRP1 USER-COMMAND ucomm DEFAULT 'X',

P_RADIO2 RADIOBUTTON GROUP GRP1.

SELECTION-SCREEN: END OF BLOCK BLK1.

SELECTION-SCREEN: BEGIN OF BLOCK BLK2 WITH FRAME.

PARAMETER: P_RADIO3 RADIOBUTTON GROUP GRP2 USER-COMMAND ucomm,

P_RADIO4 RADIOBUTTON GROUP GRP2.

SELECTION-SCREEN: END OF BLOCK BLK2.

AT SELECTION-SCREEN OUTPUT.

IF p_radio1 EQ 'X'.

CLEAR: p_radio4.

p_radio3 = 'X'.

ELSEIF p_radio2 EQ 'X'.

CLEAR: p_radio3.

p_radio4 = 'X'.

ENDIF.

thanks,

Vinod.

Read only

Former Member
0 Likes
650

hi,

Try this code.



SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME.
PARAMETER: p_radio1 RADIOBUTTON GROUP grp1 USER-COMMAND ucomm1 DEFAULT
'X',
p_radio2 RADIOBUTTON GROUP grp1 .
SELECTION-SCREEN: END OF BLOCK b1.

SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME.
PARAMETER: p_radio3 RADIOBUTTON GROUP grp2 ,
p_radio4 RADIOBUTTON GROUP grp2.
SELECTION-SCREEN: END OF BLOCK b2.

AT SELECTION-SCREEN.

  IF p_radio1 = 'X'.
    CLEAR p_radio4.
    p_radio3 = 'X'.
  ELSE.
    IF p_radio2 = 'X'.
      CLEAR p_radio3.
      p_radio4 = 'X'.
    ENDIF.
  ENDIF.

Read only

Former Member
0 Likes
650

Hi,

Radio buttons can work under group.

if all the four radio buttons are created in one group then we can't achieve your reqirement.

see when we go for radio button?

if we want to select a particular branch or particular area like suppose you are book one flight ticket.

now you have two radio buttions.

one is one way trip

and another one is round trip.

if you select round trip then you will not get this one way trip.

that will gray out.

like this the radio buttions will work under one group.

regards,

swami.

Read only

Former Member
0 Likes
650

hi

SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME.

PARAMETER: p_radio1 RADIOBUTTON GROUP grp1 USER-COMMAND ucomm1 DEFAULT

'X',

p_radio2 RADIOBUTTON GROUP grp1 .

SELECTION-SCREEN: END OF BLOCK b1.

SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME.

PARAMETER: p_radio3 RADIOBUTTON GROUP grp2 ,

p_radio4 RADIOBUTTON GROUP grp2.

SELECTION-SCREEN: END OF BLOCK b2.

AT SELECTION-SCREEN.

IF p_radio1 = 'X'.

CLEAR p_radio4.

p_radio3 = 'X'.

ELSE.

IF p_radio2 = 'X'.

CLEAR p_radio3.

p_radio4 = 'X'.

ENDIF.

ENDIF.

reward if useful

Read only

Former Member
0 Likes
650

This message was moderated.