<?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: Select query modification in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-modification/m-p/5778728#M1307965</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT ebeln&lt;/P&gt;&lt;P&gt;               lifnr&lt;/P&gt;&lt;P&gt;               bukrs from ekko into table  t_ekko &lt;/P&gt;&lt;P&gt;                   where lifnr BETWEEN '0000100000' and '0000199999'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if t_ekko[] is not initial.&lt;/P&gt;&lt;P&gt;SELECT ebelp&lt;/P&gt;&lt;P&gt;             budat&lt;/P&gt;&lt;P&gt;             belnr&lt;/P&gt;&lt;P&gt;            gjahr&lt;/P&gt;&lt;P&gt;            wrbtr&lt;/P&gt;&lt;P&gt;            shkzg&lt;/P&gt;&lt;P&gt;            xblnr FROM ekbe into table t_ekbe&lt;/P&gt;&lt;P&gt;                for all entries in table t_ekko &lt;/P&gt;&lt;P&gt;                 where ebeln = t_ekko-ebeln&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Jul 2009 06:57:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-01T06:57:01Z</dc:date>
    <item>
      <title>Select query modification</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-modification/m-p/5778726#M1307963</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;This below mentioned select statement taking more time to execute so i am planning to devide into parts. Please do let me know if any better suggestions on its division.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT ekko~ebeln&lt;/P&gt;&lt;P&gt;           ekko~lifnr&lt;/P&gt;&lt;P&gt;           ekko~bukrs&lt;/P&gt;&lt;P&gt;           ekbe~ebelp&lt;/P&gt;&lt;P&gt;           ekbe~budat&lt;/P&gt;&lt;P&gt;           ekbe~belnr&lt;/P&gt;&lt;P&gt;           ekbe~gjahr&lt;/P&gt;&lt;P&gt;           ekbe~wrbtr&lt;/P&gt;&lt;P&gt;           ekbe~shkzg&lt;/P&gt;&lt;P&gt;           ekbe~xblnr&lt;/P&gt;&lt;P&gt;        INTO TABLE it_poir_dtl&lt;/P&gt;&lt;P&gt;        FROM ekbe&lt;/P&gt;&lt;P&gt;        INNER JOIN ekko ON&lt;/P&gt;&lt;P&gt;              ekbe&lt;SUB&gt;ebeln = ekko&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;        FOR ALL entries IN it_bkpf&lt;/P&gt;&lt;P&gt;              WHERE ekbe~vgabe = '1'&lt;/P&gt;&lt;P&gt;                AND ekko~bukrs = it_bkpf-bukrs&lt;/P&gt;&lt;P&gt;                AND ekbe~belnr =  it_bkpf-awkey(10)&lt;/P&gt;&lt;P&gt;                AND ekbe~gjahr = it_bkpf-gjahr&lt;/P&gt;&lt;P&gt;                AND lifnr BETWEEN '0000100000' and '0000199999'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Earliest reply would help me a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Devasing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2009 06:46:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-modification/m-p/5778726#M1307963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-01T06:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: Select query modification</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-modification/m-p/5778727#M1307964</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;Avoid the use of join and split the query into 3 using the for all enteries this will help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bkpf&lt;/P&gt;&lt;P&gt;ekko&lt;/P&gt;&lt;P&gt;ekbe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Midhun Abraham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2009 06:51:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-modification/m-p/5778727#M1307964</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-01T06:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Select query modification</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-modification/m-p/5778728#M1307965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT ebeln&lt;/P&gt;&lt;P&gt;               lifnr&lt;/P&gt;&lt;P&gt;               bukrs from ekko into table  t_ekko &lt;/P&gt;&lt;P&gt;                   where lifnr BETWEEN '0000100000' and '0000199999'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if t_ekko[] is not initial.&lt;/P&gt;&lt;P&gt;SELECT ebelp&lt;/P&gt;&lt;P&gt;             budat&lt;/P&gt;&lt;P&gt;             belnr&lt;/P&gt;&lt;P&gt;            gjahr&lt;/P&gt;&lt;P&gt;            wrbtr&lt;/P&gt;&lt;P&gt;            shkzg&lt;/P&gt;&lt;P&gt;            xblnr FROM ekbe into table t_ekbe&lt;/P&gt;&lt;P&gt;                for all entries in table t_ekko &lt;/P&gt;&lt;P&gt;                 where ebeln = t_ekko-ebeln&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2009 06:57:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-modification/m-p/5778728#M1307965</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-01T06:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Select query modification</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-modification/m-p/5778729#M1307966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;    divide your query into 2 parts. &lt;/P&gt;&lt;P&gt;In   first select  use FOR ALL ENTRIES  into itab.&lt;/P&gt;&lt;P&gt;SELECT ekko~ebeln&lt;/P&gt;&lt;P&gt;ekko~lifnr&lt;/P&gt;&lt;P&gt;ekko~bukrs&lt;/P&gt;&lt;P&gt;ekbe~ebelp&lt;/P&gt;&lt;P&gt;ekbe~budat&lt;/P&gt;&lt;P&gt;ekbe~belnr&lt;/P&gt;&lt;P&gt;ekbe~gjahr&lt;/P&gt;&lt;P&gt;ekbe~wrbtr&lt;/P&gt;&lt;P&gt;ekbe~shkzg&lt;/P&gt;&lt;P&gt;ekbe~xblnr&lt;/P&gt;&lt;P&gt;INTO TABLE it_poir_dtl&lt;/P&gt;&lt;P&gt;FROM ekbe&lt;/P&gt;&lt;P&gt;INNER JOIN ekko ON&lt;/P&gt;&lt;P&gt;ekbe&lt;SUB&gt;ebeln = ekko&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;and  lifnr BETWEEN '0000100000' and '0000199999'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_bkpf  into fs_bkpf.&lt;/P&gt;&lt;P&gt;read table it_poir_dtl into fs_poir.&lt;/P&gt;&lt;P&gt;if fs_poir-bukrs NE fs_bkpf-bukrs and &lt;/P&gt;&lt;P&gt;   fs_poir-belnr  NE fs_bkpf-awkey ...&lt;/P&gt;&lt;P&gt;then delete the row else continue.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Viquar Iqbal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2009 07:01:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-modification/m-p/5778729#M1307966</guid>
      <dc:creator>viquar_iqbal</dc:creator>
      <dc:date>2009-07-01T07:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Select query modification</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-modification/m-p/5778730#M1307967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi you need to use Key fields in the where clause.Then performence will increase and also try to avoind between in the select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2009 07:18:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-modification/m-p/5778730#M1307967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-01T07:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Select query modification</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-modification/m-p/5778731#M1307968</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;kindly use &lt;STRONG&gt;FOR ALL ENTRIES&lt;/STRONG&gt; instead of using join in your select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will definately solve your problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2009 07:18:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-modification/m-p/5778731#M1307968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-01T07:18:31Z</dc:date>
    </item>
  </channel>
</rss>

