Application Development 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: 

Select-options in module pool

Former Member
0 Kudos

How to write select-options code in module pool?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Srinivas,

Please try the below code.

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.

Thanks & Regards,

Siri.

Message was edited by: Srilatha T

5 REPLIES 5

Former Member
0 Kudos

Hi Srinivas,

Please try the below code.

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.

Thanks & Regards,

Siri.

Message was edited by: Srilatha T

Former Member

0 Kudos

you can also used FM COMPLEX_SELECTIONS_DIALOG to achieve this.

If the number of parameters/select-options are more its better to go with the method given by others.

Regards

Raja

Former Member
0 Kudos

Hi,

Check this link,

<u>http://help.sap.com/saphelp_erp2004/helpdata/en/9f/dba9e735c111d1829f0000e829fbfe/frameset.htm</u>

Hope it helps u.

Kindly reward points if u find it useful.

Thanks&Regards,

Ruthra

Former Member
0 Kudos

Hi all.

You can define a SELECION-SCREEN by

SELECTION-SCREEN BEGIN OF SCREEN 1020.

...

SELECTION-SCREEN END OF SCREEN 1020.

and just call it at the right time by

CALL SELECTION-SCREEN 1020.

if you want it like a popup screen use:

... STARTING AT x1 y1 ... ENDING AT x2 y2.

If the user presses F8 (Execute) the screen will

exit with sy-subrc = 0 otherwise with 4.

Also see the documentation of "CALL SELECTION-SCREEN".

hth, Tim