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

From Selection Screen to Next screen

Former Member
0 Likes
1,190

Hi Experts

I have 3 radio buttons in selection screen, I want to go to next scree if first radio button is clicked and to second screen if 2nd radio button is clicked and to third screen if third radio button is click.

pls help me out by saying how this can be done

Thanx in Advance

Regards

Rachel

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
1,139

you can code in at selection screen event.


if rd_1 = 'X'.
call screen 1.
elseif rd_2 = 'X'.
call screen 2.
else if rd_3 = 'X'.
call screen 3.

9 REPLIES 9
Read only

former_member156446
Active Contributor
0 Likes
1,140

you can code in at selection screen event.


if rd_1 = 'X'.
call screen 1.
elseif rd_2 = 'X'.
call screen 2.
else if rd_3 = 'X'.
call screen 3.

Read only

0 Likes
1,139

thanx for responding ...

i included like what u said, but its throwing me a runtime error, instead of taking me to next screen.

Read only

Former Member
0 Likes
1,139

use this

AT SELECTION-SCREEN OUTPUT. event

if Radio1= 'X'

u can use call screen, leave to screen

endif.

Regards

priya

Read only

GauthamV
Active Contributor
0 Likes
1,139

hi,

create a program with 3 radiobuttons.

then create a modulepool program with 3 screens say 200,300,400.

now in ur program do like this.

if radiobutton1 = 'x'.

call screen 200.

endif.

if radiobutton2 = 'x'.

call screen 300.

endif.if radiobutton3 = 'x'.

call screen 400.

endif.

reward if hlpful.

Read only

Former Member
0 Likes
1,139

try this :

start of selection .

if r1 = 'X'.

Call screen 100.

elseif r2 = 'X'

call screen 200.

elseif r3 = 'X'.

call screen 300.

endif.

reward if usefull.

Read only

Former Member
0 Likes
1,139

Hi,

u can use call screen in this regard

use this at selection screen event

if radio_button1='X'

call screen 1

and like this u can use n number of screens

Read only

Former Member
0 Likes
1,139

Hi,

Follow the code. It will help you....

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

PARAMETERS: RAD1 RADIOBUTTON GROUP RAD DEFAULT 'X',

RAD2 RADIOBUTTON GROUP RAD,

RAD3 RADIOBUTTON GROUP RAD.

SELECTION-SCREEN END OF BLOCK B1.

*AT SELECTION-SCREEN OUTPUT.

  • LOOP AT SCREEN.

*

  • ENDLOOP.

START-OF-SELECTION.

IF RAD1 EQ 'X'.

CALL SCREEN 201.

ELSE.

IF RAD2 EQ 'X'.

CALL SCREEN 202.

ELSE.

CALL SCREEN 203.

ENDIF.

ENDIF.

&----


*& Module STATUS_0201 OUTPUT

&----


  • text

----


MODULE STATUS_0201 OUTPUT.

SET PF-STATUS 'STAT201'.

  • SET TITLEBAR 'xxx'.

ENDMODULE. " STATUS_0201 OUTPUT

&----


*& Module USER_COMMAND_0201 INPUT

&----


  • text

----


MODULE USER_COMMAND_0201 INPUT.

CASE SY-UCOMM.

WHEN 'BACK'.

LEAVE TO SCREEN 0.

ENDCASE.

ENDMODULE. " USER_COMMAND_0201 INPUT

&----


*& Module STATUS_0202 OUTPUT

&----


  • text

----


MODULE STATUS_0202 OUTPUT.

SET PF-STATUS 'STAT202'.

  • SET TITLEBAR 'xxx'.

ENDMODULE. " STATUS_0202 OUTPUT

&----


*& Module USER_COMMAND_0202 INPUT

&----


  • text

----


MODULE USER_COMMAND_0202 INPUT.

CASE SY-UCOMM.

WHEN 'BACK'.

LEAVE TO SCREEN 0.

ENDCASE.

ENDMODULE. " USER_COMMAND_0202 INPUT

&----


*& Module STATUS_0203 OUTPUT

&----


  • text

----


MODULE STATUS_0203 OUTPUT.

SET PF-STATUS 'STAT203'.

  • SET TITLEBAR 'xxx'.

ENDMODULE. " STATUS_0203 OUTPUT

&----


*& Module USER_COMMAND_0203 INPUT

&----


  • text

----


MODULE USER_COMMAND_0203 INPUT.

CASE SY-UCOMM.

WHEN 'BACK'.

LEAVE TO SCREEN 0.

ENDCASE.

ENDMODULE. " USER_COMMAND_0203 INPUT

Read only

0 Likes
1,139

hi nitya

thanx alot. my question is solved.

Regards

Rachel

Read only

Former Member
0 Likes
1,139

Hi,

in selection screen u have 3 radio button for eg r1 r2 r3 and u have 3 screen 100 200 300....

if r1 = 'X'.

call screen = '100'.

elseif r2 = 'x'.

call screen = '200'.

elseif.

call screen = ''300..

elseif.

if sy-subrc <> 0.

exit.

endif.

regard

dhaya..