06-18-2020 8:39 AM
Hi Experts,
Issue : A fully buffered table say TVARVC is used in a query. I wanted to do a basic check whether the contents are loaded to the buffer for the first time. And expected the second query on the same table to get values from the buffer and not from DB again as it is a buffered table. But i couldn't see the table in ST10.
Steps taken : I have gone through some blogs and checked results for Today - All server & this server in ST10. But there is no field called Buffer state to check whether it is loaded or active as mentioned in few blogs. On running ST10 for today, no records were displayed though i ran select query of a buffered table.
Queries : PLs enlighten me on what could be the issue..how can we make sure that a table is buffered and is active?
Note: Select statement is not having order by or any expressions to bypass the buffer. Pasting it below. Thanks in advance!
SELECT SINGLE low FROM tvarvc INTO @DATA(lv_low)WHERE name = 'A499'AND TYPE = 'S'AND SIGN = 'I'AND low EQ 'STK'.
06-18-2020 10:16 AM
If TVARVC is fully buffered, after this buffered SELECT, it should appear in ST10 with selection criteria "all tables" or "generic key buffered". It works for me. Another solution is to use the SQL trace (ST05) with selection criteria "SQL tables" + "buffer tables" (to see all SQL statements), a buffered access appears in blue, a non-buffered access appears in yellow.
06-18-2020 11:30 AM
Thanks for your response, Sandra! Yes, its fully buffered. i tried in ST05 and ST10 as well. Not getting the desired results.
Attaching the ST05 result of a program where i tried reading from TVARVC twice so that the second time it should fetch from buffer and not from DB. But it dint happen.
06-18-2020 1:17 PM
Sandra, after checking a few blogs, just found that the buffered state is DISPLACED is ST02. Is it because of too many invalidations? This table has Invalidations 3,141. Is it allowed?
Not sure on how to find the reason for displaced state.Could you pls share any info regarding this?
06-18-2020 2:30 PM
According to your ST05 screenshot, TVARVC is not buffered in your system. It's buffered in my ABAP 7.52 system.
In my system, I see the buffer category both in ST02 and in ST10.
Either in the technical attributes of TVARVC it's not buffered or it is switched off
Or the kernel found a reason to execute your SELECT without using the table buffer. Either it's a bug (search SAP notes) or there's a reason hidden in the ABAP documentation ABAP SQL - Table Buffering.
06-18-2020 5:32 PM
Thanks , Sandra.. Found that buffer state is not active due to memory issues.