<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Regarding Table Buffering.. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578415#M1272314</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my Code Inspector is throwing warning saying..&lt;/P&gt;&lt;P&gt;Select single record ad it is buffered table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know how to remove that warning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Priyanka..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 May 2009 13:26:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-21T13:26:02Z</dc:date>
    <item>
      <title>Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578412#M1272311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement to get the data from SKAT table i.e - Text field (TXT20) for the corresponding GL Account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My issue is I have to get the TXT20 for the corresponding GL accounts selected into an internal table.&lt;/P&gt;&lt;P&gt;But as SKAT table is buffered it has performance issue..&lt;/P&gt;&lt;P&gt;I have to use..select single...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know how to do that..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get TXT20 from SKAT for the corresponding GL Accounts in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reagrds,&lt;/P&gt;&lt;P&gt;Priyanka.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 13:08:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578412#M1272311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T13:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578413#M1272312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Use below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS: 
COA LIKE T004-KTOPL DEFAULT 'CAEK',

SKA1 = SPACE.

SELECT * FROM SKA1 WHERE KTOPL = COA.

SELECT SINGLE * FROM SKAT WHERE SPRAS = 'E' AND
  KTOPL = COA AND
  SAKNR = SKA1-SAKNR.

IF SY-SUBRC = 0.
  ITAB-TXT20 = SKAT-TXT20.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 13:18:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578413#M1272312</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T13:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578414#M1272313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; But as SKAT table is buffered it has performance issue.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Buffering is done to &lt;U&gt;improve&lt;/U&gt; performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 13:21:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578414#M1272313</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T13:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578415#M1272314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my Code Inspector is throwing warning saying..&lt;/P&gt;&lt;P&gt;Select single record ad it is buffered table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know how to remove that warning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Priyanka..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 13:26:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578415#M1272314</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T13:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578416#M1272315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It gives no errors or even warnings when I try it. Are you using the full primary key in the SELECT?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 13:41:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578416#M1272315</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T13:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578417#M1272316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am taking the HKONT values from bseg into an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select  spras ktopl saknr txt20 into table it_skat&lt;/P&gt;&lt;P&gt;for all entries of it_bseg&lt;/P&gt;&lt;P&gt;where spras = 'E'&lt;/P&gt;&lt;P&gt;       and ktopl = 'PCOA'&lt;/P&gt;&lt;P&gt;      and  saknr = it_bseg-hkont.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my query...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Priyanka...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 13:48:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578417#M1272316</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T13:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578418#M1272317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess if you are not using SELECT SINGLE, it will give this warning. I'd ignore it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 14:08:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578418#M1272317</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T14:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578419#M1272318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do that using select single?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also can u please let me know how to reduce the Data Base Performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priyanka.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 14:12:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578419#M1272318</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T14:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578420#M1272319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This gives no warnings:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT it_bseg.
  SELECT SINGLE spras ktopl saknr txt20
    FROM skat
    INTO it_skat
    WHERE spras = 'E'
       AND ktopl = 'PCOA'
       AND  saknr = it_bseg-hkont.
  IF sy-subrc = 0.
    APPEND it_skat.
  ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But performance will be worse if you do it this way. That's why I suggested ignoring the warning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is more a performance question, so I'm moving it there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on May 21, 2009 10:30 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 14:30:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578420#M1272319</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T14:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578421#M1272320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;Hi Priyanka,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in my system SKAT is single record buffered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ONLY way to read from single record buffer up to 7.0 EhP1 is&lt;/P&gt;&lt;P&gt;to use a SELECT SINGLE and the fully specified primary key (MANDT, SPRAS, KTOPL, SAKNR).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So actually this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
LOOP AT it_bseg.
  SELECT SINGLE spras ktopl saknr txt20
    FROM skat
    INTO it_skat
    WHERE spras = 'E'
       AND ktopl = 'PCOA'
       AND  saknr = it_bseg-hkont.
  IF sy-subrc = 0.
    APPEND it_skat.
  ENDIF.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should be faster than this (10 times or even more):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
