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

Select Options in a Module Pool

Former Member
0 Likes
688

Hi,

  How can I use a select-options in a Module Pool (SE51 transact.). We would like to have a screen with some select-options and a table control.

  Thanks for all and regards,

  David

3 REPLIES 3
Read only

thomas_jung
Developer Advocate
Developer Advocate
0 Likes
580

Here is what I usually do in that situation.  I go ahead and declair my selection screen as a subscreen.

****Open Orders

selection-screen begin of screen 2000 as subscreen.

selection-screen begin of block one with frame title text-001.

select-options: vbeln1 for zev_open_ord_v1-vbeln matchcode object vmva.

select-options: pernr1 for zev_open_ord_v1-pernr matchcode object prem.

selection-screen end of block one.

selection-screen end of screen 2000.

I then create a subscreen area in my main screen.  You can then include the generated selection screen in this subscreen area. In this example I have multiple selection sub-screens that I dynamically set using the variable sub_screen.

process before output.

  module status_0100.

  call subscreen sub_screen1 including sy-repid sub_screen.

*

process after input.

  call subscreen sub_screen1.

  module user_command_0100.

  module exit_special at exit-command.

Read only

Former Member
0 Likes
580

you can use function module COMPLEX_SELECTIONS_DIALOG

for showing select option on the module pool screen.

Read only

Former Member
0 Likes
580

hi

SELECTION-SCREEN BEGIN OF SCREEN 1020 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 3(5) TEXT-009.

SELECTION-SCREEN POSITION 10.

SELECT-OPTIONS : S_CORR FOR Table-field MATCHCODE OBJECT mcd.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF SCREEN 1020.

In module pool declare subscreen area and do the below.

PROCESS BEFORE OUTPUT.

MODULE STATUS_100.

CALL SUBSCREEN ANA_SCA

INCLUDING 'YHPRMAIN' '1020'.

PROCESS AFTER INPUT.

CALL SUBSCREEN ANA_SCA.

MODULE USER_COMMAND_100.

This will work only in 46C and greater versions.

Hope this will help you.

~~Guduri