<?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/933801#M61472</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was thinking the same as Rob.  Give that a try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Aug 2005 13:36:12 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2005-08-19T13:36:12Z</dc:date>
    <item>
      <title>Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933794#M61465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;         Is any better way to write this query. &lt;/P&gt;&lt;P&gt;iaufnr is containing atleast 10000 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CHECK NOT iaufnr[] IS INITIAL.&lt;/P&gt;&lt;P&gt;     SORT iaufnr BY aufnr.&lt;/P&gt;&lt;P&gt;  DELETE ADJACENT DUPLICATES FROM iaufnr.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; SELECT aufnr belnr emtyp&lt;/P&gt;&lt;P&gt;  FROM auaa&lt;/P&gt;&lt;P&gt;  INTO corresponding fields of TABLE iauaa&lt;/P&gt;&lt;P&gt;  FOR ALL ENTRIES IN iaufnr&lt;/P&gt;&lt;P&gt;  WHERE aufnr =  iaufnr-aufnr.&lt;/P&gt;&lt;P&gt;delete iauaa where emtyp &amp;lt;&amp;gt; 'OR'.&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;Dilip&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Diliip Gupchup&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2005 12:53:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933794#M61465</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-19T12:53: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/933795#M61466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks ok to me.   Does it run a long time?   How is iaufnr getting filled?   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2005 12:55:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933795#M61466</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-08-19T12:55: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/933796#M61467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If iauaa&lt;/P&gt;&lt;P&gt;contains only 'aufnr' 'belnr' 'emtyp', choose the &amp;lt;b&amp;gt;"into table" iauaa&amp;lt;/b&amp;gt; statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erwan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Erwan LE BRUN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2005 12:56:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933796#M61467</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-19T12:56: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/933797#M61468</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;SELECT aufnr belnr emtyp&lt;/P&gt;&lt;P&gt;FROM auaa&lt;/P&gt;&lt;P&gt;INTO corresponding fields of TABLE iauaa&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN iaufnr&lt;/P&gt;&lt;P&gt;WHERE aufnr = iaufnr-aufnr and emtyp = 'OR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Svetlin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2005 12:59:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933797#M61468</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-19T12:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933798#M61469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess you are seeing performance issue because AUAA is a cluster table and you are hitting it with AUFNR which is not part of the key and also you can't create a secondary index on a cluster.  The only way to improve would be somehow linking thru BELNR instead of AUFNR.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2005 13:00:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933798#M61469</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-08-19T13:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933799#M61470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, I think the reason is iaufnr is too large.&lt;/P&gt;&lt;P&gt;when used in the FOR ALL ENTRIES, the iaufnr will be split to many pieces select requestion and submit to the DB layer. So though the SELECT is only one sentence, actually it access the DB for many times. You can demonstrate in ST05.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my opinion, you should try your best to reduce the iaufnr size. &lt;/P&gt;&lt;P&gt;you can split the 10000 entries to 5 parts each about 2000 entries. &lt;/P&gt;&lt;P&gt;The other way is select out entries more than you need with simple condition. And filter out the useless entries in the later logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help it will be help.&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2005 13:10:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933799#M61470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-19T13:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933800#M61471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rich is right. Using an unindexed select on this table will take forever; however, the header table is AUAK and it has a secondary index on the object number. I think if you concatenate 'OR' with the order number (left padded with zeroes) and select from this table, you'll get the document number. You can then use this to quickly get the data from AUAA.&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;The following is pretty quick. You'll have to use the "for all entries on the select from auak:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ztest.

TABLES: auaa, auak.

DATA: order  LIKE aufk-aufnr VALUE '000000100001',
      object LIKE auak-objnr,
      docno  LIKE auak-belnr.

CONCATENATE 'OR' order INTO object.

SELECT SINGLE belnr FROM auak INTO docno
* for all entries in...
  WHERE objnr = object.

