<?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 How to select from internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-select-from-internal-table/m-p/1979025#M400753</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to select from internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g I  would like to do &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select from single * from itab1 into  itab2 where fieldx = itab1-oldnumber.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Feb 2007 19:13:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-15T19:13:50Z</dc:date>
    <item>
      <title>How to select from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-select-from-internal-table/m-p/1979025#M400753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to select from internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g I  would like to do &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select from single * from itab1 into  itab2 where fieldx = itab1-oldnumber.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 19:13:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-select-from-internal-table/m-p/1979025#M400753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T19:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to select from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-select-from-internal-table/m-p/1979026#M400754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tina,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can not perform any kind of SELECT statement operations on Internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your requirement, you can do using LOOP...ENDLOOP statements on internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA WA_ITAB1 LINE OF ITAB1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB1 INTO WA_ITAB1.&lt;/P&gt;&lt;P&gt;READ TABLE ITAB1 WITH KEY FIELDX = WA_ITAB1-OLDNUMBER.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;APPEND WA_ITAB1 TO ITAB2.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;READ TABLE ITAB1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 19:17:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-select-from-internal-table/m-p/1979026#M400754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T19:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to select from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-select-from-internal-table/m-p/1979027#M400755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We do not write the selects on Internal tables, we can write the READ statements on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT ITAB1.
Read table ITAB2 with key FIELD1 = ITAB1-FIELD1.
 If sy-subrc = 0.
    write the code
 endif.

ENDLOOP&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 19:20:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-select-from-internal-table/m-p/1979027#M400755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T19:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to select from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-select-from-internal-table/m-p/1979028#M400756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT itab1 INTO itab2 WHERE (...)
  APPEND itab2.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 19:21:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-select-from-internal-table/m-p/1979028#M400756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T19:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to select from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-select-from-internal-table/m-p/1979029#M400757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Your select query itself is wrong. What others have suggested is nothing but&lt;/P&gt;&lt;P&gt;itab2[] = itab1[]. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use:&lt;/P&gt;&lt;P&gt;select * from tablename into itab2&lt;/P&gt;&lt;P&gt;for all entries in itab1&lt;/P&gt;&lt;P&gt;where fieldx = itab1-oldnumber.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Subramanian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 19:34:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-select-from-internal-table/m-p/1979029#M400757</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T19:34:08Z</dc:date>
    </item>
  </channel>
</rss>