Select spras ktopl saknr txt20 into table it_skat
for all entries of it_bseg
where spras = 'E'
and ktopl = 'PCOA'
and saknr = it_bseg-hkont.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because the FAE (FOR ALL ENTRIES) does bypass the table buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course it will be only faster when the buffer is filled. There fore run&lt;/P&gt;&lt;P&gt;it several times if you want to compare it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try it and post the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use ST05 SQL Trace and ST05 Table Buffer Trace to see&lt;/P&gt;&lt;P&gt;which OPEN SQL statement uses the buffer and which statement&lt;/P&gt;&lt;P&gt;bypasses it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hermann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 15:34:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578421#M1272320</guid>
      <dc:creator>HermannGahm</dc:creator>
      <dc:date>2009-05-21T15:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578422#M1272321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; ...&lt;/P&gt;&lt;P&gt;&amp;gt; should be faster than this (10 times or even more):&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hmmmm..... I think that's right Hermann. &lt;EM&gt;Mea Culpa&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But wouldn't bseg_int have to be sorted in hkont order for this to be effective?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I don't think that is even right - sorting shouldn't make a difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on May 21, 2009 12:37 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 15:56:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578422#M1272321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T15:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578423#M1272322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK - enough of this being wrong all the time. I did a quick test to find out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SELECT SINGLE/APPEND/ENDSELECT ran about 3 times faster in a development environment than FAE whether or not IT_BSEG was sorted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, in a test environment, the FAE was slightly &lt;EM&gt;faster!&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I also tried another method - the one which I normally use in this sort of situation. Instead of doing the SELECT SINGLE/APPEND/ENDSELECT for each entry in IT_BSEG, I first used a binary search on IT_SKAT to see if it had already been retrieved. If it had, I didn't bother SELECTing again. This ran about 4 times faster than the other two methods (and would get rid of the warning from the code inspector).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 21:17:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578423#M1272322</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T21:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578424#M1272323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; However, in a test environment, the FAE was slightly &lt;EM&gt;faster!&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&amp;gt; Rob&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is quite interesting. &lt;/P&gt;&lt;P&gt;Have you double checked with ST05 that the SELECT SINGLE &lt;EM&gt;uses&lt;/EM&gt; the &lt;/P&gt;&lt;P&gt;table buffer? In ST05 you should have yellow lines for FAE and&lt;/P&gt;&lt;P&gt;blue lines for SELECT single, if you switch on ST05 SQL Trace and ST05&lt;/P&gt;&lt;P&gt;Table Buffer Trace at the same time. The SELECT SINGLE should be faster...&lt;/P&gt;&lt;P&gt;if it uses the SAP table buffer (blue line). Could it be that your SELECT SINGLE&lt;/P&gt;&lt;P&gt;couldn't use the SAP table buffer e.g. because the SKAT table was not in it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you could provide the details showing the the faster DB Access compared to the&lt;/P&gt;&lt;P&gt;SAP table buffer acces I would be keen to get more details from you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; But I also tried another method - the one which I normally use in this sort of situation. Instead of doing the SELECT SINGLE/APPEND/ENDSELECT for each entry in IT_BSEG, I first used a binary search on IT_SKAT to see if it had already been retrieved. If it had, I didn't bother SELECTing again. This ran about 4 times faster than the other two methods (and would get rid of the warning from the code inspector).&lt;/P&gt;&lt;P&gt;&amp;gt; Rob&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes. &lt;/P&gt;&lt;P&gt;Talking about buffered Access (efficient key accesses, no linear serach):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- internal tables are faster than the SAP Table buffer&lt;/P&gt;&lt;P&gt;- SAP table buffer is faster than buffered DB (cache)&lt;/P&gt;&lt;P&gt;- buffered DB (cache) is faster then unbuffered DB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is at least the theory and it matches my experience so far.&lt;/P&gt;&lt;P&gt;That's why I'm so interested in your faster FAE... .&lt;/P&gt;&lt;P&gt;Thank you already in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Buffering in internal tables (in the internal mode) is the fastest. But it is as well&lt;/P&gt;&lt;P&gt;the buffer mode which needs the most memory. Since in the internal mode the&lt;/P&gt;&lt;P&gt;memory for table sktat is allocated per USER (executing the Program). For the SAP table buffer&lt;/P&gt;&lt;P&gt;the memory for the table skat is allocated once in  apllication server level (not per user).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hermann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 23:26:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578424#M1272323</guid>
      <dc:creator>HermannGahm</dc:creator>
      <dc:date>2009-05-21T23:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578425#M1272324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i just did it myself here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the attached trace you can see:&lt;/P&gt;&lt;P&gt;- REOPEN / FETCH pairs for DB Access (403 micro seconds, 207 micro seconds and 227 micro seconds...)&lt;/P&gt;&lt;P&gt;- the READ SI for the SAP Table Buffer acces. (30 micro seconds, 18 micro seconds, 21 micro seconds...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Duration  Obj. name  Op.     Recs. RC     Statement

        8 SKAT       REOPEN             0 SELECT WHERE "MANDT" = '100' AND "SPRAS" = '1' AND
      395 SKAT       FETCH       5   1403
       13 SKAT       READ SI     1      0 P 36 1001C0010010010100
        5 SKAT       READ SI     1      0 P 36 1001C0010010010200
        4 SKAT       READ SI     1      0 P 36 1001C0010010110000
        4 SKAT       READ SI     1      0 P 36 1001C0010010110001
        4 SKAT       READ SI     1      0 P 36 1001C0010010110002
        7 SKAT       REOPEN             0 SELECT WHERE "MANDT" = '100' AND "SPRAS" = '1' AND
      200 SKAT       FETCH       5   1403
        4 SKAT       READ SI     1      0 P 36 1001C0010010010100
        3 SKAT       READ SI     1      0 P 36 1001C0010010010200
        4 SKAT       READ SI     1      0 P 36 1001C0010010110000
        4 SKAT       READ SI     1      0 P 36 1001C0010010110001
        3 SKAT       READ SI     1      0 P 36 1001C0010010110002
        6 SKAT       REOPEN             0 SELECT WHERE "MANDT" = '100' AND "SPRAS" = '1' AND
      222 SKAT       FETCH       5   1403
        5 SKAT       READ SI     1      0 P 36 1001C0010010010100
        4 SKAT       READ SI     1      0 P 36 1001C0010010010200
        4 SKAT       READ SI     1      0 P 36 1001C0010010110000
        4 SKAT       READ SI     1      0 P 36 1001C0010010110001
        4 SKAT       READ SI     1      0 P 36 1001C0010010110002
