<?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 looping through internal tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-through-internal-tables/m-p/894807#M54033</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need to know something. I have this following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP at tab1&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;  LOOP at tab2&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;    Append ftab.&lt;/P&gt;&lt;P&gt;  endloop&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;   LOOP at tab3&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;     Append ftab.&lt;/P&gt;&lt;P&gt;   endloop&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;   LOOP at tab4&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;      Append ftab.&lt;/P&gt;&lt;P&gt;   endloop&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;      LOOP at tab5&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;       Append ftab.&lt;/P&gt;&lt;P&gt;      endloop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Append ftab&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;Now the problem is that my final table ftab is giving repeated values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can somebody help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really need help on this asap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Jun 2005 14:11:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-06-08T14:11:46Z</dc:date>
    <item>
      <title>looping through internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-through-internal-tables/m-p/894807#M54033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need to know something. I have this following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP at tab1&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;  LOOP at tab2&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;    Append ftab.&lt;/P&gt;&lt;P&gt;  endloop&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;   LOOP at tab3&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;     Append ftab.&lt;/P&gt;&lt;P&gt;   endloop&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;   LOOP at tab4&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;      Append ftab.&lt;/P&gt;&lt;P&gt;   endloop&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;      LOOP at tab5&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;       Append ftab.&lt;/P&gt;&lt;P&gt;      endloop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Append ftab&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;Now the problem is that my final table ftab is giving repeated values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can somebody help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really need help on this asap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2005 14:11:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-through-internal-tables/m-p/894807#M54033</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-08T14:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: looping through internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-through-internal-tables/m-p/894808#M54034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please post the entire loop with all the code.  From what you have shown us so far,  you are not moving anything into fTab.  &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, 08 Jun 2005 14:15:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-through-internal-tables/m-p/894808#M54034</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-06-08T14:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: looping through internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-through-internal-tables/m-p/894809#M54035</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;As you are looping on each table based on the condition which is derived from tab1 and appending at each loop for the same key data, also finally after these entire process you append at the last which might have the entries same as that of the last loop for tab5. try to clear the header if required at each sucessive loop statements.&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;Jagath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2005 14:16:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-through-internal-tables/m-p/894809#M54035</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-08T14:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: looping through internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-through-internal-tables/m-p/894810#M54036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Minal,&lt;/P&gt;&lt;P&gt;if your probles is the presence of repeted values, try to make a DELETE ADJACENTS .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More, what do you do in the inner loop?&lt;/P&gt;&lt;P&gt;Does ftab have always value of tab1?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put all the code, problably I coul'd help you better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2005 14:24:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-through-internal-tables/m-p/894810#M54036</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-08T14:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: looping through internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-through-internal-tables/m-p/894811#M54037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Minal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do 2 things:&lt;/P&gt;&lt;P&gt;(1) decide whether to append ftab before 'append' statement: Use "read table ftab into wa_ftab with key keyfield = value" for this. If you get a returncode 0, the record is already in ftab.&lt;/P&gt;&lt;P&gt;(2) always append and delete double entries afterwards (like suggested by Enzo). You will have to sort the table first. "sort ftab by key. delete adjacent duplicates from ftab comparing key."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think, I'd prefer the second option...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps, regards, Kathrin!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2005 14:36:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-through-internal-tables/m-p/894811#M54037</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-08T14:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: looping through internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-through-internal-tables/m-p/894812#M54038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Minal,&lt;/P&gt;&lt;P&gt; If it is so that ftab table is taking some fields form each of the tables u are looping at then what u need to take care of in addition to the above advice(s) is clear the internal tables u are looping at, at the end of every loop ... if not what it will do is carry forward the values even if not populate in the record of the next itab iteration.&lt;/P&gt;&lt;P&gt; Hope this makes sense.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2005 15:08:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-through-internal-tables/m-p/894812#M54038</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-08T15:08:41Z</dc:date>
    </item>
  </channel>
</rss>

