‎2008 Feb 15 8:23 AM
Hi everybody.
I've got a very strange problem, when i'm doing a select count* the result is giving me a value that is not the maximum (but when i check the database table the maximum value is another..)
Could it be that the select command is not executing against the table, rather than the SAP cache??
If this is the case, how can i avoid this?? I mean force the select command to execute against de DB table.
thanks a lot.
‎2008 Feb 15 8:33 AM
to get max value of a table u can use
Select max( fld )............
Bypassing the SAP buffer with the above additions is a means to increase the performance when accessing buffered database tables. To explicitly bypass the SAP buffer in the SELECT statement, always use the addition BYPASSING BUFFER instead of the implicit behavior of the additions stated above.
‎2008 Feb 15 8:42 AM
Hi,
Can you paste your code here so that we can guess the problem.
‎2008 Feb 15 8:48 AM
select max( pernr )
into l_numero
from z22hr_t_001_ci
where pernr gt l_desde and
pernr lt l_hasta.
I will try bypassing buffer. I hope it'll work.