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

By Passing Table Buffer

Former Member
0 Likes
784

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.

6 REPLIES 6
Read only

Former Member
0 Likes
680

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.

Read only

Former Member
0 Likes
680

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.

Read only

Former Member
0 Likes
680

Sorry to tell you I need to select a single value so I am using select single.

Read only

0 Likes
680

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..

Read only

0 Likes
680

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

Read only

Former Member
0 Likes
680

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