<?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: Problem Populating Internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004631#M77425</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select ... into (&amp;lt;fields&amp;gt;) from ...&lt;/P&gt;&lt;P&gt;&amp;lt;fill the other 5 fileds&amp;gt;&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;You will have one loop between select and endselect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Jul 2005 11:17:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-07-27T11:17:07Z</dc:date>
    <item>
      <title>Problem Populating Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004629#M77423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a small problem filling my internal table.I have some 10 fields in my internal table.I am filling some 5 fields in the internal table using a join and i have to fill the other 5 fields seperately ie modify the internal table after the first select query...So without looping can we do it in any easy way...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2005 11:12:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004629#M77423</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-27T11:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Populating Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004630#M77424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;         field1(10),&lt;/P&gt;&lt;P&gt;         field2(10),&lt;/P&gt;&lt;P&gt;      end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-field1 = 'hello'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify itab transporting field1 where ....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2005 11:14:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004630#M77424</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-27T11:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Populating Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004631#M77425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select ... into (&amp;lt;fields&amp;gt;) from ...&lt;/P&gt;&lt;P&gt;&amp;lt;fill the other 5 fileds&amp;gt;&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;You will have one loop between select and endselect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2005 11:17:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004631#M77425</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-27T11:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Populating Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004632#M77426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mavreck,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think its not possible to modify an internal table's multiple rows without looping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Narinder Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2005 11:21:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004632#M77426</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-27T11:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Populating Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004633#M77427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Narinder ,&lt;/P&gt;&lt;P&gt;did you check the &amp;lt;b&amp;gt;transporting&amp;lt;/b&amp;gt; option in modify?&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;You can modify multiple rows without looping&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2005 11:23:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004633#M77427</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-27T11:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Populating Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004634#M77428</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;If you are going to modify the same values[say field2 = 'ABC'] for all the records,then without loop you can do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise,if you need to modify it differently for each record,then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select...Endselect is the best approach.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2005 11:26:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004634#M77428</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-07-27T11:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Populating Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004635#M77429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joseph,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for correcting, But using transporting what i understand is that  all records can only be modified with same values only. What if user want to modify each record&lt;/P&gt;&lt;P&gt;with different valus, he has to use loop???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Narinder Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2005 11:40:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004635#M77429</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-27T11:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Populating Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004636#M77430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Narinder,&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;You right! sorry&amp;lt;/b&amp;gt;, i didn't thought about this possibility.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2005 11:41:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004636#M77430</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-27T11:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Populating Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004637#M77431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If i use modify itab transporting field bt select... endselect....Its going 4 short dump...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2005 12:36:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004637#M77431</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-27T12:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Populating Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004638#M77432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Actually modify ...  and select ... endselect are 2 different options to solve your problem. It depends on the values that you want to modify with.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2005 12:39:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004638#M77432</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-27T12:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Populating Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004639#M77433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you use modify of an itab within the select endselect, you need to tell the modify stt , that which line should be updated . something like modify .. index 5 .(to modify the 5th record) or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify .... where &amp;lt;logical expression&amp;gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2005 12:42:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004639#M77433</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2005-07-27T12:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Populating Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004640#M77434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think your best bet is to do a loop.  Why would you want to hit the database more than once if you don't have to.  What I mean is,  doing a SELECT ENDSELECT will cause you to hit the database n times where n is the number of records that you are selecting.  Why not do an array fetch, then loop at the the itab and get the rest of your fields then modify your itab.  You know,  LOOPS are not such a bad thing.  &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: begin of itab occurs 0,
      f1 type c,
      f2 type c,
      f3 type c,
      f4 type c,      
      f5 type c,
      f6 type c,
      f7 type c,
      f8 type c,
      f9 type c,
      f10 type c,
      end of itab.

select * into corresponding fields of table itab
       from Some_Table
               where field = p_field.

loop at itab.

select Single * from some_table
        into xsome_table
                where fld1 = itab-fld1.
itab-fld6 = xsome_table-fld6.

" More code here


Modify itab.



endloop.&lt;/CODE&gt;&lt;/PRE&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;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2005 12:56:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004640#M77434</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-07-27T12:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Populating Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004641#M77435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i think for that you need to use inner join.&lt;/P&gt;&lt;P&gt;i am giving you a sample inner join statement.&lt;/P&gt;&lt;P&gt;with this statement we can retrieve data from &lt;/P&gt;&lt;P&gt;3 tables and we can populate in a single table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT A~EBELN&lt;/P&gt;&lt;P&gt;       A~LIFNR&lt;/P&gt;&lt;P&gt;       A~AEDAT&lt;/P&gt;&lt;P&gt;       B~EBELP&lt;/P&gt;&lt;P&gt;       B~MATNR&lt;/P&gt;&lt;P&gt;       B~NETPR&lt;/P&gt;&lt;P&gt;       C~ETENR&lt;/P&gt;&lt;P&gt;       C~MENGE&lt;/P&gt;&lt;P&gt;       C~WEMNG&lt;/P&gt;&lt;P&gt;    FROM ( EKKO AS A INNER JOIN EKPO AS B&lt;/P&gt;&lt;P&gt;      ON A&lt;SUB&gt;EBELN = B&lt;/SUB&gt;EBELN )&lt;/P&gt;&lt;P&gt;      INNER JOIN EKET AS C&lt;/P&gt;&lt;P&gt;      ON  A&lt;SUB&gt;EBELN = C&lt;/SUB&gt;EBELN&lt;/P&gt;&lt;P&gt;      AND B&lt;SUB&gt;EBELP = C&lt;/SUB&gt;EBELP&lt;/P&gt;&lt;P&gt;    INTO TABLE ITAB&lt;/P&gt;&lt;P&gt;    WHERE A~EBELN IN PNO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope it will help you.&lt;/P&gt;&lt;P&gt;bye...&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;prasad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2005 05:51:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004641#M77435</guid>
      <dc:creator>former_member181959</dc:creator>
      <dc:date>2005-07-28T05:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Populating Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004642#M77436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ths only way is to use MOVE CORRESPONDING FIELDS in the select query. And the loop that internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since if u use SELECT...END SELECT...performance will be bad. Since unnecessary access to database will take place "N" times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regs,&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2005 06:11:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-populating-internal-table/m-p/1004642#M77436</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-28T06:11:52Z</dc:date>
    </item>
  </channel>
</rss>

