2014 Feb 15 12:11 PM
Hi,
Is there any method to create select option functionality in module pool programming?
2014 Feb 15 12:33 PM
2014 Feb 15 12:40 PM
Hi ,
you can create a select option in module pool, and for this you have to create a subscreen area
where you can define your select options.
Create a subscreen area in module pool, say its screen no. is 9000, and give it a name say NAME.
Write your logic as shown below
SELECTION-SCREEN BEGIN OF SCREEN 9000 AS SUBSCREEN.
PARAMETERS : p_werks TYPE ekpo-werks .
SELECT-OPTIONS : s_ebeln FOR ekpo-ebeln.
SELECTION-SCREEN END OF SCREEN 9000 .
In the PBO of the screen , you have to call your screen.
Please search, you will get some useful links.
2014 Feb 15 6:38 PM
Hi Amol,
We can create select option in the module pool program in the below way,
1. create a screen ( say 2000 )
2. go to the screen( 2000 ) layout and drag a subscreen area and name it ( say sel ).
3. write code to call subscreen in the both PBO and PAI modules.
Here is sample code.
REPORT ZSELECT_OPTIONS_MOD_1.
tables kna1.
SELECTION-SCREEN BEGIN OF SCREEN 100 as SUBSCREEN.
select-OPTIONS : s_kunnr for kna1-kunnr.
SELECTION-SCREEN END OF SCREEN 100.
START-OF-SELECTION.
call SCREEN 2000.
must write call subscreen statement in both PBO and PAI modules as below
Hope this helps you.
Regards
Deeksha
2014 Feb 17 3:07 AM
It gives the error message as below.
Runtime Errors DYNP_WRONG_SCREEN_TYPE
Date and Time 17.02.2014 08:30:41
Short text
Incorrect screen type: Screen is incorrectly defined or used.
What happened?
The attribute screen type with the values 'Normal Screen' and
'Subscreen' determines the use of the screen. If a normal screen is used
as subscreen or vice versa, an error occurs.
The screen "ZSD_EXC_FORM" 9000 has, in this respect, an inappropriate screen
type.
2014 Feb 17 7:53 AM
Hi,
Now I want to save some of the fields from report output and I am using
FORM user_command1 USING ucomm TYPE sy-ucomm
selfield TYPE slis_selfield.
but, it saves only last record instead of all.
Please suggest the same.
2014 Feb 16 5:19 PM
Hi Amol,
You can use function modules COMPLEX_SELECTIONS_DIALOG and FREE_SELECTIONS_DIALOG for that or define a selection screen and call it as a popup window.
Cheers,
Andy
2014 Feb 17 4:09 AM
Thanks
It is working now.
But, How can i provide process on value request for selection screen parameters.
2014 Feb 17 5:18 AM
Hi,
In order to add F4 help to a field in modeule pool follow these steps:-
1. First go to SE11 and create your own search help
2. Now in your module pool program program go to the layout of your screen.
3. Now when you see the attributes of this field in the Dict tab you will find the field Search Help. Now here you can specify the name of the search help you created in SE11.
check this link F4 help in module pool porgramming | SCN