<?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: reg select query problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query-problem/m-p/3519282#M846444</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't use 'into corresponding fields' ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select field1,.....fieldn &lt;/P&gt;&lt;P&gt;from &amp;lt;dbtable1&amp;gt;&lt;/P&gt;&lt;P&gt;into table itab&lt;/P&gt;&lt;P&gt;where &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select field1,...fieldn &lt;/P&gt;&lt;P&gt;from &amp;lt;dbtable2&amp;gt; &lt;/P&gt;&lt;P&gt;into table itab1&lt;/P&gt;&lt;P&gt;where &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;  itab = itab1.  &amp;lt;-- since both itab and itab1 have the same structure&lt;/P&gt;&lt;P&gt;  append itab.&lt;/P&gt;&lt;P&gt;  clear    itab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Mar 2008 09:38:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-10T09:38:01Z</dc:date>
    <item>
      <title>reg select query problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query-problem/m-p/3519278#M846440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;hope all r doing fine?&lt;/P&gt;&lt;P&gt;anyway i have a query which is mentioned below:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select field1,.....fieldn &lt;/P&gt;&lt;P&gt;         from &amp;lt;dbtable1&amp;gt;&lt;/P&gt;&lt;P&gt;         into corresponding fields of table itab&lt;/P&gt;&lt;P&gt;         where &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;select field1,...fieldn &lt;/P&gt;&lt;P&gt;          from &amp;lt;dbtable2&amp;gt; &lt;/P&gt;&lt;P&gt;         appending corresponding fields of table itab&lt;/P&gt;&lt;P&gt;        where &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above two select stmts retrieve &lt;STRONG&gt;same set of  fields&lt;/STRONG&gt; from &lt;STRONG&gt;two different&lt;/STRONG&gt; database tables into &lt;STRONG&gt;same&lt;/STRONG&gt; internal table &lt;STRONG&gt;itab..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;now my question is ...........is any other way to change 2nd select statement &lt;STRONG&gt;without using appending correspondin fields&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;but the functionality should remain the same as it is after changing..................&lt;/P&gt;&lt;P&gt;bcos &lt;STRONG&gt;appending corresponding&lt;/STRONG&gt; is causing performance problem in data retrieval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx alot in advance.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;for sure points will be given for all the helpful answers&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jack&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 08:59:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query-problem/m-p/3519278#M846440</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-10T08:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: reg select query problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query-problem/m-p/3519279#M846441</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;You can First Select all the Data into the Internal Table,&lt;/P&gt;&lt;P&gt;and then you can have the Loop..EndLoop Statement&lt;/P&gt;&lt;P&gt;inside that you can place the read table statement and append the data to the Internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dhruv Shah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 09:04:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query-problem/m-p/3519279#M846441</guid>
      <dc:creator>dhruv_shah3</dc:creator>
      <dc:date>2008-03-10T09:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: reg select query problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query-problem/m-p/3519280#M846442</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;First point don't use &lt;/P&gt;&lt;P&gt; INTO CORRESPONDING FIELDS OF TABLE  ITAB.&lt;/P&gt;&lt;P&gt;Use  INTO TABLE ITAB when your extracting fields and internal table fields are same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;   select field1,.....fieldn &lt;/P&gt;&lt;P&gt;   from &amp;lt;dbtable1&amp;gt;&lt;/P&gt;&lt;P&gt;   into table &lt;STRONG&gt;itab1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;   where &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select field1,...fieldn &lt;/P&gt;&lt;P&gt;  from &amp;lt;dbtable2&amp;gt; &lt;/P&gt;&lt;P&gt;  INTO  table &lt;STRONG&gt;itab2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  where &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE  LINES OF TABLE ITAB2 TO ITAB1.&lt;/P&gt;&lt;P&gt;  APPEND ITAB1&lt;/P&gt;&lt;P&gt;  CLEAR ITAB1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FREE ITAB2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 09:10:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query-problem/m-p/3519280#M846442</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-10T09:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: reg select query problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query-problem/m-p/3519281#M846443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can use like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select field1,.....fieldn &lt;/P&gt;&lt;P&gt;from &amp;lt;dbtable1&amp;gt;&lt;/P&gt;&lt;P&gt;into corresponding fields of table itab1&lt;/P&gt;&lt;P&gt;where &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select field1,...fieldn &lt;/P&gt;&lt;P&gt;from &amp;lt;dbtable2&amp;gt; &lt;/P&gt;&lt;P&gt;appending corresponding fields of table itab2&lt;/P&gt;&lt;P&gt;where &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now u use:&lt;/P&gt;&lt;P&gt;loop at itab2 into w_itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table itab1 into w_itab1 with key w_itab1-&amp;lt;primary field&amp;gt; = w_itab2-&amp;lt;Primary field&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  append w_final into i_final.&lt;/P&gt;&lt;P&gt;else continue.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*i_final table having all data ( i.e itab2 &amp;amp; itab1 data)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 09:27:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query-problem/m-p/3519281#M846443</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-10T09:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: reg select query problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query-problem/m-p/3519282#M846444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't use 'into corresponding fields' ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select field1,.....fieldn &lt;/P&gt;&lt;P&gt;from &amp;lt;dbtable1&amp;gt;&lt;/P&gt;&lt;P&gt;into table itab&lt;/P&gt;&lt;P&gt;where &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select field1,...fieldn &lt;/P&gt;&lt;P&gt;from &amp;lt;dbtable2&amp;gt; &lt;/P&gt;&lt;P&gt;into table itab1&lt;/P&gt;&lt;P&gt;where &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;  itab = itab1.  &amp;lt;-- since both itab and itab1 have the same structure&lt;/P&gt;&lt;P&gt;  append itab.&lt;/P&gt;&lt;P&gt;  clear    itab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 09:38:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query-problem/m-p/3519282#M846444</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-10T09:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: reg select query problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query-problem/m-p/3519283#M846445</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;1. Avoid using 'into corresponding fields of'. Instead declare internal table in the same order as that of database selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. After first select query move it to an temporary internal table and do the second select query. If u need all data (from 2 select queries) in the same internal table, append it later.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 11:37:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query-problem/m-p/3519283#M846445</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T11:37:28Z</dc:date>
    </item>
  </channel>
</rss>

