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

module pool

Former Member
0 Likes
599

Hi,

do parameters & select-options can be used in module pool program?

5 REPLIES 5
Read only

Former Member
0 Likes
575

Hi,

if you mean using 'screen builder', then 'no'.

put you can have an executable program with the select-option and parameters and then from there, you can CALL SCREEN.

Lata

Read only

Former Member
0 Likes
575

U cannot have parameters and select option in module pool.

Read only

Former Member
0 Likes
575

Hi,

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 .

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.

<b>Reward points</b>

Regards

Read only

Former Member
0 Likes
575

Hello,

In module one can create input parameters from user by "Parameters" and "select options" if and only if you define it within a screen block ,i.e:Please see the example code below with screen 100(you can use your own screen number provided you dont intend to use it again in the module pool)

tables:PA0001. "Declaration

SELECTION-SCREEN BEGIN OF SCREEN 100. "Start of screen block

PARAMETERS PARM(5). "Parameters

SELECT-OPTIONS SEL FOR PA0001-PERNR. "Select options

SELECTION-SCREEN END OF SCREEN 100. "end of screen block

You need not creat the screen 100 separately.Even if you try,an error saying screen exists will come.

when the transaction code(t-Code) is assigned to the module pool the screen(100)needs to be assigned so that you can view the screen 100 where parameters and select options are used

Hope this answers your query

Reward points if useful...

Regards

Byju

Read only

Former Member
0 Likes
575

hi

U cant use parameters and select options stmts in MPP but

u can use I/O fields text boxes for this purpose by writing the suitable code