<?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: performence tuning in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performence-tuning/m-p/2698010#M624633</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See basically for all entries works when u r fetching data in response to another internal table then u can use for all entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select maktx from makt into table it_makt&lt;/P&gt;&lt;P&gt;for all entries in it_mara&lt;/P&gt;&lt;P&gt;where mara eq it_mara-mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vimal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Aug 2007 07:15:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-27T07:15:02Z</dc:date>
    <item>
      <title>performence tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performence-tuning/m-p/2698008#M624631</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;can any body tell me how it will work for all entries statement in select stmnt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Aug 2007 07:08:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performence-tuning/m-p/2698008#M624631</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-27T07:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: performence tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performence-tuning/m-p/2698009#M624632</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;check the belwo code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ekko~ebeln&lt;/P&gt;&lt;P&gt;         ebelp&lt;/P&gt;&lt;P&gt;         ekgrp&lt;/P&gt;&lt;P&gt;         lifnr&lt;/P&gt;&lt;P&gt;         ekpo~aedat&lt;/P&gt;&lt;P&gt;         matkl&lt;/P&gt;&lt;P&gt;         matnr&lt;/P&gt;&lt;P&gt;         mtart&lt;/P&gt;&lt;P&gt;         mfrpn&lt;/P&gt;&lt;P&gt;         netwr&lt;/P&gt;&lt;P&gt;         menge&lt;/P&gt;&lt;P&gt;         netpr&lt;/P&gt;&lt;P&gt;         FROM ekko JOIN ekpo&lt;/P&gt;&lt;P&gt;           ON ekpo&lt;SUB&gt;ebeln = ekko&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;      INTO  TABLE  I_PURCHASE&lt;/P&gt;&lt;P&gt;      WHERE ekgrp IN s_ekgrp&lt;/P&gt;&lt;P&gt;      AND   lifnr IN s_lifnr&lt;/P&gt;&lt;P&gt;      AND   ekko~aedat IN s_aedat&lt;/P&gt;&lt;P&gt;      AND   matkl IN s_matkl&lt;/P&gt;&lt;P&gt;      AND   matnr IN s_matnr&lt;/P&gt;&lt;P&gt;      AND   mtart IN s_mtart&lt;/P&gt;&lt;P&gt;      AND   bsart NE c_sto          &lt;/P&gt;&lt;P&gt;      AND   ekko~ebeln IN s_ebeln. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; IF NOT i_purchase[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT ebeln&lt;/P&gt;&lt;P&gt;           ebelp&lt;/P&gt;&lt;P&gt;           zekkn&lt;/P&gt;&lt;P&gt;           vgabe&lt;/P&gt;&lt;P&gt;           gjahr&lt;/P&gt;&lt;P&gt;           belnr&lt;/P&gt;&lt;P&gt;           buzei&lt;/P&gt;&lt;P&gt;           dmbtr&lt;/P&gt;&lt;P&gt;           menge&lt;/P&gt;&lt;P&gt;           shkzg&lt;/P&gt;&lt;P&gt;           FROM ekbe&lt;/P&gt;&lt;P&gt;    INTO TABLE i_ekbe&lt;/P&gt;&lt;P&gt;    FOR ALL ENTRIES IN i_purchase&lt;/P&gt;&lt;P&gt;    WHERE ebeln = i_purchase-ebeln&lt;/P&gt;&lt;P&gt;    AND   ebelp = i_purchase-ebelp&lt;/P&gt;&lt;P&gt;    AND   vgabe IN (c_1,c_2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;      SORT i_ekbe BY ebeln ebelp .&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Aug 2007 07:12:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performence-tuning/m-p/2698009#M624632</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2007-08-27T07:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: performence tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performence-tuning/m-p/2698010#M624633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See basically for all entries works when u r fetching data in response to another internal table then u can use for all entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select maktx from makt into table it_makt&lt;/P&gt;&lt;P&gt;for all entries in it_mara&lt;/P&gt;&lt;P&gt;where mara eq it_mara-mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vimal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Aug 2007 07:15:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performence-tuning/m-p/2698010#M624633</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-27T07:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: performence tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performence-tuning/m-p/2698011#M624634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If you are inner joining two tables and the data records to be fetched are large in number then the performance is hampered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that case you first select the data from 1 database table say 'mara' into an internal table say itab1 based on some conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in order to fetch other data from a different database table,only for these selected materials in itab1 then we write &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from 'XYZ' into table itab2 for all entries in itab1 where matnr = itab1-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know in case you need any more information on the same.&lt;/P&gt;&lt;P&gt;And if your query is answered please close the post.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;taher&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Aug 2007 07:43:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performence-tuning/m-p/2698011#M624634</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-27T07:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: performence tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performence-tuning/m-p/2698012#M624635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can only use FOR ALL ENTRIES IN ...WHERE ...in a SELECT statement. &lt;/P&gt;&lt;P&gt;SELECT ... FOR ALL ENTRIES IN itab WHERE cond returns the union of the solution sets of all SELECT statements that would result if you wrote a separate statement for each line of the internal table replacing the symbol itab-f with the corresponding value of component f in the WHERE condition.Duplicates are discarded from the result set. If the internal table itab does not contain any entries, the system treats the statement as though there were no WHERE cond condition, and selects all records (in the current client). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM sflight INTO wa_sflight  &lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN ftab  &lt;/P&gt;&lt;P&gt;WHERE CARRID = ftab-carrid AND  &lt;/P&gt;&lt;P&gt;             CONNID = ftab-connid AND  &lt;/P&gt;&lt;P&gt;                 fldate = '20010228'.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This condition, return all entries of the sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using FOR ALL ENTRIES the number of matching records is restricted to the number of records in the internal table. If the number of records in the database tables is too large then join would cause overheads in performance. Additionally a JOIN bypasses the table buffering.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;follow these links for knowing the difference between For all entries and joins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.erpgenie.com/abap/performance.htm#For%20all%20entries" target="test_blank"&gt;http://www.erpgenie.com/abap/performance.htm#For%20all%20entries&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://blogs.ittoolbox.com/sap/db2/archives/for-all-entries-vs-db2-join-8912" target="test_blank"&gt;http://blogs.ittoolbox.com/sap/db2/archives/for-all-entries-vs-db2-join-8912&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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>Mon, 27 Aug 2007 07:47:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performence-tuning/m-p/2698012#M624635</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-27T07:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: performence tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performence-tuning/m-p/2698013#M624636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The for all entries creates a where clause, where all the entries in the driver table are combined with OR. If the number of entries in the driver table is larger than rsdb/max_blocking_factor, several similar SQL statements are executed to limit the length of the WHERE clause. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;merits:----&lt;/P&gt;&lt;P&gt;Large amount of data &lt;/P&gt;&lt;P&gt;Mixing processing and reading of data &lt;/P&gt;&lt;P&gt;Fast internal reprocessing of data &lt;/P&gt;&lt;P&gt;Fast &lt;/P&gt;&lt;P&gt;demerits:------&lt;/P&gt;&lt;P&gt;Difficult to program/understand &lt;/P&gt;&lt;P&gt;Memory could be critical (use FREE or PACKAGE size) &lt;/P&gt;&lt;P&gt;Some steps that might make FOR ALL ENTRIES more efficient: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Removing duplicates from the driver table &lt;/P&gt;&lt;P&gt;Sorting the driver table &lt;/P&gt;&lt;P&gt;If possible, convert the data in the driver table to ranges so a BETWEEN statement is used instead of and OR statement: &lt;/P&gt;&lt;P&gt;               FOR ALL ENTRIES IN i_tab&lt;/P&gt;&lt;P&gt;                  WHERE mykey &amp;gt;= i_tab-low and&lt;/P&gt;&lt;P&gt;             mykey &amp;lt;= i_tab-high.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Aug 2007 07:54:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performence-tuning/m-p/2698013#M624636</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-27T07:54:07Z</dc:date>
    </item>
  </channel>
</rss>

