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

regading function module

Former Member
0 Likes
1,045

hi to all,

how to pass select-options in function module.

in our program one select-option iz dere.

this select-option must pass to one exporting parameter in standard function module.

reagrds

satya

10 REPLIES 10
Read only

Former Member
0 Likes
1,019

pass the selectoption name with low and high values to the parameters of the function module

for example

select-options: s_matnr for mara-matnr.

pass s_matnr-low

s_matnr-high to the parameters of the function module

Read only

0 Likes
1,019

hello reddy,

in function module only one field iz dere for passing select-option.

main thing iz in select-option,if v pass only low value.it wrks fine.

if suppose ,v pass low n high values also,then how the function module recieve these two values.

n how the function module executes.

Read only

Former Member
0 Likes
1,019

You need to create a structure which has the struction of a selection options, including the fields SIGN OPTION LOW HIGH, then you can make a table type of it and use it in the EXPORTING paramters of your functino module, or you can use the structure in the TABLES parameter of the funciton module.

Read only

Former Member
0 Likes
1,019

You have to create an exporting parameter of the function module with type SELOPT. and pass your select option to this parameter

Read only

0 Likes
1,019

hi to all,

itz a standard function module.

in fun module,only one exporting parameter contains same data type like select-option.

v can pass this select-option to dat exporting parameter only.

if i pass ,like

exporting

snd = g_art[]

it throws error,both r not same data type.

snd = g_art-low.

it wrks fine.

but wat abiut high value.

Read only

0 Likes
1,019

HI,

Can u try Ranges.

Read only

0 Likes
1,019

do u have any tables parameters

Read only

0 Likes
1,019

hi reddy,

no table parameters.

6 exporting parameters.

n one importing parameter(i.e table)

Read only

Former Member
0 Likes
1,019

Hi,

There is a structure available with the ABAP dictionary named

SELOPT. it contains the fields as SIGN,OPTION,LOW,HIGH

as of the selection criterian.

Regards,

Sankar.

Read only

0 Likes
1,019

one way to handle this error which is not the best way is, modify your selection option so the user can put the value or fieldname-low only. you can gray out the fieldname-high (and intervals).

put the check condition on selection option if the value is more then one for fieldname-low then loop it around the FM.

OR

select-options: s_preas for pa0008-preas no intervals no-extension

Edited by: Fayyaz Khan on Mar 26, 2008 12:44 PM