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

Select count * is not working

Former Member
0 Likes
661

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.

3 REPLIES 3
Read only

Former Member
0 Likes
517

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.

Read only

Former Member
0 Likes
517

Hi,

Can you paste your code here so that we can guess the problem.

Read only

0 Likes
517

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.