...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ST12 result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Form DATABASE_ACCESS = 1517 microseconds. (for 5 times FAE)&lt;/P&gt;&lt;P&gt;Form DATABASE_ACCESS =  225 microseconds. (for 5 times SELECT SINGLE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
__ Call                                              No.   Gross =    Net Gross (%) Net (%)

   Form DATABASE_ACCESS                                5  1,517  = 1,517      13.0    13.0
   Select SKAT                                         5  1,453  = 1,453      12.5    12.5
   ...
   Form SAP_TABLE_BUFFER_ACCESS                        5    225  =   225       1.9     1.9
   Select Single SKAT                                 25    152  =   152       1.3     1.3

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should get similar results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KInd regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hermann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 23:56:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578425#M1272324</guid>
      <dc:creator>HermannGahm</dc:creator>
      <dc:date>2009-05-21T23:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578426#M1272325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for single record buffered tables you MUST use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP at itab
   SELECT SINGLE
                 FROM dbtab
                 WHERE ... fully specified key with equal conditions
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will be much faster than any other access. But when yoz measure, you should not measure&lt;/P&gt;&lt;P&gt;how the buffer is filled!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;that is also a reason, why  AVOID SELECT SINGLE IN A LOOP is nonsense!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;it always depends.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2009 09:13:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578426#M1272325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-22T09:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578427#M1272326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Have you double checked with ST05 that the SELECT SINGLE &lt;EM&gt;uses&lt;/EM&gt; the &lt;/P&gt;&lt;P&gt;&amp;gt; table buffer? In ST05 you should have yellow lines for FAE and&lt;/P&gt;&lt;P&gt;&amp;gt; blue lines for SELECT single, if you switch on ST05 SQL Trace and ST05&lt;/P&gt;&lt;P&gt;&amp;gt; Table Buffer Trace at the same time. The SELECT SINGLE should be faster...&lt;/P&gt;&lt;P&gt;&amp;gt; if it uses the SAP table buffer (blue line). Could it be that your SELECT SINGLE&lt;/P&gt;&lt;P&gt;&amp;gt; couldn't use the SAP table buffer e.g. because the SKAT table was not in it?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Well, the FAE entries are in bright yellow, but the SELECT SINGLE entries are in dull yellow. SKAT is single record buffered and we are in a DB2 environment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2009 14:51:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578427#M1272326</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-22T14:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578428#M1272327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; the FAE entries are in bright yellow, but the SELECT SINGLE entries are in dull yellow&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;meaning that they appear in the SQL trace, which is actually the database trace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SELECT SINGLE should disappear from the db-trace and move to the buffer trace (must be switched on), then they are blue (dull and bright :).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did not look up the table, but here SELECT SINGLE means the primary key must be specified,&lt;/P&gt;&lt;P&gt;not just any key with SELECT SINGLE, otherwise single-record buffer will not be accessed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2009 15:02:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578428#M1272327</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-22T15:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578429#M1272328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I'd never used the bufrer trace, so I'm learning something today! But the FAE DB trace remained in bright yellow; nothing for the SELECT SINGLE DB trace. Both buffer traces were in bright blue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Full primary key specified in both cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2009 15:33:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578429#M1272328</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-22T15:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578430#M1272329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;all yellow lines =  statements are sent to the DB.&lt;/P&gt;&lt;P&gt;all blue lines = statements are not sent to the DB but executed in the SAP table buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you should find FAE lines = yello because they can not use the table buffer and the select single lines in blue because they should use the table buffer (if full key is specified and SINGLE is in the statement and the record searched for is in the buffer.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can as well put each Statement in a form and run SE30. If nothing else but the statement itself is in the form you can use the gross time of the form for performance comparison like i did. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single on buffered entries should be much faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hermann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2009 16:14:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578430#M1272329</guid>
      <dc:creator>HermannGahm</dc:creator>
      <dc:date>2009-05-22T16:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Table Buffering..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578431#M1272330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wonder if it has something to do with FAE eliminating duplicates. My it_bseg has 10,000 entries, but it_skat only 68 for FAE, but 10,000 for SELECT SINGLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2009 16:22:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-table-buffering/m-p/5578431#M1272330</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-22T16:22:34Z</dc:date>
    </item>
  </channel>
</rss>

