‎2008 Jul 16 11:29 AM
hi gurus,
i am urgent need of the FM used to call the multiple selection option....which we will be using in select-options.
i am using like this because i cant use select-options in my existing module pool program. I could use them only in another screen and not on the the same screen.
please help me out.
Points will be rewarded.
‎2008 Jul 16 11:38 AM
‎2008 Jul 16 11:38 AM
‎2008 Jul 16 11:42 AM
hi,
Plz refer to the link.
http://www.sapfans.com/forums/viewtopic.php?f=13&t=311259
You will find Sample code there.
Hope this will help.
Regards
Sumit Agarwal
‎2008 Jul 16 11:51 AM
Hi Clarence ,
i am not clear with you issue anyway may be you can try this FM's:
DYNP_VALUES_READ : Read the values from a dynpro. This function can be used to read the values from a report's selection screen too
or plz refer to the link for other FM's:
http://www.erpgenie.com/abap/functions.htm
With luck,
Pritam.
‎2008 Jul 16 11:58 AM
Hi Winnie,
I would like to suggest a couple of references,
[SDN - Reference for Select-options passed to function module|;
[SDN - Reference for Select-options function module in module pool|;
[SDN - Reference for Passing select-optionparamtere to a function module|;
[SDN - Reference for Data range (Select-option) in Function module|;
Hope that's usefull.
Good Luck & Regards.
Harsh Dave
‎2008 Jul 16 11:59 AM
There are 2 ways to create select-option in module pool.
Method 1
-
a) Create a subscreen area in your screen layout where you want to create the select options.
b) In the top include of your module pool program declare a selection screen as a subscreen e.g.
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
select-options s_matnr for mara-matnr.
SELECTION-SCREEN END OF SCREEN.
c) In the PBO and PAI of the main screen where the select options needs to be created do a call subscreen of the above screen (100).
CALL SUBCREEN sub_area INCLUDING <program> <screen>
This call subscreen statement is necessary for transport of values between screen and program.
Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.
Method 2
-
a) Create 2 separate fields in your screen layout - one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this.
struc_tab_and_field-fieldname = con_cust. " 'KUNNR'
struc_tab_and_field-tablename = con_kna1. " 'KNA1'.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
TITLE = ' '
text = g_titl1 " 'Customers'
tab_and_field = struc_tab_and_field
TABLES
RANGE = rng_kunnr
EXCEPTIONS
NO_RANGE_TAB = 1
CANCELLED = 2
INTERNAL_ERROR = 3
INVALID_FIELDNAME = 4
OTHERS = 5.
IF NOT rng_kunnr[] IS INITIAL.
Read the very first entry of the range table and pass it to
dynpro screen field
READ TABLE rng_kunnr INDEX 1.
IF sy-subrc = 0.
g_cust = rng_kunnr-low.
ENDIF.
You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements.
Regards,
Joy.