<?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: internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1456530#M215765</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you could but should not select single in the loop.&lt;/P&gt;&lt;P&gt;Better sort your interal table.&lt;/P&gt;&lt;P&gt;Then &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ...&lt;/P&gt;&lt;P&gt;read table itab with key ... binary search.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;put value in column 3 if found&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endselect.&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;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 24 Jun 2006 18:57:27 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2006-06-24T18:57:27Z</dc:date>
    <item>
      <title>internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1456529#M215764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;i have internal table records with three fields. only two columns are filled already. how to fill third column records.&lt;/P&gt;&lt;P&gt;the condition is&lt;/P&gt;&lt;P&gt;matnr  mtart maktx&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------" /&gt;&lt;P&gt;ab100  xyz&lt;/P&gt;&lt;P&gt;ab110  xyz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to fill third column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can we use&lt;/P&gt;&lt;P&gt;select single * stamtement inside loop and endloop.&lt;/P&gt;&lt;P&gt;how can it be solved . please solve the problem with detail explanation with example.&lt;/P&gt;&lt;P&gt;thank u in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;sri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jun 2006 18:41:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1456529#M215764</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-24T18:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1456530#M215765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you could but should not select single in the loop.&lt;/P&gt;&lt;P&gt;Better sort your interal table.&lt;/P&gt;&lt;P&gt;Then &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ...&lt;/P&gt;&lt;P&gt;read table itab with key ... binary search.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;put value in column 3 if found&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endselect.&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;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jun 2006 18:57:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1456530#M215765</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2006-06-24T18:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1456531#M215766</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 use a JOIN to insert all data at the same moment: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT A&lt;SUB&gt;MATNR A&lt;/SUB&gt;MTART B~MAKTX &lt;/P&gt;&lt;P&gt;    FROM MARA AS A INNER JOIN MAKT AS B &lt;/P&gt;&lt;P&gt;                         ON A&lt;SUB&gt;MATNR = B&lt;/SUB&gt;MATNR&lt;/P&gt;&lt;P&gt;                                  INTO TABLE ITAB&lt;/P&gt;&lt;P&gt;                            WHERE A~MATNR IN&lt;/P&gt;&lt;P&gt;                              ..............&lt;/P&gt;&lt;P&gt;                              AND B~SPRAS = SY-LANGU&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you can't use a JOIN, you have to read the MAKT table in the loop as just you have done:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt; SELECT SINGLE MAKTX FROM MAKT INTO ITAB-MAKTX&lt;/P&gt;&lt;P&gt;                           WHERE MATNR = ITAB-MATNR&lt;/P&gt;&lt;P&gt;                             AND SPRAS = SY-LANGU.&lt;/P&gt;&lt;P&gt; MODIFY ITAB. &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jun 2006 19:09:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1456531#M215766</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-24T19:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1456532#M215767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use select single if you don't have many records. Else you need to select them into new internal table to READ in a loop and to modify itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds&lt;/P&gt;&lt;P&gt;Manohar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jun 2006 21:38:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1456532#M215767</guid>
      <dc:creator>Manohar2u</dc:creator>
      <dc:date>2006-06-24T21:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1456533#M215768</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;declare a new internal table and select ur req content of third field using for all entries in clause and then loop at first table and read this new tab with key binay search and move the content to the first table and say modify firsttab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gunjan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Jun 2006 04:52:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1456533#M215768</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-25T04:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1456534#M215769</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 could use select single inside a loop or for all entries(outside a loop). using for all entries is faster than using select single inside a loop. About you question, you could do it this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single from dbtable &lt;/P&gt;&lt;P&gt;into itab2-field3.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt; move itab2-field3 to itab1-field3.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;modify itab1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the example above, the structure of itab1 and itab2 are the same. Also, you can use field-symbols so the modify statement will be eliminated giving you more performance in your loop statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Jun 2006 05:50:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1456534#M215769</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2006-06-25T05:50:50Z</dc:date>
    </item>
  </channel>
</rss>

