‎2007 Aug 23 7:55 PM
I have to create a dialog screen with a bunch of input fields that should be used by user to specify a search range . I know in reports it can be done with select options. How can it be done in dialog program. Also can I create a report and on executing the report can I call a dialog porgram screen
Thank you
‎2007 Aug 23 7:57 PM
You can embed a selection screen definition directly into your dynpro via a subscreen. Here is an example.
report zrich_0006 .
tables: mara.
* Custom Selection Screen 1010
selection-screen begin of screen 1010 as subscreen.
selection-screen begin of block b1 with frame title text-001.
parameters: p_rad1 radiobutton group grp1 default 'X',
p_rad2 radiobutton group grp1,
p_rad3 radiobutton group grp1.
select-options: s_matnr for mara-matnr,
s_matkl for mara-matkl,
s_mtart for mara-mtart.
selection-screen end of block b1.
selection-screen end of screen 1010.
start-of-selection.
call screen 100.
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
module status_0100 output.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
endmodule.
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
module user_command_0100 input.
endmodule.
* Screen screen 100 with a subscreen area called "subscreen_1010"
* Screen Flow Logic follows
*process before output.
*
* module status_0100.
*
* call subscreen subscreen_1010 including sy-repid '1010'.
*
*process after input.
*
* call subscreen subscreen_1010 .
*
* module user_command_0100.
Regards.
Rich Heilman
‎2007 Aug 23 7:57 PM
You can embed a selection screen definition directly into your dynpro via a subscreen. Here is an example.
report zrich_0006 .
tables: mara.
* Custom Selection Screen 1010
selection-screen begin of screen 1010 as subscreen.
selection-screen begin of block b1 with frame title text-001.
parameters: p_rad1 radiobutton group grp1 default 'X',
p_rad2 radiobutton group grp1,
p_rad3 radiobutton group grp1.
select-options: s_matnr for mara-matnr,
s_matkl for mara-matkl,
s_mtart for mara-mtart.
selection-screen end of block b1.
selection-screen end of screen 1010.
start-of-selection.
call screen 100.
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
module status_0100 output.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
endmodule.
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
module user_command_0100 input.
endmodule.
* Screen screen 100 with a subscreen area called "subscreen_1010"
* Screen Flow Logic follows
*process before output.
*
* module status_0100.
*
* call subscreen subscreen_1010 including sy-repid '1010'.
*
*process after input.
*
* call subscreen subscreen_1010 .
*
* module user_command_0100.
Regards.
Rich Heilman
‎2007 Aug 23 8:17 PM
Hi , thanks for the help , but I would like to know if there is an easier way , can we convert the i/o fields into select- options or just some thing that can be used to specify a range.
Thank you
‎2007 Aug 24 4:05 PM
Hi
I have implemented the code you gave for embedding a report in a dynpro . However , the select options of the subscreen are not visible. WHen I check for errors in flow logic , the error message " Include block not specified " pops up. Is there a way around this
Thank you
Krish
‎2007 Aug 24 4:24 PM
I think you did something wrong, can you post your code in of your program as well as the code in the flow logic of the screen?
To answer your other question, this is the easiest way, it saves you from having to create and handle all of the internal workings of SELECT-OPTIONS in a selection screen, you don't want to go there, trust me.
Regards,
Rich Heilman