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

Select options

Former Member
0 Likes
426

Hi there,

How to use select query with select option low and high,

Plz.

Thanx n advance,

Venu

1 ACCEPTED SOLUTION
Read only

shishupalreddy
Active Contributor
0 Likes
393

Hi ,

Follow the sample code .

SELECT-OPTIONS : s_kunnr for kna1-kunnr.

data: itab type table of kna1 with header line.

select * from kna1 into table itab where kunnr IN s_kunnr.

or

select * from kna1 into table itab where kunnr between s_kunnr-low and s-kunnr-high.

Dont forget to give the reward points if helpful.

Regads,

3 REPLIES 3
Read only

shishupalreddy
Active Contributor
0 Likes
394

Hi ,

Follow the sample code .

SELECT-OPTIONS : s_kunnr for kna1-kunnr.

data: itab type table of kna1 with header line.

select * from kna1 into table itab where kunnr IN s_kunnr.

or

select * from kna1 into table itab where kunnr between s_kunnr-low and s-kunnr-high.

Dont forget to give the reward points if helpful.

Regads,

Read only

anversha_s
Active Contributor
0 Likes
393

hi,

check this sample code...

tables: mkpf.

select-options: s_date for mkpf-budat.

the first field will be

s_date-low

and the next fiedl will be s_date-high.

so query will be.

select * from table_naem where date = s_date-low.

or

select * from table_naem where date = s_date-high.

hope u undrstud.

rgds

anver

if hlped mark points

Read only

Former Member
0 Likes
393

SELECT-OPTIONS :S_MATNR FOR MARA-MATNR.

where select-options is table which contains fields like

low ,high,option,sign.

in order to write a query

we have to write like

select matnr from mara where matnr in s_matnr.

or

select matnr from mara where matnr between s_matnr-low and s_matnr-high.

thanks

srinivas