<?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 Efficiency  problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/efficiency-problem/m-p/1465818#M219368</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to make the best efficient selection, i have to catch the data in 2 tables, the registers have to be in the first table, but not in the second, can i make a join?,&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from ekpo where LOEKZ &amp;lt;&amp;gt; 'X'.&lt;/P&gt;&lt;P&gt;select single * from lips where VGBEL = ekpo-vbeln.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;append gt_result.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Jul 2006 13:39:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-25T13:39:48Z</dc:date>
    <item>
      <title>Efficiency  problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/efficiency-problem/m-p/1465818#M219368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to make the best efficient selection, i have to catch the data in 2 tables, the registers have to be in the first table, but not in the second, can i make a join?,&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from ekpo where LOEKZ &amp;lt;&amp;gt; 'X'.&lt;/P&gt;&lt;P&gt;select single * from lips where VGBEL = ekpo-vbeln.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;append gt_result.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2006 13:39:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/efficiency-problem/m-p/1465818#M219368</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-25T13:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency  problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/efficiency-problem/m-p/1465819#M219369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe you can do a subquery in an fetch.  VBELN does not exist in EKPO in my system.  Even with this there will be some issues, you are not selecting from EKPO with a valid key.  It will do an entire table scan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

select ebeln into table gt_result
           from ekpo as e
                 where loekz = space
                    and not exists ( Select * from lips
                                        &amp;lt;b&amp;gt;where vgbel = e~ebeln&amp;lt;/b&amp;gt; ).


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2006 13:51:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/efficiency-problem/m-p/1465819#M219369</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-07-25T13:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency  problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/efficiency-problem/m-p/1465820#M219370</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;First go to EKKO.. use any index based on the Date. and then go to EKPO to search for the LOEKZ = 'X' for the PO number. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2006 13:52:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/efficiency-problem/m-p/1465820#M219370</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2006-07-25T13:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency  problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/efficiency-problem/m-p/1465821#M219371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carl!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course you should make your EKPO select more efficient (have a look into SE11 - Indizes), but for LIPS is an easy way possible:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  SELECT * INTO TABLE gt_result
          FROM ekpo AS e
         WHERE ebeln IN s_ebeln
          AND  loekz EQ space
          AND NOT EXISTS ( SELECT * FROM lips
                                WHERE vgbel = e~ebeln ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;LIPS has an index on VGBEL, so this should be fine. Maybe you make a range for ebeln, than you can start several jobs in parallel... or re-use already select lists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2006 13:52:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/efficiency-problem/m-p/1465821#M219371</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2006-07-25T13:52:46Z</dc:date>
    </item>
  </channel>
</rss>

