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: 

problem on selection screen.

Former Member
0 Kudos

Hi all,

There are 3 radio buttons on selection screen for diff purpose. according to selection on radio button and after pressing exuc it display some data or do some perform rutine . how'll i do that. plz help me.

goutam

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Goutam,

Try this.

REPORT EVENT_DEMO.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.

PARAMETERS: R1 RADIOBUTTON GROUP RAD1 DEFAULT 'X',

R2 RADIOBUTTON GROUP RAD1,

R3 RADIOBUTTON GROUP RAD1.

SELECTION-SCREEN END OF BLOCK B1.

start-of-selection.

IF R1 = 'x'.

PERFORM P1.

ELSEIF R2 = 'x'.

PERFORM P2.

ELSE.

PERFORM P3.

ENDIF.

Regards,

Ravi

Note : Please mark the helpful answers

4 REPLIES 4

Former Member
0 Kudos

Goutam,

Try this.

REPORT EVENT_DEMO.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.

PARAMETERS: R1 RADIOBUTTON GROUP RAD1 DEFAULT 'X',

R2 RADIOBUTTON GROUP RAD1,

R3 RADIOBUTTON GROUP RAD1.

SELECTION-SCREEN END OF BLOCK B1.

start-of-selection.

IF R1 = 'x'.

PERFORM P1.

ELSEIF R2 = 'x'.

PERFORM P2.

ELSE.

PERFORM P3.

ENDIF.

Regards,

Ravi

Note : Please mark the helpful answers

Former Member
0 Kudos

Hi Gautam

You can do this using CASE...ENDCASE statementi in AT SELECTION_SCREEN event

do the coding as

AT SELECTION-SCREEN

CASE "GNAME".

WHEN 'R1'.

do processing

WHEN 'R2'.

do processing

WHEN 'R3'.

do processing

ENDCASE.

I hope this is what you want.

Thanks

Former Member
0 Kudos

hi

good

go through this code and do the changes as per your requirements.

DATA: radio1(1) TYPE c, radio2(1) TYPE c, radio3(1) TYPE c,

field1(10) TYPE c, field2(10) TYPE c, field3(10) TYPE c,

box TYPE c.

DATA: ok_code TYPE sy-ucomm,

save_ok TYPE sy-ucomm.

CALL SCREEN 100.

MODULE user_command_0100 INPUT.

save_ok = ok_code.

CLEAR ok_code.

CASE save_ok.

WHEN 'RADIO'.

IF radio1 = 'X'.

field1 = 'Selected!'.

CLEAR: field2, field3.

ELSEIF radio2 = 'X'.

field2 = 'Selected!'.

CLEAR: field1, field3.

ELSEIF radio3 = 'X'.

field3 = 'Selected!'.

CLEAR: field1, field2.

ENDIF.

WHEN 'CANCEL'.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE.

thanks

mrutyun

Former Member
0 Kudos

Hi,

just declare the Radio buttons,

PARAMETERS: R1 RADIOBUTTON GROUP RAD1,
            R2 RADIOBUTTON GROUP RAD1,
            R3 RADIOBUTTON GROUP RAD1.

in the selection screen, if you select any radiobutton, then that will become 'X'

write your logic accoding to your requirment like.

IF R1 = 'X'.
  write your logic
ELSEIF R2 = 'X'.
  write your logic
ELSEIF R3 = 'X'.
 write your logic
ENDIF.

Thanks

Sudheer