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

passing select options in module pool

manish_malakar0316
Active Participant
0 Likes
4,170

Hi all,

I have a small issue in my module pool program. I have inserted by select-options parameter along with the extension button as per my requirement. However I cant understand where to put my select query in my program. The select query is not populating the internal table correctly based on the select options, as per debugging. The below screenshots are provided for your reference:

The variables and structure is declared and the select-options is passed:

The flow logic for screen 8999 is below:

I have written the select query inside MODULE USER_COMMAND_8999.

The layout for this screen is:

Finally in screen 9001, I have made a table control with wizard:

On executing and clicking submit:

All the values from the VBAP table are being dispayed.

But, if I press on the extension button and then I click on "SUBMIT":

Then the values are being displayed correctly as per select-options

Where shall I put the select query in order to get the output correctly?

Regards.

Manish.

1 ACCEPTED SOLUTION
Read only

former_member201285
Active Participant
0 Likes
2,718

Hello Manish,

it's just an assumption - try changing the order of the statements MODULE USER_COMMAND_8999 and CALL SUBSCREEN REF1 in PAI flow logic.

Regards,

Ulrich

Hi all,

I have a small issue in my module pool program. I have inserted by select-options parameter along with the extension button as per my requirement. However I cant understand where to put my select query in my program. The select query is not populating the internal table correctly based on the select options, as per debugging. The below screenshots are provided for your reference:

The variables and structure is declared and the select-options is passed:

The flow logic for screen 8999 is below:

I have written the select query inside MODULE USER_COMMAND_8999.

The layout for this screen is:

Finally in screen 9001, I have made a table control with wizard:

On executing and clicking submit:

All the values from the VBAP table are being dispayed.

But, if I press on the extension button and then I click on "SUBMIT":

Then the values are being displayed correctly as per select-options

Where shall I put the select query in order to get the output correctly?

Regards.

Manish.

4 REPLIES 4
Read only

former_member201285
Active Participant
0 Likes
2,719

Hello Manish,

it's just an assumption - try changing the order of the statements MODULE USER_COMMAND_8999 and CALL SUBSCREEN REF1 in PAI flow logic.

Regards,

Ulrich

Read only

0 Likes
2,718

This answer seems correct, as the CALL SUBSCREEN is executer after the USER COMMAND module, the data was not read from screen.

NB: Usually the USER_COMMAND is the last module of PAI, only exception is a MODULE USER_COMMAND AT EXIT-COMMAND that is usually the first module of the PAI.

Regards,

Raymond

Read only

0 Likes
2,718

Hi,

Thanks a lot. Your assumption was correct .

Regards.

Manish

Read only

Former Member
0 Likes
2,718

Hi Manish,

I have checked your source and it is working fine.

just insert the following in MODULE USER_COMMAND_8999 INPUT and try

CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT' "CONVERSION ROUTINE FOR MLOW
         EXPORTING
           INPUT              = S_VBELN-low
        IMPORTING
          OUTPUT             = MLOW1
        EXCEPTIONS
          LENGTH_ERROR       = 1
          OTHERS             = 2
                 .
       IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.