<?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: can we replace this SELECT query by more efficient code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-replace-this-select-query-by-more-efficient-code/m-p/1756104#M327561</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remove order by addition and use sort on internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM zv7_custord&lt;/P&gt;&lt;P&gt;     INTO TABLE G_T_ZV7_CUSTORD&lt;/P&gt;&lt;P&gt;     WHERE ( SENDER in S_SENDER and&lt;/P&gt;&lt;P&gt;             ORDNUM in S_ORDER  and&lt;/P&gt;&lt;P&gt;             ZDATE   in S_DATE ) OR&lt;/P&gt;&lt;P&gt;           ( SENDER in S_SENDER AND&lt;/P&gt;&lt;P&gt;             STATUS = SPACE ).&lt;/P&gt;&lt;P&gt;sort g_t_zv7_custord by idocnum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Dec 2006 12:58:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-08T12:58:16Z</dc:date>
    <item>
      <title>can we replace this SELECT query by more efficient code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-replace-this-select-query-by-more-efficient-code/m-p/1756103#M327560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can we replace this SELECT query by more efficient code ?:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM zv7_custord
     INTO TABLE G_T_ZV7_CUSTORD
     WHERE ( SENDER in S_SENDER and
             ORDNUM in S_ORDER  and
             ZDATE   in S_DATE ) OR
           ( SENDER in S_SENDER AND
             STATUS = SPACE )
     ORDER BY IDOCNUM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 12:52:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-replace-this-select-query-by-more-efficient-code/m-p/1756103#M327560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-08T12:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: can we replace this SELECT query by more efficient code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-replace-this-select-query-by-more-efficient-code/m-p/1756104#M327561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remove order by addition and use sort on internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM zv7_custord&lt;/P&gt;&lt;P&gt;     INTO TABLE G_T_ZV7_CUSTORD&lt;/P&gt;&lt;P&gt;     WHERE ( SENDER in S_SENDER and&lt;/P&gt;&lt;P&gt;             ORDNUM in S_ORDER  and&lt;/P&gt;&lt;P&gt;             ZDATE   in S_DATE ) OR&lt;/P&gt;&lt;P&gt;           ( SENDER in S_SENDER AND&lt;/P&gt;&lt;P&gt;             STATUS = SPACE ).&lt;/P&gt;&lt;P&gt;sort g_t_zv7_custord by idocnum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 12:58:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-replace-this-select-query-by-more-efficient-code/m-p/1756104#M327561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-08T12:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: can we replace this SELECT query by more efficient code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-replace-this-select-query-by-more-efficient-code/m-p/1756105#M327562</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;HERE WITH OUT SPECIFYING * YOU can use the fields names directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because it will fetch all the data including mandt so it will get performance problem.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM zv7_custord&lt;/P&gt;&lt;P&gt;     INTO &amp;lt;b&amp;gt;CORREPONDING FIELDS OF&amp;lt;/b&amp;gt; TABLE G_T_ZV7_CUSTORD&lt;/P&gt;&lt;P&gt;     WHERE ( SENDER in S_SENDER and&lt;/P&gt;&lt;P&gt;             ORDNUM in S_ORDER  and&lt;/P&gt;&lt;P&gt;             ZDATE   in S_DATE ) OR&lt;/P&gt;&lt;P&gt;           ( SENDER in S_SENDER AND&lt;/P&gt;&lt;P&gt;             STATUS = SPACE )&lt;/P&gt;&lt;P&gt;     ORDER BY IDOCNUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Purshothaman P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 12:59:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-replace-this-select-query-by-more-efficient-code/m-p/1756105#M327562</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-08T12:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: can we replace this SELECT query by more efficient code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-replace-this-select-query-by-more-efficient-code/m-p/1756106#M327563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;  Using into corresponding fields , does not help the cause of performace enhancement.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 13:00:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-replace-this-select-query-by-more-efficient-code/m-p/1756106#M327563</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-08T13:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: can we replace this SELECT query by more efficient code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-replace-this-select-query-by-more-efficient-code/m-p/1756107#M327564</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;U can leave ORDER BY option and sort the table by yourself and try to split the query:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM zv7_custord
     INTO TABLE G_T_ZV7_CUSTORD
     WHERE  SENDER in S_SENDER and
                   ORDNUM in S_ORDER  and
                   ZDATE   in S_DATE .

SELECT * FROM zv7_custord
     APPENDING TABLE G_T_ZV7_CUSTORD
     WHERE  SENDER in S_SENDER        and
                   NOT ORDNUM in S_ORDER  and
                   NOT ZDATE   in S_DATE       and
                   STATUS = SPACE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM zv7_custord
     INTO TABLE G_T_ZV7_CUSTORD
     WHERE  SENDER in S_SENDER and
                   ORDNUM in S_ORDER  and
                   ZDATE   in S_DATE .

SELECT * FROM zv7_custord
     APPENDING TABLE G_T_ZV7_CUSTORD
     WHERE  SENDER in S_SENDER        and
                   STATUS = SPACE.

* Sort the table key fields
SORT G_T_ZV7_CUSTORD BY &amp;lt;KEY1&amp;gt; &amp;lt;KEY2&amp;gt; .....
DELETE ADJACENT DUPLICATES FROM G_T_ZV7_CUSTORD COMPARING &amp;lt;KEY1&amp;gt; .....&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 13:07:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-replace-this-select-query-by-more-efficient-code/m-p/1756107#M327564</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-08T13:07:42Z</dc:date>
    </item>
  </channel>
</rss>

