<?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 Performance in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2969495#M700778</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 am supposed to use this query, but it affects the performance, please suggest me how to improve performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajaram&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT shkzg&lt;/P&gt;&lt;P&gt;         skfbt&lt;/P&gt;&lt;P&gt;         dmbtr&lt;/P&gt;&lt;P&gt;         wskto&lt;/P&gt;&lt;P&gt;         belnr&lt;/P&gt;&lt;P&gt;         gjahr&lt;/P&gt;&lt;P&gt;         bukrs&lt;/P&gt;&lt;P&gt;         qbshb&lt;/P&gt;&lt;P&gt;         lifnr&lt;/P&gt;&lt;P&gt;         bschl&lt;/P&gt;&lt;P&gt;         nebtr&lt;/P&gt;&lt;P&gt;         rebzg&lt;/P&gt;&lt;P&gt;         FROM bseg&lt;/P&gt;&lt;P&gt;           INTO corresponding fields of TABLE ibseg&lt;/P&gt;&lt;P&gt;          WHERE bukrs = p_bukrs&lt;/P&gt;&lt;P&gt;            AND belnr NE p_vblnr &lt;/P&gt;&lt;P&gt;            AND augbl = p_vblnr  &lt;/P&gt;&lt;P&gt;            AND auggj = p_gjahr  &lt;/P&gt;&lt;P&gt;            AND koart = 'K'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Oct 2007 05:09:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-25T05:09:35Z</dc:date>
    <item>
      <title>Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2969495#M700778</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 am supposed to use this query, but it affects the performance, please suggest me how to improve performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajaram&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT shkzg&lt;/P&gt;&lt;P&gt;         skfbt&lt;/P&gt;&lt;P&gt;         dmbtr&lt;/P&gt;&lt;P&gt;         wskto&lt;/P&gt;&lt;P&gt;         belnr&lt;/P&gt;&lt;P&gt;         gjahr&lt;/P&gt;&lt;P&gt;         bukrs&lt;/P&gt;&lt;P&gt;         qbshb&lt;/P&gt;&lt;P&gt;         lifnr&lt;/P&gt;&lt;P&gt;         bschl&lt;/P&gt;&lt;P&gt;         nebtr&lt;/P&gt;&lt;P&gt;         rebzg&lt;/P&gt;&lt;P&gt;         FROM bseg&lt;/P&gt;&lt;P&gt;           INTO corresponding fields of TABLE ibseg&lt;/P&gt;&lt;P&gt;          WHERE bukrs = p_bukrs&lt;/P&gt;&lt;P&gt;            AND belnr NE p_vblnr &lt;/P&gt;&lt;P&gt;            AND augbl = p_vblnr  &lt;/P&gt;&lt;P&gt;            AND auggj = p_gjahr  &lt;/P&gt;&lt;P&gt;            AND koart = 'K'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 05:09:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2969495#M700778</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T05:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2969496#M700779</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;BSEG is a cluster table and populating data from BSEG without passing primary keys extracting data will take a long time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can first get data from BSAK / BSAD, then populate data from BSEG using key values of BSAD / BSAK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will definitely improve your performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 05:12:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2969496#M700779</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T05:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2969497#M700780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Take one doc number and search in the tables&lt;/P&gt;&lt;P&gt;BSIK,BSAK  for vendor related&lt;/P&gt;&lt;P&gt;BSIS and BSAS  fofr GL related&lt;/P&gt;&lt;P&gt;BSID and BSAD  for Customer related data&lt;/P&gt;&lt;P&gt;and use the respective tables instead of BSEG&lt;/P&gt;&lt;P&gt;first check physically in those tables and then write a querry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 05:12:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2969497#M700780</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T05:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2969498#M700781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Ram,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, You can do this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use 'INTO table' instead of into corresponding fields of table.&lt;/P&gt;&lt;P&gt;For this you have to have the fields in the same order as they are in the database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;PRitha.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 05:19:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2969498#M700781</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T05:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2969499#M700782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raja,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should use BSIK,BSAK tables instead of BSEG as you only need vendor data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 05:21:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2969499#M700782</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T05:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2969500#M700783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use OPEN CURSOR &amp;amp; FETCH instead of just a SELECT.&lt;/P&gt;&lt;P&gt;Using OPEN CURSOR &amp;amp; FETCH you can limit selections to 1000 records at a time. Also, try using all the keys to improve the performance of selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;    OPEN CURSOR WITH HOLD db_cursor FOR&lt;/P&gt;&lt;P&gt;         SELECT (g_field_list) FROM bseg&lt;/P&gt;&lt;P&gt;                UP TO g_max_docs ROWS&lt;/P&gt;&lt;P&gt;                WHERE bukrs IN r_bukrs&lt;/P&gt;&lt;P&gt;                  AND gjahr =  g_fiscal_year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DO.&lt;/P&gt;&lt;P&gt;      FETCH NEXT CURSOR db_cursor&lt;/P&gt;&lt;P&gt;            INTO CORRESPONDING FIELDS OF TABLE ibseg&lt;/P&gt;&lt;P&gt;            PACKAGE SIZE g_package_size.&lt;/P&gt;&lt;P&gt;      IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;        CLOSE CURSOR db_cursor.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDDO.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 05:27:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2969500#M700783</guid>
      <dc:creator>Sathish</dc:creator>
      <dc:date>2007-10-25T05:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2969501#M700784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Most of the data u need is available in BSIK,BSAK tables.. if any additional if u need from BSEG,&lt;/P&gt;&lt;P&gt;try for all entries with the data u fetch from BSIK and BSAK and fetch these values passing all key fields to BSEG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 05:27:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2969501#M700784</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T05:27:51Z</dc:date>
    </item>
  </channel>
</rss>

