2008 May 16 5:38 AM
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
2008 May 16 5:44 AM
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
2008 May 16 5:41 AM
I think Only one selection screen at time is possible.
For ur requirement Choose module pool programming.
2008 May 16 5:44 AM
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.
2008 May 16 5:48 AM
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
2008 May 16 5:49 AM
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
2008 May 16 5:57 AM
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
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |