<?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/4952214#M1154672</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;Give this a try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: r_belnr  TYPE TABLE OF selopt.

FIELD-SYMBOLS: &amp;lt;fs_belnr&amp;gt; TYPE selopt.

APPEND INITIAL LINE TO r_belnr ASSIGNING &amp;lt;fs_belnr&amp;gt;.
&amp;lt;fs_belnr&amp;gt;-sign = 'I'.
&amp;lt;fs_belnr&amp;gt;-option = 'CP'.
&amp;lt;fs_belnr&amp;gt;-low    = '24*'.

APPEND INITIAL LINE TO r_belnr ASSIGNING &amp;lt;fs_belnr&amp;gt;.
&amp;lt;fs_belnr&amp;gt;-sign = 'I'.
&amp;lt;fs_belnr&amp;gt;-option = 'CP'.
&amp;lt;fs_belnr&amp;gt;-low    = '004*'.

SELECT bukrs belnr gjahr buzei projk buzei
       bschl shkzg mwskz dmbtr 
       mwsts lifnr menge
  FROM bseg
  INTO TABLE i_bseg_a
 WHERE bukrs = x_bukrs-bukrs 
   AND belnr IN r_belnr
   AND gjahr = w_yr_low.
IF sy-subrc &amp;lt;&amp;gt; 0.
  "Error handling
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: James Gaddis on Dec 11, 2008 3:33 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Dec 2008 20:32:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-11T20:32:41Z</dc:date>
    <item>
      <title>Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4952211#M1154669</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;I am facing performance issue in this select statement.&lt;/P&gt;&lt;P&gt;Can you suggest me alternate code to increase the performance of the below statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;SELECT bukrs belnr gjahr projk buzei&lt;/STRONG&gt;*&lt;/P&gt;&lt;P&gt;         *&lt;STRONG&gt;bschl shkzg mwskz dmbtr&lt;/STRONG&gt;*&lt;/P&gt;&lt;P&gt;         *&lt;STRONG&gt;mwsts lifnr menge&lt;/STRONG&gt;*&lt;/P&gt;&lt;P&gt;         *&lt;STRONG&gt;FROM   bseg&lt;/STRONG&gt;*&lt;/P&gt;&lt;P&gt;         *&lt;STRONG&gt;INTO   TABLE i_bseg_a&lt;/STRONG&gt;*&lt;/P&gt;&lt;P&gt;         *&lt;STRONG&gt;WHERE  belnr LIKE '24%'&lt;/STRONG&gt;*&lt;/P&gt;&lt;P&gt;                *&lt;STRONG&gt;OR belnr LIKE '004%'&lt;/STRONG&gt;*&lt;/P&gt;&lt;P&gt;                 *&lt;STRONG&gt;AND bukrs EQ x_bukrs-bukrs&lt;/STRONG&gt;*&lt;/P&gt;&lt;P&gt;                 *&lt;STRONG&gt;AND gjahr EQ w_yr_low.&lt;/STRONG&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;Mahesh KUmar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 19:47:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4952211#M1154669</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T19:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4952212#M1154670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of like statement try to use &amp;gt;= = '24000000' &amp;lt;= '239999999' etc..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 19:55:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4952212#M1154670</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T19:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4952213#M1154671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Also in addition to the above suggestion, the order in which you have specified the fields in the where clause is wrong.&lt;/P&gt;&lt;P&gt;Give BUKRS, BELNR and then GJAHR. Also add some more criteria's from the BKPF table like document creation date, posting date etc. Otherwise you will end up selecting all the documents present in the BSEG table startiing with 24.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 20:08:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4952213#M1154671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T20:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4952214#M1154672</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;Give this a try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: r_belnr  TYPE TABLE OF selopt.

FIELD-SYMBOLS: &amp;lt;fs_belnr&amp;gt; TYPE selopt.

APPEND INITIAL LINE TO r_belnr ASSIGNING &amp;lt;fs_belnr&amp;gt;.
&amp;lt;fs_belnr&amp;gt;-sign = 'I'.
&amp;lt;fs_belnr&amp;gt;-option = 'CP'.
&amp;lt;fs_belnr&amp;gt;-low    = '24*'.

APPEND INITIAL LINE TO r_belnr ASSIGNING &amp;lt;fs_belnr&amp;gt;.
&amp;lt;fs_belnr&amp;gt;-sign = 'I'.
&amp;lt;fs_belnr&amp;gt;-option = 'CP'.
&amp;lt;fs_belnr&amp;gt;-low    = '004*'.

SELECT bukrs belnr gjahr buzei projk buzei
       bschl shkzg mwskz dmbtr 
       mwsts lifnr menge
  FROM bseg
  INTO TABLE i_bseg_a
 WHERE bukrs = x_bukrs-bukrs 
   AND belnr IN r_belnr
   AND gjahr = w_yr_low.
IF sy-subrc &amp;lt;&amp;gt; 0.
  "Error handling
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: James Gaddis on Dec 11, 2008 3:33 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 20:32:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4952214#M1154672</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T20:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4952215#M1154673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The order of the WHERE makes no difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in this case, missing parenthesis is the problem. You are picking up all documents that start with '24'.&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;Edited by: Rob Burbank on Dec 12, 2008 9:13 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 20:33:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4952215#M1154673</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T20:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4952216#M1154674</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 ranges fro beln...&lt;/P&gt;&lt;P&gt;Use always, key fields,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Krishna..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2008 04:05:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4952216#M1154674</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-12T04:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4952217#M1154675</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 fields you are retrieving exists also in tables : BSIS, BSID, BSIK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please try to use other table like BSIS instead of BSEG which is a cluster table.&lt;/P&gt;&lt;P&gt;This will improve performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Dev.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2008 15:31:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4952217#M1154675</guid>
      <dc:creator>dev_parbutteea</dc:creator>
      <dc:date>2008-12-12T15:31:03Z</dc:date>
    </item>
  </channel>
</rss>

