<?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 with BSAD table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-bsad-table/m-p/2603837#M596605</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are not using any of the primary or secondary key fields for these SELECTs, so they will be slow. You can speed it up by using BKPF and BSEG instead because BKPF has a secondary index on BLDAT. It's better if you also know the company code, but if you don't, there are still ways to speed this up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did a bit of playing around with this and found that using BKPF and BSEG didn't help - probably too many tests for non-equal conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the solution proposed by Ashim looks best now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rob Burbank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Jul 2007 13:04:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-31T13:04:28Z</dc:date>
    <item>
      <title>performance issue with BSAD table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-bsad-table/m-p/2603832#M596600</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 a performance issue with the table BSAD.&lt;/P&gt;&lt;P&gt;I have an excel which has nearly 1660 records with ZUONR - Assignment number only in that records&lt;/P&gt;&lt;P&gt;But on the report selection screen i have UMSKZ - Special G/L Indicator and in the select query where clause i use AUGDT - Clearing Date &amp;amp; BLDAT - Document date in document&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With these fields i query on the BSAD table using for all entries of the excel internal table which has 1660 records.&lt;/P&gt;&lt;P&gt;But seems that this is taking long time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any body increase the performance of this query. &lt;/P&gt;&lt;P&gt;More over i have been using Appending table for it_accnt&lt;/P&gt;&lt;P&gt;Is it likely that i should be giving in more KEY fields in the WHERE clause.&lt;/P&gt;&lt;P&gt;see my query below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* Selecting Data from BSID and BSAD tables
  select bukrs kunnr umskz zuonr gjahr belnr bldat
         xblnr shkzg dmbtr wrbtr sgtxt zfbdt
         from bsid
         into table it_accnt
         for all entries in it_tab1 " IT_TAB1 HAS 1660 RECORDS
         where umskz in so_umskz
           and zuonr eq it_tab1-zuonr
           and bldat le p_date.
 
  select bukrs kunnr umskz zuonr gjahr belnr bldat
         xblnr shkzg dmbtr wrbtr sgtxt zfbdt
         from bsad
         appending table it_accnt
         for all entries in it_tab1 " IT_TAB1 HAS 1660 RECORDS
         where umskz in so_umskz
           and zuonr eq it_tab1-zuonr
           and bldat le p_date
           and augdt ge p_date.
 
  if not it_accnt[] is initial.
    sort it_accnt by bukrs kunnr zuonr.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;lt;b&amp;gt;Kindly suggest, its urgent&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pratyusha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 02:31:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-bsad-table/m-p/2603832#M596600</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T02:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue with BSAD table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-bsad-table/m-p/2603833#M596601</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 to use inner join between the tables bsad and bsid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Navneeth K.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 03:37:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-bsad-table/m-p/2603833#M596601</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T03:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue with BSAD table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-bsad-table/m-p/2603834#M596602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can any body please answer???&lt;/P&gt;&lt;P&gt;Points for sure .. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 06:13:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-bsad-table/m-p/2603834#M596602</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T06:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue with BSAD table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-bsad-table/m-p/2603835#M596603</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 using all key fields in your queries&lt;/P&gt;&lt;P&gt;In your second query instead of using appending, use INTO table and then you can consolidate into 1 singl etable by using the ABAP statement APPEND LINES OF...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check if this improves the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good option is to avois for all entries. Workaround would be to create  a new range table for ZUONR.&lt;/P&gt;&lt;P&gt;loop at it_tab1 .&lt;/P&gt;&lt;P&gt;append to new range table.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use zuonr IN IT_RANGE in both your queries.&lt;/P&gt;&lt;P&gt;This will increase ABAP time but reduce DB access definetly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls award pts if useful&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shruthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 06:26:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-bsad-table/m-p/2603835#M596603</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T06:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue with BSAD table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-bsad-table/m-p/2603836#M596604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Do you a select option for special GL indicator (so_umskz)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check if you can use a simple checkbox in the selection screen and have the condition like where umskz = p_umskz ( a parameter)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the data in driver table it_tab1. If it has duplicate records of zuonr U can use this trick&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a temo table say it_temp like it_tab1.&lt;/P&gt;&lt;P&gt;Now it_temp[] = it_tab1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create a sorted and unique driver table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;sort it_temp by zuonr.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from it_temp comparing zuonr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now use it_temo as the driver table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check if u can have the Fiscal Year (GJAHR) as one of the selection parameter.&lt;/P&gt;&lt;P&gt;-Regards&lt;/P&gt;&lt;P&gt;Ashim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:32:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-bsad-table/m-p/2603836#M596604</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T09:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue with BSAD table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-bsad-table/m-p/2603837#M596605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are not using any of the primary or secondary key fields for these SELECTs, so they will be slow. You can speed it up by using BKPF and BSEG instead because BKPF has a secondary index on BLDAT. It's better if you also know the company code, but if you don't, there are still ways to speed this up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did a bit of playing around with this and found that using BKPF and BSEG didn't help - probably too many tests for non-equal conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the solution proposed by Ashim looks best now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rob Burbank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 13:04:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-bsad-table/m-p/2603837#M596605</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T13:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue with BSAD table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-bsad-table/m-p/2603838#M596606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used the primary keys BUKRS KUNNR and it solved to a maximum extent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 02:20:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-bsad-table/m-p/2603838#M596606</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-01T02:20:27Z</dc:date>
    </item>
  </channel>
</rss>

