‎2007 Jun 21 3:44 AM
Hi all,
I am using a select statement like this.
select min ( value ) from zemployee into v_value. (There is no where clause)
In SLIN it is telling that this statement is bypassing the buffer. In my table's technical settings I made the table as Fully buffered (This is my requirement i should use this).
Can anybody tell in which way i can remove this error.
Thanks,
Mungala.
‎2007 Jun 21 3:47 AM
otherway round create one range
ranges r_field for table-field.
do not fill any values to ranges
select min ( value ) from zemployee into v_value
where field in r_field. -> set like this you get same output and slin will not show any error.
‎2007 Jun 21 3:48 AM
hi,
try like this,
select min ( value ) from zemployee into <b>table</b> v_value.
or
use append statment and endselect.
reward points if useful,
regards,
seshu.
‎2007 Jun 21 3:51 AM
Sorry to tell you I need to select a single value so I am using select single.
‎2007 Jun 21 3:53 AM
then do not use select single if you do not mention where clause.
use Select * from table into field up to 1 row . -> you can use without having where clause..
‎2007 Jun 21 4:10 AM
Hi Praveena,
What you can do is
Use SELECT UPTO 1 ROWS
or try using
Select *
if sy-subrc = 0.
exit.
endif.
endselect.
Regards,
Atish
‎2007 Jun 21 4:49 AM
i think you are getting this error due to use of aggregate fn min. Not for the where clause . just see the abap help documentation.
A SELECT statement on a table for which SAP buffering has been declared in the ABAP Dictionary usually reads data from the SAP buffer without accessing the database. This does not apply when you use:
- JOIN in the FROM clause or subqueries in the WHERE clause, for example,
- SELECT SINGLE FOR UPDATE or
- SELECT DISTINCT in the SELECT clause ,
- BYPASSING BUFFER in the FROM clause,
- ORDER BY f1 ... fn in the ORDER BY clause,
- <b>Aggregate functions in the SELECT clause,</b>
- When you use IS [NOT] NULL in the WHERE condition,
or when the table has generic buffering and the appropriate section of the key is not specified in the WHERE condition.
i think better to take all the values in an int table(if your table does not contain lots of records) and sort the itab by value and read the first line.
select value into table itab from zemployee.
sort itab.
read itab index 1.
write : / itab-value.
regards
shiba dutta