‎2012 May 11 5:11 AM
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
‎2012 May 11 5:47 AM
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)
‎2012 May 11 5:15 AM
‎2012 May 11 5:30 AM
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).
‎2012 May 11 5:37 AM
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
‎2012 May 11 6:03 AM
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.
‎2012 May 11 5:47 AM
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)
‎2012 May 11 6:00 AM
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.
‎2012 May 11 6:02 AM
‎2012 May 11 6:10 AM
Dont create subscreen 2000 in layout.
Create only 9000 screen in se80. And this 2000 screen will create on its own.
‎2012 May 11 6:11 AM
‎2012 May 11 6:15 AM
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.
‎2012 May 11 6:22 AM
‎2012 May 11 6:27 AM
Thanks, that was the issue. I deleted the subscreen i created and its working fine.
‎2012 May 11 6:28 AM
‎2012 May 11 5:57 AM
Kindly check the following link with screen shot :
http://sample-code-abap.blogspot.in/2008/06/select-option-in-module-pool-screen.html
‎2012 May 11 6:21 AM
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
‎2012 May 11 6:36 AM
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
‎2013 Aug 30 1:24 PM