<?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: difference between this two select statements in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-this-two-select-statements/m-p/4648849#M1094061</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 code&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select *
into corresponding fields of table t_rules
from ztf0208a where
catype = t_item-call_type and
oservice = t_item-orig_srvce and
tservice = t_item-term_srvce and
caclass = t_item-call_class and
bukrs = p_bukrs.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;transfers the extracted data into table t_rules&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the second one transfers the extracted data into a work area with the structure ztf0208a and will require you to include ZT0208 in the &lt;STRONG&gt;Tables&lt;/STRONG&gt; definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the first one runs faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Oct 2008 06:08:33 GMT</pubDate>
    <dc:creator>peter_ruiz2</dc:creator>
    <dc:date>2008-10-17T06:08:33Z</dc:date>
    <item>
      <title>difference between this two select statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-this-two-select-statements/m-p/4648846#M1094058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi. whats the difference between these 2 select statements? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      select *&lt;/P&gt;&lt;P&gt;      into corresponding fields of table t_rules&lt;/P&gt;&lt;P&gt;      from ztf0208a where&lt;/P&gt;&lt;P&gt;         catype = t_item-call_type and&lt;/P&gt;&lt;P&gt;         oservice = t_item-orig_srvce and&lt;/P&gt;&lt;P&gt;         tservice = t_item-term_srvce and&lt;/P&gt;&lt;P&gt;         caclass = t_item-call_class and&lt;/P&gt;&lt;P&gt;         bukrs = p_bukrs.&lt;/P&gt;&lt;P&gt;*********************************************************************&lt;/P&gt;&lt;P&gt;      select * from ztf0208a where&lt;/P&gt;&lt;P&gt;        catype = t_item-call_type and&lt;/P&gt;&lt;P&gt;        oservice = t_item-orig_srvce and&lt;/P&gt;&lt;P&gt;        tservice = t_item-term_srvce and&lt;/P&gt;&lt;P&gt;        caclass = t_item-call_class and&lt;/P&gt;&lt;P&gt;        zoffset = 'X' and&lt;/P&gt;&lt;P&gt;        bukrs ne p_bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        move-corresponding ztf0208a to it_offset.&lt;/P&gt;&lt;P&gt;        append it_offset. clear it_offset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      endselect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2008 06:01:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-this-two-select-statements/m-p/4648846#M1094058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-17T06:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: difference between this two select statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-this-two-select-statements/m-p/4648847#M1094059</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;Both the selects fetches you the data, but the second select has an performance issue. Since the control passes between database server and application server between every Select..Endselect statement. It is not advisable to use Select..Endselect. The first select is the best one as it fetches all records at once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Navneeth K.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2008 06:04:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-this-two-select-statements/m-p/4648847#M1094059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-17T06:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: difference between this two select statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-this-two-select-statements/m-p/4648848#M1094060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here is your second query&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select * from ztf0208a where
catype = t_item-call_type and
oservice = t_item-orig_srvce and
tservice = t_item-term_srvce and
caclass = t_item-call_class and
zoffset = 'X' and"this condition is one of the difference
bukrs ne p_bukrs."here one more difference which is NE but in above is equales to&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry if my answer was insufficient.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2008 06:05:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-this-two-select-statements/m-p/4648848#M1094060</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-17T06:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: difference between this two select statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-this-two-select-statements/m-p/4648849#M1094061</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 code&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select *
into corresponding fields of table t_rules
from ztf0208a where
catype = t_item-call_type and
oservice = t_item-orig_srvce and
tservice = t_item-term_srvce and
caclass = t_item-call_class and
bukrs = p_bukrs.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;transfers the extracted data into table t_rules&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the second one transfers the extracted data into a work area with the structure ztf0208a and will require you to include ZT0208 in the &lt;STRONG&gt;Tables&lt;/STRONG&gt; definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the first one runs faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2008 06:08:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-this-two-select-statements/m-p/4648849#M1094061</guid>
      <dc:creator>peter_ruiz2</dc:creator>
      <dc:date>2008-10-17T06:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: difference between this two select statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-this-two-select-statements/m-p/4648850#M1094062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   In the first select query you are getting the data into internal table(t_rules) directly,&lt;/P&gt;&lt;P&gt;but in the second select query you are fetching the data first into 'ztf0208a' work area and then moving the data from the work area to internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In first select query database is hit only one time and the internal table is at once with all the data based on where clause&lt;/P&gt;&lt;P&gt;but in second query database will be hit for every row which will be selected based on the Where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so second query is not good in terms of performance. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Syed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2008 06:31:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-this-two-select-statements/m-p/4648850#M1094062</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-17T06:31:27Z</dc:date>
    </item>
  </channel>
</rss>

