‎2008 Jan 24 3:52 PM
Hello Gurus,
I have problem in Function Module.
I have to specify range of value in the Function Module and i have to use in the select statement.
I think we canot use select option in function module.
So in import parameter i have given
FROM_NUMBER
TO_NUMBER.
I have to select the Number FROM_NUMBER TO TO_NUMBER.
So please let me know any select statement is there for selecting rannges.
if i specify FROM_NUMBER 100
TO_NUMBER 150
it should select from 100 to 150.
Thanks in advace.
best Regards,
zubera
‎2008 Jan 24 4:03 PM
Try this:
select * from table
into table z_something
where field1 between FROM_NUMBER and TO_NUMBER'
Regards,
Michael
‎2008 Jan 24 4:39 PM
Hi Zubera,
well first of all you can pass ranges as a table or export attributes,like
select-options : Matnr for mara-matnr.
export matnr in the function.
then in FM interface in import parameter
define
mara type matnr_type.
matnr_type should be defined in top include
types : BEGIN OF matnr_type occurs 20,
SIGN(1),
OPTION(2),
LOW LIKE mara-matnr,
HIGH LIKE mara-matnr,
END OF sel.
hope it works for you.
cheers
‎2008 Jan 25 2:12 AM
Hi zubera,
Try to declare import variable type BAPI1026_CONSPARTNER_RA, which is a structure contains fields like sign, option, low, high. by using this you can very well write select query easyly.
example:
Import parameters:
V_Number type BAPI1026_CONSPARTNER_RA.
source code :
select * from <table>
where <field name> IN V_Number.
I hope you understand. if you still need help, feel free to contact me and Plz dont forgot to reward points
Cheers,
Sreenivasa sarma