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

Ranges in screen layout

Former Member
0 Likes
1,647

Is it possible to have select options or ranges defined on the screen developed in module pool [ABAP program type (M)]. As if now, I only see a paramters option for any input/output element on the module pool screen.

Can it be extended to act like select-options present on

our normal selection screen.

I hope you understand my requirement. if you have any suggestions please replyback.

Thank you.

Shiv

also you can use FM COMPLEX_SELECTIONS_DIALOG to get ranges in dialogs (module pool)

Regards

Raja

6 REPLIES 6
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,104

There are a couple ways to do this. The easiest is to define the select-option as a selection screen in your module pool program. Then embed it as a subscreen into your dynpro. Here is an example.




report zrich_0006 .

tables: mara.

* Custom Selection Screen 1010
selection-screen begin of<b> screen 1010 as subscreen.</b>
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.


* create 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

Read only

0 Likes
1,104

Brilliant ! It worked .

Thank you. I never thought of that.

Shiv

Read only

0 Likes
1,104

Hi

....this is the second way:

  • Custom Selection Screen 1010

selection-screen begin of screen 1010.

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.

CALL SCREEN 100.

PROCESS PBO

MODULE CALL_SEL_SCREEN.

PROCESS PAI.

MODULE CALL_SEL_SCREEN.

CALL SELECTION-SCREEN 1010.

IF SY-SUBRC = 0.

  • User've pressed F8

ELSE.

  • User've press EXIT or BACK

ENDIF.

ENDMODULE.

Max

Read only

0 Likes
1,104

Shiv, please remember to award points for helpful answers and mark you post as solved. Thank You.

Regards,

Rich Heilman

Read only

0 Likes
1,104

also you can use FM COMPLEX_SELECTIONS_DIALOG to get ranges in dialogs (module pool)

Regards

Raja

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,104

Please be sure to award points for helpful answers and mark you post as solved when solved completely. Thanks.

Regards,

Rich Heilman