<?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: performance tuning in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/1521853#M239595</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If at all you`re very sure that you`d need data from itab1 for select query condition use the addition &amp;lt;i&amp;gt;for all entries&amp;lt;/i&amp;gt; else don`t try that. But this addition improves performance compared to looping through itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your second query, instead of table VBFA you can select values from vbak. The reason is table vbfa is sales document flow and hence the record size of the table is larger compared to VBAK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this should help you, if conviced reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Aug 2006 13:56:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-09T13:56:14Z</dc:date>
    <item>
      <title>performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/1521849#M239591</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;&lt;/P&gt;&lt;P&gt;I am having this problem with performance that in a particular SELECT query the earlier programmers has used inner join and for all entries. this is affecting the performance very badly.can you please suggest an alternative so that the performance can be improved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the code goes as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT vbeln&lt;/P&gt;&lt;P&gt;          fkart&lt;/P&gt;&lt;P&gt;          kunag&lt;/P&gt;&lt;P&gt;          bukrs&lt;/P&gt;&lt;P&gt;          fksto&lt;/P&gt;&lt;P&gt;          INTO CORRESPONDING FIELDS OF TABLE i_common_usrstat1&lt;/P&gt;&lt;P&gt;          FROM vbrk&lt;/P&gt;&lt;P&gt;          FOR ALL ENTRIES IN i_billtypes&lt;/P&gt;&lt;P&gt;          WHERE ( fkart = i_billtypes-adjfkart_1 OR&lt;/P&gt;&lt;P&gt;                  fkart = i_billtypes-adjfkart_2 OR&lt;/P&gt;&lt;P&gt;                  fkart = i_billtypes-adjfkart_3 )&lt;/P&gt;&lt;P&gt;          AND fkdat = p_date&lt;/P&gt;&lt;P&gt;          AND bukrs IN s_bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     SELECT b~vbeln&lt;/P&gt;&lt;P&gt;            b~posnr&lt;/P&gt;&lt;P&gt;            b~netwr&lt;/P&gt;&lt;P&gt;            b~mwsbp&lt;/P&gt;&lt;P&gt;            c~vbelv&lt;/P&gt;&lt;P&gt;            c~posnv&lt;/P&gt;&lt;P&gt;            c~waers&lt;/P&gt;&lt;P&gt;            INTO CORRESPONDING FIELDS OF TABLE i_common_usrstat2&lt;/P&gt;&lt;P&gt;            FROM ( vbrp AS b&lt;/P&gt;&lt;P&gt;                   INNER JOIN vbfa AS c&lt;/P&gt;&lt;P&gt;                   ON  ( c&lt;SUB&gt;vbeln = b&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;                   AND   c&lt;SUB&gt;posnn = b&lt;/SUB&gt;posnr&lt;/P&gt;&lt;P&gt;                   AND   c~vbtyp_n = c_invty ) )&lt;/P&gt;&lt;P&gt;            FOR ALL ENTRIES IN i_common_usrstat1&lt;/P&gt;&lt;P&gt;            WHERE b~mandt EQ sy-mandt&lt;/P&gt;&lt;P&gt;            AND   b~vbeln EQ i_common_usrstat1-vbeln.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2006 13:43:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/1521849#M239591</guid>
      <dc:creator>former_member199353</dc:creator>
      <dc:date>2006-08-09T13:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/1521850#M239592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try removing FOR ALL ENTRIES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES is a loop on database. So its better to avoid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2006 13:47:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/1521850#M239592</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-09T13:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/1521851#M239593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try avoiding into corresponding fields...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also dont use this in the where condition.&lt;/P&gt;&lt;P&gt;WHERE b~mandt EQ sy-mandt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps,&lt;/P&gt;&lt;P&gt;keerthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2006 13:52:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/1521851#M239593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-09T13:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/1521852#M239594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suggestions to improve performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Use Loop...EndLoop instead of FOR ALL ENTRIES.&lt;/P&gt;&lt;P&gt;Loop at i_billtypes.&lt;/P&gt;&lt;P&gt;  select vbeln....in s_bukrs.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same for the next query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Avoid using OR conditions in the WHERE condition.&lt;/P&gt;&lt;P&gt;The best is to populate a range using the i_billtypes-adjfkart_1, adjfkart_2 and adjfkart_3 and use the condition FKART IN R_FKART.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anurag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2006 13:54:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/1521852#M239594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-09T13:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/1521853#M239595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If at all you`re very sure that you`d need data from itab1 for select query condition use the addition &amp;lt;i&amp;gt;for all entries&amp;lt;/i&amp;gt; else don`t try that. But this addition improves performance compared to looping through itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your second query, instead of table VBFA you can select values from vbak. The reason is table vbfa is sales document flow and hence the record size of the table is larger compared to VBAK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this should help you, if conviced reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2006 13:56:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/1521853#M239595</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-09T13:56:14Z</dc:date>
    </item>
  </channel>
</rss>

