<?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: Select Single Performance...... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-performance/m-p/3251599#M776459</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;Try like this. syntax may be wrong. but just overview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not itab[] is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select name1 ort1 from kna1 into table i_kna1&lt;/P&gt;&lt;P&gt;for all entries in itab&lt;/P&gt;&lt;P&gt;where kunnr = itab-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bstkd from vbkd into table i_vbkd&lt;/P&gt;&lt;P&gt;for all entries in itab&lt;/P&gt;&lt;P&gt;where vbeln = itab-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select edatu from vbep into table i_vbep&lt;/P&gt;&lt;P&gt;for all entries in itab&lt;/P&gt;&lt;P&gt;where vbeln = itab-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;read table i_kna1 with key kunnr = itab-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table i_vbkd with key vbeln = itab-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table i_vbep with key vbeln = itab-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Dec 2007 16:04:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-31T16:04:52Z</dc:date>
    <item>
      <title>Select Single Performance......</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-performance/m-p/3251597#M776457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have selected from 4 different tables.&lt;/P&gt;&lt;P&gt;How to inprove performance for following Loop.&lt;/P&gt;&lt;P&gt;What i have done is right and i should do in another way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT itab.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE name1 INTO itab-name1&lt;/P&gt;&lt;P&gt;           FROM kna1 WHERE kunnr = itab-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT SINGLE ort01 INTO itab-ort01&lt;/P&gt;&lt;P&gt;           FROM kna1 WHERE kunnr = itab-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT SINGLE bstkd  INTO itab-bstkd&lt;/P&gt;&lt;P&gt;           FROM vbkd WHERE vbeln = itab-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT SINGLE edatu  INTO itab-edatu&lt;/P&gt;&lt;P&gt;           FROM vbep WHERE vbeln = itab-vbeln.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yusuf.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Dec 2007 12:43:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-performance/m-p/3251597#M776457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-31T12:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Select Single Performance......</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-performance/m-p/3251598#M776458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Yusuf,&lt;/P&gt;&lt;P&gt;if possible you should not perform selects in a loop (with columns of the looped table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every time you have to parse (pinning), execute and fetch the data (maybe you are reading the same blocks in the database).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the table itab has not many entries you should use the "FOR ALL ENTRIES" option.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_470/helpdata/en/fc/eb3a1f358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_470/helpdata/en/fc/eb3a1f358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; You can use the option FOR ALL ENTRIES to replace nested select loops by operations on internal tables. This can significantly improve the performance for large sets of selected data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It depends on your underlying database and on your kernel default / custom settings how the statement is executed on the database.&lt;/P&gt;&lt;P&gt;How you can influence the counter (after how many entries in itab a new statement is executed) is described in sapnote #48230&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Dec 2007 15:43:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-performance/m-p/3251598#M776458</guid>
      <dc:creator>stefan_koehler</dc:creator>
      <dc:date>2007-12-31T15:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Select Single Performance......</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-performance/m-p/3251599#M776459</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;Try like this. syntax may be wrong. but just overview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not itab[] is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select name1 ort1 from kna1 into table i_kna1&lt;/P&gt;&lt;P&gt;for all entries in itab&lt;/P&gt;&lt;P&gt;where kunnr = itab-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bstkd from vbkd into table i_vbkd&lt;/P&gt;&lt;P&gt;for all entries in itab&lt;/P&gt;&lt;P&gt;where vbeln = itab-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select edatu from vbep into table i_vbep&lt;/P&gt;&lt;P&gt;for all entries in itab&lt;/P&gt;&lt;P&gt;where vbeln = itab-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;read table i_kna1 with key kunnr = itab-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table i_vbkd with key vbeln = itab-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table i_vbep with key vbeln = itab-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Dec 2007 16:04:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-performance/m-p/3251599#M776459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-31T16:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Select Single Performance......</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-performance/m-p/3251600#M776460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, I used FOR ALL ENTRIES and it works very good and performance also increases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yusuf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jan 2008 05:42:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-performance/m-p/3251600#M776460</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-01T05:42:03Z</dc:date>
    </item>
  </channel>
</rss>

