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 Module Pool

former_member192842
Participant
0 Likes
7,420

Dear Experts,

I need to create a select options(Date range) in Module pool programming(Type Module Pool). I went through many discussion threads and found out the solutions more often similar to the one below.

1. To create a subscreen and define in top include as

SELECTION-SCREEN BEGIN OF SCREEN 2100 AS SUBSCREEN.

SELECT-OPTIONS: matnr FOR mara-matnr.

SELECTION-SCREEN END OF SCREEN 2100.

The same as in this link.

http://wiki.sdn.sap.com/.wiki/display/ABAP/SELECT-OPTIONS+on+Dialog+programming+screen

When I complete the steps and activate, the following error occurs.

Error when generating the selection screen XXXX of report XXXXXXXXX

Please suggest a way to create selection option in Module pool programming.

Thanks in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
5,352

Hi,

Did u checked the screen numbers as mentioned in the above link that you have followed.

Its working fine for me.

Error may be comes because of

1. overlapping elements in select options

2. when you have created the screen for your subscreen, dont create separate screen for subscreen( activate your program, subscreen will create it on its own)

17 REPLIES 17
Read only

Former Member
0 Likes
5,352

This message was moderated.

Read only

0 Likes
5,352

Thanks for the reply.I have checked this link. But in that case, they have created a report program and then created screens in it, which is possible.

But in my case i wanted to create select options in module pool programming(Type Module pool).

Read only

0 Likes
5,352

Hi,

Please go through the following link -

http://wiki.sdn.sap.com/wiki/display/ABAP/Select-Options+in+Module+Pool+Programming

Thanks and regards,

kartik

Read only

0 Likes
5,352

Hi

Thanks for the reply. I went to SE80 and created program of type Module Pool.

Then I created a screen 9000, after which i created a subscreen 2000 in layout of 9000 screen.

Then in top include i declared as follows

SELECTION-SCREEN BEGIN OF SCREEN 2000 AS SUBSCREEN.

SELECT-OPTIONS: matnr FOR mara-matnr.

SELECTION-SCREEN END OF SCREEN 2000.

Then i called the 2000 subscreen in PBO and PAI of 9000 screen.

After calling, i tried to activate and a pop up occurs displaying the message

"Error when generating the selection screen XXXX of report XXXXXXXXX".

I click ok in the pop up and the program is activated.

Then i execute the program, Select option does'nt appear in the output.


Read only

Former Member
0 Likes
5,353

Hi,

Did u checked the screen numbers as mentioned in the above link that you have followed.

Its working fine for me.

Error may be comes because of

1. overlapping elements in select options

2. when you have created the screen for your subscreen, dont create separate screen for subscreen( activate your program, subscreen will create it on its own)

Read only

0 Likes
5,352

Hi

Thanks for the reply. This is the procedure i have followed.

I went to SE80 and created program of type Module Pool.

Then I created a screen 9000, after which i created a subscreen 2000 in layout of 9000 screen.

Then in top include i declared as follows

SELECTION-SCREEN BEGIN OF SCREEN 2000 AS SUBSCREEN.

SELECT-OPTIONS: matnr FOR mara-matnr.

SELECTION-SCREEN END OF SCREEN 2000.

Then i called the 2000 subscreen in PBO and PAI of 9000 screen.

After calling, i tried to activate and a pop up occurs displaying the message

"Error when generating the selection screen XXXX of report XXXXXXXXX".

I click ok in the pop up and the program is activated.

Then i execute the program, Select option does'nt appear in the output.


Read only

0 Likes
5,352

post the screen shot of the error

Read only

0 Likes
5,352

Dont create subscreen 2000 in layout.

Create only 9000 screen in se80. And this 2000 screen will create on its own.

Read only

0 Likes
5,352

Read only

0 Likes
5,352

You need to do,

Then I created a screen 9000,

Skip this step

"after which i created a subscreen 2000 in layout of 9000 screen."

Then in top include i declared as follows

SELECTION-SCREEN BEGIN OF SCREEN 2000 AS SUBSCREEN.

SELECT-OPTIONS: matnr FOR mara-matnr.

SELECTION-SCREEN END OF SCREEN 2000.

Then activate your program.

Read only

0 Likes
5,352

Why u r creating the subscreen it will create automatically

Read only

0 Likes
5,352

Thanks, that was the issue. I deleted the subscreen i created and its working fine.

Read only

0 Likes
5,352

Thanks. I deleted the subscreen 2000 and its working fine.

Read only

Former Member
0 Likes
5,352
Read only

Former Member
0 Likes
5,352

Hi Anand,

Have you checked the alternate way of using Function module COMPLEX_SELECTIONS_DIALOG?

Search for the same in SCN/Google you will find a lot of How-to articles.

Hope this helps.

Regards,

Karthik

Read only

Former Member
0 Likes
5,352

In top include.

TABLES SPFLI.

SELECTION-SCREEN BEGIN OF SCREEN 2100 AS SUBSCREEN.

SELECT-OPTIONS: S_SPFLI FOR SPFLI-CARRID.

SELECTION-SCREEN END OF SCREEN 2100.

Create a screen '2000' and place a subscreen area in it.

In the screen flow logic of 2000.

PROCESS BEFORE OUTPUT.

MODULE STATUS_2000.

CALL SUBSCREEN SA INCLUDING SY-REPID '2100'.

PROCESS AFTER INPUT.

CALL SUBSCREEN SA.

MODULE USER_COMMAND_2000.

In PBO include.

MODULE STATUS_2000 OUTPUT.

  SET PF-STATUS '2000'.

*  SET TITLEBAR 'xxx'.

ENDMODULE.                 " STATUS_2000  OUTPUT

Read only

Former Member
0 Likes
5,352

This message was moderated.