<?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 issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3850335#M925628</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Vindoh-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of the select staement try this BAPI_SALESORDER_GETLIST .&lt;/P&gt;&lt;P&gt;This may improve the perfomance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;~Srini....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 May 2008 10:00:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-12T10:00:43Z</dc:date>
    <item>
      <title>Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3850333#M925626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;I am trying to find out whether any sales order has been created for particular customer in past 6 months. I am writing below query. But it is taking toomuch time for input of around 900 customers. Is there any other way to improve the performance/to know whether sales order is created in past 6 months for a customer.&lt;/P&gt;&lt;P&gt;    SORT i_tab BY kunnr.&lt;/P&gt;&lt;P&gt;    DELETE ADJACENT DUPLICATES FROM i_tab    COMPARING kunnr.&lt;/P&gt;&lt;P&gt;CHECK NOT i_tab[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    SELECT vbeln erdat kunnr&lt;/P&gt;&lt;P&gt;           INTO TABLE i_vbak&lt;/P&gt;&lt;P&gt;           FROM vbak&lt;/P&gt;&lt;P&gt;           FOR ALL ENTRIES IN i_tab&lt;/P&gt;&lt;P&gt;           WHERE kunnr EQ i_tab-kunnr&lt;/P&gt;&lt;P&gt;           AND   erdat GE l_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_date contains 6 months past date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2008 09:53:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3850333#M925626</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2008-05-12T09:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3850334#M925627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;probably use the primary key fields of the table to filter the data first in the select statement....thereafter delete the unwanted records from the internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;give it a try...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to add, you say you are trying to find out WHETHER ANY sales order has been created for a customer. If you are just looking for a yes/no answer for this query, then there is no need to fetch all the data, just a select single will do the trick for you. however if you are looking for a list of all such sales orders then your query is correct and you will have to look at alternative ways of improving its performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Priyank Jain on May 12, 2008 5:58 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2008 09:56:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3850334#M925627</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-12T09:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3850335#M925628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Vindoh-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of the select staement try this BAPI_SALESORDER_GETLIST .&lt;/P&gt;&lt;P&gt;This may improve the perfomance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;~Srini....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2008 10:00:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3850335#M925628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-12T10:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3850336#M925629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vinod,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found there is an secondary index(ERD) to the table VBAK, which has only one field(Created Date - ERDAT). So write select with the where class having only created date and then check whether that sales order has the customer which is in your internal table as shown below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK NOT i_tab[] IS INITIAL.&lt;/P&gt;&lt;P&gt;SELECT vbeln erdat kunnr&lt;/P&gt;&lt;P&gt;INTO TABLE i_vbak&lt;/P&gt;&lt;P&gt;FROM vbak&lt;/P&gt;&lt;P&gt;WHERE erdat GE l_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort i_tab by kunnr.&lt;/P&gt;&lt;P&gt;data v_tabix like sy-tabix.&lt;/P&gt;&lt;P&gt;loop at i_vbak.&lt;/P&gt;&lt;P&gt;  v_tabix = sy-tabix.&lt;/P&gt;&lt;P&gt;  read table i_tab with key kunnr = i_vbak-kunnr binary search.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    delete i_vbak index v_tabix.&lt;/P&gt;&lt;P&gt;  endif.&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;Note that as there is index on created date, this select will take less time.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2008 10:02:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3850336#M925629</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-12T10:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3850337#M925630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;Thanks for the quick responce.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes. First i also thought of select single. But if we use select single then we have to do it in side loop of customers. i.e around 900 hits on data base which may not be advisable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also i can input only customer number and date as input. So i can't go ahead with the BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even i tried interchanging where clause fields as they appear in data base.&lt;/P&gt;&lt;P&gt;SELECT vbeln erdat kunnr&lt;/P&gt;&lt;P&gt;       INTO TABLE i_vbak&lt;/P&gt;&lt;P&gt;       FROM vbak&lt;/P&gt;&lt;P&gt;       FOR ALL ENTRIES IN i_tab&lt;/P&gt;&lt;P&gt;       WHERE erdat GE l_date&lt;/P&gt;&lt;P&gt;       AND   kunnr EQ i_tab-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any work around.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Vinod Kumar Vemuru on May 12, 2008 3:42 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2008 10:08:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3850337#M925630</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2008-05-12T10:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3850338#M925631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sort i_tab by erdat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_tab.&lt;/P&gt;&lt;P&gt;if i_tab-erdat ge l_date.&lt;/P&gt;&lt;P&gt;delete i_tab index sy-tabix.&lt;/P&gt;&lt;P&gt;end if.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;den use&lt;/P&gt;&lt;P&gt;ur code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT i_tab BY kunnr.&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM i_tab COMPARING kunnr.&lt;/P&gt;&lt;P&gt;CHECK NOT i_tab[] IS INITIAL.&lt;/P&gt;&lt;P&gt;SELECT vbeln erdat kunnr&lt;/P&gt;&lt;P&gt;INTO TABLE i_vbak&lt;/P&gt;&lt;P&gt;FROM vbak&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN i_tab&lt;/P&gt;&lt;P&gt;WHERE kunnr EQ i_tab-kunnr&lt;/P&gt;&lt;P&gt;AND erdat GE l_date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2008 10:09:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3850338#M925631</guid>
      <dc:creator>former_member188827</dc:creator>
      <dc:date>2008-05-12T10:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3850339#M925632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Problem solved by first getting data from vakpa and then from vbak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2008 11:27:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3850339#M925632</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2008-05-12T11:27:06Z</dc:date>
    </item>
  </channel>
</rss>

