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

table

Former Member
0 Likes
659

I m working in MB25 tcode.

if i give low value only tht records are displayed.

i debugged & checked tht matnr-low has value.

if i didnt give any value all the records are displayed.

at this time no values in matnr -low & matnr-high.

the matnr range table is empty.. then how the datas are fetched.

how the range table is working here.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
635

hi maya

actually what happens is when u dont give anything in select options then it doesnot check where conditon in query and all data is fetched .

hope it clears ur doubt

regards

ravish

<b>plz dont forget to reward points if useful</b>

5 REPLIES 5
Read only

Former Member
0 Likes
636

hi maya

actually what happens is when u dont give anything in select options then it doesnot check where conditon in query and all data is fetched .

hope it clears ur doubt

regards

ravish

<b>plz dont forget to reward points if useful</b>

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
635

Hi,

That is what is the behaviour of the SELECT-OPTIONS.

When we dont supply any values all the values are fetched.

Its like not giving any condition for that filed in the WHERE clause.

What happens when you dont mention a field in the where clause it is not concidered while fetching the data.So when you pass any empty range table its like you are saying ignore the field when fetching the data

Regards,

Sesh

Read only

Former Member
0 Likes
635

thanks for ur quick response.

I know it happens by where clause in select query, i want to know how range table works in this condition.

Thanks in advance

Read only

0 Likes
635

Hi,

Basically when the Database optmizer converts this query from OPEN SQL to a Database dependent SQL statement it observes that this range table is empty and just ignores to mention it in the WHERE clause of the generated DB dependeant SQL statement. That is the reason why you get more data.

When you have values in the range table then they are appended to the where clause as follows

fld1 = value1 OR fld1 = value2 and so on.

So when it is empty there is nothing in the WHERE CLAUSE Thats how it works hope this is clear to you now.

Regards,

Sesh

Read only

Former Member
0 Likes
635

HI,

When you are dealing with Select Options or Ranges.. Keep these points in mind.

1) You enter only value...

it is like select * from table where cond = selection options-low.

2) You enter a range

it is like select * from table where fid >= selection options-low and fld <= selection optiosn-high.

3) you dont enter any thing.

it is like select * from table where fid = anything.

Thanks

mahesh