<?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: Query  Optimisation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-optimisation/m-p/1648812#M288438</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;From the driver table you may delete all the adjacent duplicates comparing all fields. While using for all entries pl make sure the driver table is not empty .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;IF NOT T_SKB1[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    Select Stmt &lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If helpful pl reward.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Nov 2006 09:52:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-28T09:52:04Z</dc:date>
    <item>
      <title>Query  Optimisation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-optimisation/m-p/1648806#M288432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please Help optimize the following query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT HKONT GSBER BUKRS AUGDT BUDAT SHKZG&lt;/P&gt;&lt;P&gt;           DMBTR WAERS AUGBL ZUONR GJAHR BELNR BUZEI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                 INTO TABLE T_BSIS_TEMP&lt;/P&gt;&lt;P&gt;                 FROM BSIS&lt;/P&gt;&lt;P&gt;                  FOR ALL ENTRIES IN T_SKB1&lt;/P&gt;&lt;P&gt;                WHERE BUKRS EQ T_SKB1-BUKRS&lt;/P&gt;&lt;P&gt;                  AND HKONT EQ T_SKB1-SAKNR&lt;/P&gt;&lt;P&gt;                  AND BUDAT LE P_BUDAT.&lt;/P&gt;&lt;P&gt;     IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;        DELETE T_BSIS WHERE NOT GSBER IN S_GSBER.&lt;/P&gt;&lt;P&gt;        T_BSIS[] = T_BSIS_TEMP[].&lt;/P&gt;&lt;P&gt;        SORT T_BSIS BY BUKRS HKONT GSBER.&lt;/P&gt;&lt;P&gt;     ENDIF.&lt;/P&gt;&lt;P&gt;Thanking you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 11:39:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-optimisation/m-p/1648806#M288432</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-08T11:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Query  Optimisation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-optimisation/m-p/1648807#M288433</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;&amp;lt;b&amp;gt;IF NOT T_SKB1[] IS INITIAL.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT HKONT GSBER BUKRS AUGDT BUDAT SHKZG&lt;/P&gt;&lt;P&gt;DMBTR WAERS AUGBL ZUONR GJAHR BELNR BUZEI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INTO TABLE T_BSIS_TEMP&lt;/P&gt;&lt;P&gt;FROM BSIS&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN T_SKB1&lt;/P&gt;&lt;P&gt;WHERE BUKRS EQ T_SKB1-BUKRS&lt;/P&gt;&lt;P&gt;AND HKONT EQ T_SKB1-SAKNR&lt;/P&gt;&lt;P&gt;AND BUDAT LE P_BUDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;IF NOT T_BSIS_TEMP[] IS INITIAL.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;DELETE T_BSIS WHERE NOT GSBER IN S_GSBER.&lt;/P&gt;&lt;P&gt;T_BSIS[] = T_BSIS_TEMP[].&lt;/P&gt;&lt;P&gt;SORT T_BSIS BY BUKRS HKONT GSBER.&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;&amp;lt;b&amp;gt;ENDIF.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------" /&gt;&lt;P&gt;table definition for T_BSIS_TEMP should contain fields in given sequence&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HKONT &lt;/P&gt;&lt;P&gt;GSBER &lt;/P&gt;&lt;P&gt;BUKRS &lt;/P&gt;&lt;P&gt;AUGDT &lt;/P&gt;&lt;P&gt;BUDAT &lt;/P&gt;&lt;P&gt;SHKZG&lt;/P&gt;&lt;P&gt;DMBTR &lt;/P&gt;&lt;P&gt;WAERS &lt;/P&gt;&lt;P&gt;AUGBL &lt;/P&gt;&lt;P&gt;ZUONR &lt;/P&gt;&lt;P&gt;GJAHR &lt;/P&gt;&lt;P&gt;BELNR &lt;/P&gt;&lt;P&gt;BUZEI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 11:44:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-optimisation/m-p/1648807#M288433</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-08T11:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Query  Optimisation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-optimisation/m-p/1648808#M288434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is nothing much you can do with the SELECT query but just take care of the below tips.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Check if the T_SKB1 is not initial.&lt;/P&gt;&lt;P&gt;2. Sort the table T_SKB1&lt;/P&gt;&lt;P&gt;3. Make sure to delete adjacent duplicates for Bukrs and Saknr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;anurag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 11:58:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-optimisation/m-p/1648808#M288434</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-08T11:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Query  Optimisation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-optimisation/m-p/1648809#M288435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In addition to the others, you can move the criteria for GSBER ito the SELECT statement:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT  hkont gsber bukrs augdt budat shkzg
        dmbtr waers augbl zuonr gjahr belnr buzei
  INTO TABLE t_bsis_temp
  FROM bsis
  FOR ALL ENTRIES IN t_skb1
  WHERE bukrs EQ t_skb1-bukrs
    AND hkont EQ t_skb1-saknr
    AND budat LE p_budat
    AND gsber IN s_gsber.

IF sy-subrc = 0.
  t_bsis[] = t_bsis_temp[].
  SORT t_bsis BY bukrs hkont gsber.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 14:51:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-optimisation/m-p/1648809#M288435</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-08T14:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Query  Optimisation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-optimisation/m-p/1648810#M288436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If Performance is still an issue then you might want to consider creation of a new index on the bsis table for fields BUKRS, HKONT and BUDAT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nanda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 15:49:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-optimisation/m-p/1648810#M288436</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-08T15:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Query  Optimisation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-optimisation/m-p/1648811#M288437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apart from all the above solutions.&lt;/P&gt;&lt;P&gt;i broke down the data into logical units of 400 and processed it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Nov 2006 09:17:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-optimisation/m-p/1648811#M288437</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-28T09:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Query  Optimisation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-optimisation/m-p/1648812#M288438</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;From the driver table you may delete all the adjacent duplicates comparing all fields. While using for all entries pl make sure the driver table is not empty .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;IF NOT T_SKB1[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    Select Stmt &lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If helpful pl reward.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Nov 2006 09:52:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-optimisation/m-p/1648812#M288438</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-28T09:52:04Z</dc:date>
    </item>
  </channel>
</rss>

