<?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: Performnace issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performnace-issue/m-p/3380949#M811734</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;The number of records in table IT_A005 is too high to use the FOR ALL ENTRIES OPTION. One solution would ne to copy say 500 records of table IT_A005 and do the same. So loop over table IT_A005, and after each 500 records execute the selection.&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;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Feb 2008 12:50:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-13T12:50:30Z</dc:date>
    <item>
      <title>Performnace issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performnace-issue/m-p/3380946#M811731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     i m fetching data from A005 table and according to selection criteria there is 223,233 entries in the table because of that taking so much time.......and giving runtime error.......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT MARA&lt;SUB&gt;MATNR MAKT&lt;/SUB&gt;MAKTX MARA&lt;SUB&gt;MATKL MARC&lt;/SUB&gt;WERKS&lt;/P&gt;&lt;P&gt;         INTO TABLE IT_MARC&lt;/P&gt;&lt;P&gt;         FROM MARC&lt;/P&gt;&lt;P&gt;         INNER JOIN MARA ON MARC&lt;SUB&gt;MATNR = MARA&lt;/SUB&gt;MATNR&lt;/P&gt;&lt;P&gt;         INNER JOIN MAKT ON MARC&lt;SUB&gt;MATNR = MAKT&lt;/SUB&gt;MATNR&lt;/P&gt;&lt;P&gt;         WHERE MARC~MATNR IN S_MATNR AND&lt;/P&gt;&lt;P&gt;               MARC~WERKS IN S_WERKS AND&lt;/P&gt;&lt;P&gt;               MAKT~SPRAS = 'EN' AND&lt;/P&gt;&lt;P&gt;               MARA~XCHPF = 'X' AND&lt;/P&gt;&lt;P&gt;               MATKL IN S_MATKL.&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;IF IT_MARC[] IS NOT INITIAL.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;SELECT KUNNR MATNR DATBI DATAB KNUMH&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;         &lt;STRONG&gt;FROM A005&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;INTO TABLE IT_A005&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;           &lt;STRONG&gt;FOR ALL ENTRIES IN IT_MARC&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;            &lt;STRONG&gt;WHERE KSCHL = 'ZMRP' AND&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                  &lt;STRONG&gt;VKORG = '1000' AND&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                  &lt;STRONG&gt;VTWEG = '10'   AND&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                  &lt;STRONG&gt;KUNNR IN S_KUNNR AND&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                  &lt;STRONG&gt;MATNR = IT_MARC-MATNR AND&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                  &lt;STRONG&gt;datab le s_datbi-low and&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                  &lt;STRONG&gt;DATBI ge s_datbi-low.&lt;/STRONG&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;      &lt;STRONG&gt;ENDIF.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;during debugiing  report taking time to fetch data from A005 table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF IT_A005[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        SELECT KNUMH KBETR&lt;/P&gt;&lt;P&gt;         FROM KONP&lt;/P&gt;&lt;P&gt;          INTO TABLE IT_KONP&lt;/P&gt;&lt;P&gt;           FOR ALL ENTRIES IN IT_A005&lt;/P&gt;&lt;P&gt;            WHERE KNUMH = IT_A005-KNUMH.&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;&lt;/P&gt;&lt;P&gt;give me some solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2008 12:44:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performnace-issue/m-p/3380946#M811731</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-13T12:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Performnace issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performnace-issue/m-p/3380947#M811732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you need to include primary key field A005-KAPPL for quicker access. It should always have the same value for your selected data, so once you find out which one it is, you can put that literal into your select statement.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: possible values for KAPPL are stored in table T681A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2008 12:47:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performnace-issue/m-p/3380947#M811732</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-02-13T12:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Performnace issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performnace-issue/m-p/3380948#M811733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create the &lt;STRONG&gt;Indexes&lt;/STRONG&gt; for respective database tables, then your problem solved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2008 12:48:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performnace-issue/m-p/3380948#M811733</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-13T12:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Performnace issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performnace-issue/m-p/3380949#M811734</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;The number of records in table IT_A005 is too high to use the FOR ALL ENTRIES OPTION. One solution would ne to copy say 500 records of table IT_A005 and do the same. So loop over table IT_A005, and after each 500 records execute the selection.&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;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2008 12:50:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performnace-issue/m-p/3380949#M811734</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-13T12:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Performnace issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performnace-issue/m-p/3380950#M811735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; Create the &lt;STRONG&gt;Indexes&lt;/STRONG&gt; for respective database tables, then your problem solved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bollocks. Always check first whether you can use an existing, fully qualified primary or secondary key access path.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2008 12:51:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performnace-issue/m-p/3380950#M811735</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-02-13T12:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Performnace issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performnace-issue/m-p/3380951#M811736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use KAPPL in where condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field order should be the same in where condition as in the &lt;/P&gt;&lt;P&gt;table ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field DATAB is after DATBI in the table .. &lt;/P&gt;&lt;P&gt;change the where condition accordingly ..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2008 12:55:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performnace-issue/m-p/3380951#M811736</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-13T12:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Performnace issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performnace-issue/m-p/3380952#M811737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Absolutely no guarantees, but you can try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES a005.

RANGES: r_kappl FOR a005-kappl.

* Get all values of KAPPL into a range table.

MOVE 'EQ' TO r_kappl-option.
MOVE 'I'  TO r_kappl-sign.
SELECT kappl FROM  t681a
  INTO r_kappl-low.
  APPEND r_kappl.
ENDSELECT.

SELECT kunnr matnr datbi datab knumh
  FROM a005
  INTO TABLE it_a005
  FOR ALL ENTRIES IN it_marc
  WHERE kappl IN r_kappl
    AND kschl = 'ZMRP'
    AND vkorg = '1000'
    AND vtweg = '10'
    AND kunnr IN s_kunnr
    AND matnr = it_marc-matnr
    AND datab LE s_datbi-low
    AND datbi GE s_datbi-low.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See if it can use the primary index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2008 17:45:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performnace-issue/m-p/3380952#M811737</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-13T17:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Performnace issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performnace-issue/m-p/3380953#M811738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thnks to all of u i hv tried as all of u said......................&lt;/P&gt;&lt;P&gt;A005 not allowing me to cerate index.......................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hv tried with all primary key and maintain sequence as in the table and removed &lt;STRONG&gt;for all entries&lt;/STRONG&gt;* but still taking so much time&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 04:21:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performnace-issue/m-p/3380953#M811738</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T04:21:49Z</dc:date>
    </item>
  </channel>
</rss>

