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

Regarding Select Statement

Former Member
0 Likes
428

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

3 REPLIES 3
Read only

Former Member
0 Likes
409

Try this:

select * from table

into table z_something

where field1 between FROM_NUMBER and TO_NUMBER'

Regards,

Michael

Read only

Former Member
0 Likes
409

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

Read only

Former Member
0 Likes
409

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