Application Development 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: 

set a particular radio button checked rather than default in screen painter

Former Member
0 Kudos

Hi all,

Here is my code for selecting one transaction when clicking one of the two radio buttons.

Here the first radio button is selected defaultly during execution.

My requirement is 2nd radio button should be selected,

How can i do this? Can any one help me??

REPORT ZCHINNI_28_SCREEN MESSAGE-ID zchinni_msg.

data : a type c, b type c , user type sy-ucomm, N1 TYPE STRING.

call screen 3100 .

MODULE STATUS_3100 OUTPUT.

SET PF-STATUS 'MENU'.

SET TITLEBAR 'TITLEBAR'.

CASE user.

WHEN 'FILE'.

LEAVE PROGRAM.

WHEN 'EDIT'.

MESSAGE i000.

WHEN 'GOTO'.

MESSAGE I002.

LEAVE PROGRAM.

WHEN 'HELP'.

MESSAGE I003.

when 'BACK'.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE.

MODULE USER_COMMAND_3100 INPUT.

case USER.

when 'CLICK'.

IF A = 'X'.

call TRANSACTION 'SE38'.

ELSE.

CALL TRANSACTION 'SE80'.

ENDIF.

ENDCASE.

ENDMODULE.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hiiii

for default it will automatically set selected radio button for 1st radiobutton only..

if you want to have selected as 2nd radiobutton when screen is displayed use following code it will solve this issue..

initialization.

 if p_rad1 = 'X'.
    p_rad1 = ' '.
    p_rad2 = 'X'.
  endif.

regards

twinkal

2 REPLIES 2

Former Member
0 Kudos

hiiii

for default it will automatically set selected radio button for 1st radiobutton only..

if you want to have selected as 2nd radiobutton when screen is displayed use following code it will solve this issue..

initialization.

 if p_rad1 = 'X'.
    p_rad1 = ' '.
    p_rad2 = 'X'.
  endif.

regards

twinkal

Former Member
0 Kudos

thx