<?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 query taking more time.. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477991#M1418487</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;Make sure your Internal Table should not be intiial for that you have to use if statement before using FOR ALL ENTRIES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tri this it may work.&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;Sudhakar Reddy Allam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Dec 2009 11:35:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-28T11:35:35Z</dc:date>
    <item>
      <title>Select query taking more time..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477985#M1418481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The  below select queries are taking more time , in tried for secondary index but not found .&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;             loekz&lt;/P&gt;&lt;P&gt;             aedat&lt;/P&gt;&lt;P&gt;             TXZ01&lt;/P&gt;&lt;P&gt;             MATNR&lt;/P&gt;&lt;P&gt;             werks&lt;/P&gt;&lt;P&gt;             BEDNR&lt;/P&gt;&lt;P&gt;             menge&lt;/P&gt;&lt;P&gt;             meins&lt;/P&gt;&lt;P&gt;             ELIKZ&lt;/P&gt;&lt;P&gt;             KNTTP&lt;/P&gt;&lt;P&gt;             LABNR&lt;/P&gt;&lt;P&gt;                FROM ekpo INTO TABLE gt_ekpo_all&lt;/P&gt;&lt;P&gt;                     FOR ALL ENTRIES IN gt_ekko WHERE&lt;/P&gt;&lt;P&gt;                         ebeln EQ gt_ekko-ebeln  " commenetd by chetan on 2009/11/13&lt;/P&gt;&lt;P&gt;                         and  loekz = ' '&lt;/P&gt;&lt;P&gt;                           AND matnr IN matnr&lt;/P&gt;&lt;P&gt;                           AND werks IN werks&lt;/P&gt;&lt;P&gt;                           AND bednr IN bednr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal table gt_ekko is having 277283 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT OBJECTCLAS&lt;/P&gt;&lt;P&gt;       OBJECTID&lt;/P&gt;&lt;P&gt;       UDATE&lt;/P&gt;&lt;P&gt;       TCODE&lt;/P&gt;&lt;P&gt;            FROM cdhdr INTO TABLE gt_cdhdr2&lt;/P&gt;&lt;P&gt;                  FOR ALL ENTRIES IN gt_cdhdr&lt;/P&gt;&lt;P&gt;                              WHERE objectclas = 'EINKBELEG'&lt;/P&gt;&lt;P&gt;                                AND objectid   = gt_cdhdr-objectid &lt;/P&gt;&lt;P&gt;                              AND tcode = 'ME28'.&lt;/P&gt;&lt;P&gt;Internal table gt_cdhdr is having 277283 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please can any one tell how to solve it .I tried writing non primary key outside the select statement by using delete technique then also both are taking more time .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Chetan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Dec 2009 10:04:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477985#M1418481</guid>
      <dc:creator>former_member192432</dc:creator>
      <dc:date>2009-12-24T10:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Select query taking more time..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477986#M1418482</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 points below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The selecting field from EKPO should be in the same order as in DATABSE EKPO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If taking more time try to create a secondary index on ebeln loekz matnr werks bednr &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;NZR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Dec 2009 10:34:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477986#M1418482</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-24T10:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Select query taking more time..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477987#M1418483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nazeer ,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The fields are as per the order only , and i cant create secondary index as a BASIS people instruction .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;chetan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Dec 2009 10:46:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477987#M1418483</guid>
      <dc:creator>former_member192432</dc:creator>
      <dc:date>2009-12-24T10:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Select query taking more time..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477988#M1418484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chetan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use Inner Joins instead of For all entries and try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-manasi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Dec 2009 23:21:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477988#M1418484</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-24T23:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Select query taking more time..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477989#M1418485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;keep vbeln only in where clause and remove other fields from where clause. once you fetched record into internal table do deletion on internal table. dont create secondary index.&lt;/P&gt;&lt;P&gt;ex.&lt;/P&gt;&lt;P&gt;delete tabel gt_ekpo where matnr not in matnr or &lt;/P&gt;&lt;P&gt;werks not in werks o&lt;/P&gt;&lt;P&gt;r bednr not in bednr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Dec 2009 17:45:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477989#M1418485</guid>
      <dc:creator>Peranandam</dc:creator>
      <dc:date>2009-12-25T17:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Select query taking more time..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477990#M1418486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chetan , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should use ST05(trace) to check which index is being accessed. As per my understanding , if their are no secondary index avaliable , then it will take primary index and hence you will not get a major performance improvement by creating secondary index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to use some more fields in where clause , you can also make screen fields mandatory to reduce number of entries in internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Dec 2009 12:02:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477990#M1418486</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-26T12:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Select query taking more time..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477991#M1418487</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;Make sure your Internal Table should not be intiial for that you have to use if statement before using FOR ALL ENTRIES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tri this it may work.&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;Sudhakar Reddy Allam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2009 11:35:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477991#M1418487</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-28T11:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Select query taking more time..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477992#M1418488</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;in where clause add this also after ebeln&lt;/P&gt;&lt;P&gt;epelp ge l_ebelp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where ebelp is of type ebelp value is initial.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2009 12:01:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477992#M1418488</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-28T12:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Select query taking more time..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477993#M1418489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;1.  Before the forall entries, copy the contents of gt_ekko[] to gt_ekko_temp[] table and sort by ebeln and delete adjacent duplicates.&lt;/P&gt;&lt;P&gt;2. Use the temp table for for all entries. And in where use ebelp ne initial.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2009 12:22:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477993#M1418489</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2009-12-28T12:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Select query taking more time..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477994#M1418490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chetan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Select from EKPO :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       A. First loop at internal table gt_ekpo and collect ebeln into a hash table.&lt;/P&gt;&lt;P&gt;       B. Make use of that hash table while using for all entries. &lt;/P&gt;&lt;P&gt;       C. As per u r requirement even u can check intial values of hash table before select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Select from CDHDR:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      A. First loop at Internal table gt_cdhdr and collect objectid into a hash table.&lt;/P&gt;&lt;P&gt;      B. Use the hash table for all entries.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Dec 2009 07:34:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477994#M1418490</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-29T07:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Select query taking more time..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477995#M1418491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi thanks for reply..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2009 06:54:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-taking-more-time/m-p/6477995#M1418491</guid>
      <dc:creator>former_member192432</dc:creator>
      <dc:date>2009-12-30T06:54:47Z</dc:date>
    </item>
  </channel>
</rss>

