‎2007 Aug 01 3:38 PM
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.
‎2007 Aug 01 3:40 PM
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>
‎2007 Aug 01 3:40 PM
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>
‎2007 Aug 01 3:41 PM
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
‎2007 Aug 01 3:45 PM
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
‎2007 Aug 01 3:49 PM
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
‎2007 Aug 01 3:49 PM
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