SELECT * FROM auaa WHERE belnr = docno.
* ...
ENDSELECT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Rob Burbank&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2005 13:32:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933800#M61471</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-19T13:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933801#M61472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was thinking the same as Rob.  Give that a try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2005 13:36:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933801#M61472</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-08-19T13:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933802#M61473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I tried with all solutions, but still not able to get the correct output.&lt;/P&gt;&lt;P&gt;Kindly suggest any other solution you know.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dilip&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Aug 2005 07:57:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933802#M61473</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-20T07:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933803#M61474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dilip,&lt;/P&gt;&lt;P&gt;Always FOR ALL ENTRIES will consume a lot of time. For that reason I remember us revamping all our old programs by removing that and instead looped it into that Internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, since the field on the selection condition doesn't form a part of the key fields, it will select lot of unwanted records and that takes a lotta time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best you can do is, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK NOT iaufnr[] IS INITIAL.&lt;/P&gt;&lt;P&gt;SORT iaufnr BY aufnr.&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM iaufnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT WA_IAUFNR.&lt;/P&gt;&lt;P&gt; SELECT aufnr belnr emtyp&lt;/P&gt;&lt;P&gt; FROM auaa&lt;/P&gt;&lt;P&gt; INTO corresponding fields of TABLE iauaa&lt;/P&gt;&lt;P&gt; WHERE aufnr = WA_iaufnr-aufnr.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;delete iauaa where emtyp &amp;lt;&amp;gt; 'OR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this, and I'm sure it'll take less time when compared to the earlier code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Aug 2005 10:28:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933803#M61474</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-20T10:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933804#M61475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dilip - the following code runs quickly in my system:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ztest.

TABLES: auaa, auak.

DATA: object LIKE auak-objnr,
      docno  LIKE auak-belnr.
DATA: BEGIN OF iaufnr OCCURS 0.
        INCLUDE STRUCTURE aufk.
DATA: END   OF iaufnr.

SELECT aufnr
  FROM aufk
  UP TO 10 ROWS
  INTO CORRESPONDING FIELDS OF TABLE iaufnr.

LOOP AT iaufnr.
  CONCATENATE 'OR' iaufnr-aufnr INTO object.

  SELECT SINGLE belnr FROM auak INTO docno
    WHERE objnr = object.

  SELECT * FROM auaa WHERE belnr = docno.
    WRITE: /001 auaa-belnr, auaa-lfdnr, auaa-emtyp.

  ENDSELECT.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The only problem I can see is if there is if AUAK-OBJNR is not mapped in your system the way I have shown here.&lt;/P&gt;&lt;P&gt;If you still have problems after this, tell us what output or error you are getting: also what AUAK-OBJNR looks like in your system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Aug 2005 19:17:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933804#M61475</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-20T19:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933805#M61476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dillip,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try with this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK NOT iaufnr[] IS INITIAL.&lt;/P&gt;&lt;P&gt;SORT iaufnr BY aufnr.&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM iaufnr.&lt;/P&gt;&lt;P&gt;********************&lt;/P&gt;&lt;P&gt;delete iaufnr where aufnr is initial.&lt;/P&gt;&lt;P&gt;********************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT aufnr belnr emtyp&lt;/P&gt;&lt;P&gt;FROM auaa&lt;/P&gt;&lt;P&gt;INTO corresponding fields of TABLE iauaa&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN iaufnr&lt;/P&gt;&lt;P&gt;WHERE aufnr = iaufnr-aufnr.&lt;/P&gt;&lt;P&gt;delete iauaa where emtyp &amp;lt;&amp;gt; 'OR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sasi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2005 10:49:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933805#M61476</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-22T10:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933806#M61477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHy don;t you try creation of a range for aufnr and then try pass it. I bet it will be very fast. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shekhar Kulkarni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2005 12:03:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/933806#M61477</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-22T12:03:03Z</dc:date>
    </item>
  </channel>
</rss>

