‎2007 Sep 19 1:06 PM
Hi,
I am trying to create select - options in Screen , i.e. not the selection screen but a custom screen, say 9000. I can make the text boxes etc for having the select options. But How do I simulate the button wchich comes after select options. It would be used in dialogue programming with multiple screens having different reports.
Please reply to me urgently,
Thanks and Regards
Arnab Panigrahi
‎2007 Sep 19 1:52 PM
Hi,
Use the following function module for the same.
call function 'COMPLEX_SELECTIONS_DIALOG'
exporting
text = 'Some text'
tables
range = lr_datum
exceptions
cancelled = 0
others = 1.
if not sy-subrc is initial.
clear: lr_datum, lr_datum[].
endif.
Regards,
Sesh
‎2007 Sep 19 1:17 PM
hi,
i think even if u get that button, from where u get its functionality means ranges and all that because u have to write code for that also.
So is it not possible that u create one executable report (means in SE38), make selection screen there and than call ur next screen?
‎2007 Sep 19 1:23 PM
Select-option is only possible for report transactions only,
else create a report transaction for this screen and use submit and via selection-screen return.
You can get the screeen.
Regards,
Reema.
‎2007 Sep 19 1:28 PM
It is a report , but actually the flow is like
2 radio buttons - > this screen having select options -> report
the select options screen will be different for bothe the radio buttons...
Is there any function module that you are aware of which can bring the popup atleast for value ranges.That would still help as i can code the rest.
Thanks and Regards,
Arnab
‎2007 Sep 19 1:48 PM
Hi One solutions is:
Based on Radio Button Selection you can activate different Select-options.
I.e if I select 1st Radio Button 1st group of Select-Option will be shown and 2 nd will be deactivated or hidden.
Here is a code explaining the same.
REPORT YTEMP12.
TABLES: MARA.
PARAMETERS:
p_r1 RADIOBUTTON GROUP g1 USER-COMMAND usr DEFAULT 'X',
p_r2 RADIOBUTTON GROUP g1.
PARAMETERS: p_input1 TYPE matnr MODIF ID m1,
p_input2 TYPE matnr MODIF ID m2.
SELECT-OPTIONS: SO1 FOR MARA-MATNR MODIF ID m1,
SO2 FOR mara-matkl MODIF ID m2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_r1 = 'X'.
IF screen-group1 = 'M2'.
screen-active = '0'.
ENDIF.
ELSE.
IF screen-group1 = 'M1'.
screen-active = '0'.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Hope this will solve your problem.
Darshan
<i><b>Please Reward Points to each answer which is helpful. It Motivates us to Help Others.</b></i>
Message was edited by:
Darshan Patel (EDS-Pune)
‎2007 Sep 19 1:53 PM
You even use call selection-screen based on your radio buttons
similar to this....u will get a pop-up like screen
SELECTION-SCREEN BEGIN OF SCREEN 123 AS WINDOW TITLE TEXT-456.
SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-BL1
NO INTERVALS.
SELECT-OPTIONS SEL1 FOR SY-SUBRC.
PARAMETERS PAR1 LIKE SPFLI-CARRID.
SELECTION-SCREEN COMMENT /10(20) TEXT-COM.
SELECTION-SCREEN END OF BLOCK BL1.
SELECTION-SCREEN END OF SCREEN 123.
...
CALL SELECTION-SCREEN 123 STARTING AT 20 5.
IF SY-SUBRC = 0.
...
ELSE.
...
ENDIF.
‎2007 Sep 20 4:04 AM
A few dot points:
1. You can have a select-option embedded in a dynpro, if you want, by using a subscreen. There's an example bit of code at
This would be easy to adapt to being a popup rather than a full screen if required.
2. As noted above, you can code your own select-options as in
which I think Sesh has quoted from.
3. For the requirement you expressed initially, the code below should do the trick... you get a different block of extra selections depending on which radionbutton you select.
Jonathan
report zlocal_jc_radiobutton_hiding.
tables:
sscrfields. "To allow trapping of Fcode on selection screen
selection-screen begin of block tot with frame.
parameters :
p_rb_01 radiobutton group rbg1 user-command zrb1 default 'X',
p_rb_02 radiobutton group rbg1.
selection-screen begin of block block1 with frame title text1.
parameters:
p_date like sy-datum modif id bl1.
selection-screen end of block block1.
selection-screen begin of block block2 with frame title text2.
parameters:
p_time like sy-uzeit modif id bl2.
selection-screen end of block block2.
selection-screen end of block tot.
*" Events:
initialization.
text1 = 'Enter a date'.
text2 = 'Enter a time'.
at selection-screen output.
perform at_selection_screen_output.
at selection-screen.
perform at_selection_screen.
*&---------------------------------------------------------------------*
*& Form at_selection_screen_output
*&---------------------------------------------------------------------*
form at_selection_screen_output.
*" Hide the appropriate fields
loop at screen.
if p_rb_01 = 'X'
and screen-group1 = 'BL2'.
screen-active = '0'.
endif.
if p_rb_02 = 'X'
and screen-group1 = 'BL1'.
screen-active = '0'.
endif.
modify screen.
endloop.
endform. "at_selection_screen_output
*&---------------------------------------------------------------------*
*& Form at_selection_screen
*&---------------------------------------------------------------------*
form at_selection_screen.
*" trap the radiobutton
if sscrfields-ucomm = 'ZRB1'. "clicked Subtotal checkbox
*" if you want to trap this radio button press here
endif.
endform. "at_selection_screen
‎2007 Sep 19 1:52 PM
Hi,
Use the following function module for the same.
call function 'COMPLEX_SELECTIONS_DIALOG'
exporting
text = 'Some text'
tables
range = lr_datum
exceptions
cancelled = 0
others = 1.
if not sy-subrc is initial.
clear: lr_datum, lr_datum[].
endif.
Regards,
Sesh