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

doubt in selection screens

Former Member
0 Likes
839

Hi

In first selection screen i have 2 radio buttons if i click one radio button and execute it should got to another selection screen in that i should have two select option. guide me with some code.

Regards

sahiti

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
820

HI,

call like this.


TABLES:mara.

PARAMETERS:r1 RADIOBUTTON GROUP rad USER-COMMAND ucom,
           r2 RADIOBUTTON GROUP rad.

SELECTION-SCREEN BEGIN OF SCREEN 2000.
  SELECT-OPTIONS:s_mat for mara-matnr,
                 s_mtyp for mara-mtart.
SELECTION-SCREEN END OF SCREEN 2000.

AT SELECTION-SCREEN ON RADIOBUTTON GROUP rad.

IF r1 = 'X'.
  CALL SELECTION-SCREEN 2000.
ENDIF.

START-OF-selection.

write:/ s_mat-low.

rgds,

bharat.

Hi

In first selection screen i have 2 radio buttons if i click one radio button and execute it should got to another selection screen in that i should have two select option. guide me with some code.

Regards

sahiti

5 REPLIES 5
Read only

Former Member
0 Likes
820

I think Only one selection screen at time is possible.

For ur requirement Choose module pool programming.

Read only

Former Member
0 Likes
821

HI,

call like this.


TABLES:mara.

PARAMETERS:r1 RADIOBUTTON GROUP rad USER-COMMAND ucom,
           r2 RADIOBUTTON GROUP rad.

SELECTION-SCREEN BEGIN OF SCREEN 2000.
  SELECT-OPTIONS:s_mat for mara-matnr,
                 s_mtyp for mara-mtart.
SELECTION-SCREEN END OF SCREEN 2000.

AT SELECTION-SCREEN ON RADIOBUTTON GROUP rad.

IF r1 = 'X'.
  CALL SELECTION-SCREEN 2000.
ENDIF.

START-OF-selection.

write:/ s_mat-low.

rgds,

bharat.

Read only

Former Member
0 Likes
820

Hi sahiti,

Your question is when you select one radi button you need to see some parameters in selection-criteria and for another one you need to see some other parameters right.

If you want two selection screens you need to call the screens your program.

Other wise you do one thing.

First You design your whole screen with all parameters for both the selections screens.

First hide all the parameters except radio buttons.

ok hope you know grouping the parameters right.

Go for select one radio-button on the selection screen

for that what are the parameters you need to display then you write the code in your at selection-screen on output.

Similarly for the same.

Hope it will help you.

Regards,

Madan Mohan Reddy.

In first selection screen i have 2 radio buttons if i click one radio button and execute it should got to another selection screen in that i should have two select option. guide me with some code.

Regards

sahiti

Read only

Former Member
0 Likes
820

Hi Sahiti,

You can have only one selection screen at a time. However still you can have the same kind of feeling by hiding all the fields/elements you dont require when a particular radio button has been selected. For this see the code below.

Selection screen declaration

SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-s48.

PARAMETERS: p_upload TYPE char1 RADIOBUTTON GROUP R01 USER-COMMAND F01

DEFAULT 'X',

p_down TYPE char1 RADIOBUTTON GROUP R01.

SELECTION-SCREEN END OF BLOCK a1.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-s01.

PARAMETERS : p_bpath TYPE string MODIF ID mo1.

*Download file path

PARAMETERS p_dpath TYPE string MODIF ID mo2.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK a2 WITH FRAME TITLE text-s49.

SELECT-OPTIONS: s_plant FOR g_plant MODIF ID mo2,

s_mater FOR g_mater MODIF ID mo2,

s_valdt FOR sy-datum MODIF ID mo2.

SELECTION-SCREEN END OF BLOCK a2.

In the report program

AT SELECTION-SCREEN OUTPUT.

IF p_down = c_true.

  • If the download radiobutton has been selected, hide all the screen

  • fields related to the upload functionality

LOOP AT SCREEN.

IF screen-group1 = 'MO1'.

screen-invisible = '1'.

screen-active = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSEIF p_upload = c_true.

  • If the upload radiobutton has been selected, hide all the screen

  • fields related to the download functionality

LOOP AT SCREEN.

IF screen-group1 = 'MO2'.

screen-invisible = '1'.

screen-active = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

If the radio button p_upload is choosen all the fields which have modif ID as 'M02' will be hidden and if p_down is chosen then modif id 'M01' elements would be hidden.

If still this is not suitable for your requirement, then implement using module pool programming.

Reward if found useful.

Thanks & regards,

Prakash Ghantasala

Read only

Former Member
0 Likes
820

Hi Sahiti,

I guess its not possible to have two selection screen.

You can hide the select-options in screen and hide it based on the radio buttons selected.

This can be achieved by writing following code at AT SELECTION -SCREEN OUTPUT event.

loop at screen.

if radio1 = 'X' and screen-name = <your select-option name>.

screen-output = 1.

modify screen.

endif.

endlloop.

Hope this helps you.

Thanks,

Arun