<?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/2666751#M615498</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check if MATNR is an index on EKPO - if not you may need to add it or use extra selections so a valid index is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also the join between EKPO and EKET - do these tables share more key fields?  I thought both had EBELP (or POSNR?) and possibly further key fields in common, so this part of join should be: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
from ekpo as a
join eket as b
on a~ebeln = b~ebeln
and a~ebelp = b~ebelp
and "(add any other fields)
join ekko as c ...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also, for readability, specifying "INNER JOIN" in the statements instead of just "JOIN" is a good idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 25 Aug 2007 04:35:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-25T04:35:04Z</dc:date>
    <item>
      <title>Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/2666749#M615496</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;&lt;/P&gt;&lt;P&gt;   I am in need getting stock transfer eket-menge and stock transfer receipt quantity eket-wemng, based on material values, to get this i wrote a join statement which consists of ekko,ekpo and eket but it took long time to fetch values even in D server, i am not able to find any error with join statement which i wrote.&lt;/P&gt;&lt;P&gt;i appreciate if anybody give me tips, regarding the performance issue with that join statement and this is my join statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not it_material[] initial.&lt;/P&gt;&lt;P&gt;    select a&lt;SUB&gt;matnr a&lt;/SUB&gt;werks a&lt;SUB&gt;lgort a&lt;/SUB&gt;pstyp&lt;/P&gt;&lt;P&gt;             b&lt;SUB&gt;menge b&lt;/SUB&gt;wemng b&lt;SUB&gt;charg b&lt;/SUB&gt;eindt&lt;/P&gt;&lt;P&gt;             c&lt;SUB&gt;ebeln c&lt;/SUB&gt;RESWK c~BSART&lt;/P&gt;&lt;P&gt;              into corresponding fields of table it_sto&lt;/P&gt;&lt;P&gt;              from ekpo as a join eket as b&lt;/P&gt;&lt;P&gt;              on a&lt;SUB&gt;ebeln = b&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;              join ekko as c&lt;/P&gt;&lt;P&gt;              on a&lt;SUB&gt;ebeln = c&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;             for all entries in it_display&lt;/P&gt;&lt;P&gt;              where a~matnr = it_display-matnr .&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;babu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        babu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2007 21:16:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/2666749#M615496</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-24T21:16: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/2666750#M615497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Babu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's the structure of your internal table it_sto? If it is same as what you wrote in your Select statement then you can write "into table" instead of  "into corresponding fields of" .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, before using "FOR ALL ENTRIES", check if internal table is initial using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;If not it_display[] is initial.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select a&lt;SUB&gt;matnr a&lt;/SUB&gt;werks a&lt;SUB&gt;lgort a&lt;/SUB&gt;pstyp&lt;/P&gt;&lt;P&gt;b&lt;SUB&gt;menge b&lt;/SUB&gt;wemng b&lt;SUB&gt;charg b&lt;/SUB&gt;eindt&lt;/P&gt;&lt;P&gt;c&lt;SUB&gt;ebeln c&lt;/SUB&gt;RESWK c~BSART&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;into table it_sto&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;from ekpo as a join eket as b&lt;/P&gt;&lt;P&gt;on a&lt;SUB&gt;ebeln = b&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;join ekko as c&lt;/P&gt;&lt;P&gt;on a&lt;SUB&gt;ebeln = c&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;for all entries in it_display&lt;/P&gt;&lt;P&gt;where a~matnr = it_display-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;endif.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2007 21:23:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/2666750#M615497</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-24T21:23: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/2666751#M615498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check if MATNR is an index on EKPO - if not you may need to add it or use extra selections so a valid index is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also the join between EKPO and EKET - do these tables share more key fields?  I thought both had EBELP (or POSNR?) and possibly further key fields in common, so this part of join should be: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
from ekpo as a
join eket as b
on a~ebeln = b~ebeln
and a~ebelp = b~ebelp
and "(add any other fields)
join ekko as c ...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also, for readability, specifying "INNER JOIN" in the statements instead of just "JOIN" is a good idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Aug 2007 04:35:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/2666751#M615498</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-25T04:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/2666752#M615499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use of FOR ALL Entries&lt;/P&gt;&lt;P&gt;Outer join can be created using this addition to the where clause in a select statement. It speeds up the performance tremendously, but the cons of using this variation are listed below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Duplicates are automatically removed from the resulting data set. Hence care should be taken that the unique key of the detail line items should be given in the select statement. &lt;/P&gt;&lt;P&gt;If the table on which the For All Entries IN clause is based is empty, all rows are selected into the destination table. Hence it is advisable to check before-hand that the first table is not empty. &lt;/P&gt;&lt;P&gt;If the table on which the For All Entries IN clause is based is very large, the performance will go down instead of improving. Hence attempt should be made to keep the table size to a moderate level. &lt;/P&gt;&lt;P&gt;Not Recommended&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            Loop at int_cntry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             Select single * from zfligh into int_fligh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; where cntry = int_cntry-cntry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Append int_fligh. &lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;Recommended&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            Select * from zfligh appending table int_fligh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            For all entries in int_cntry &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            Where cntry = int_cntry-cntry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Aug 2007 04:39:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/2666752#M615499</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-25T04:39:01Z</dc:date>
    </item>
  </channel>
</rss>

