<?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/1959601#M394585</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There will be atleast one key fields in 3 internal tables based on this you can write a logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg:&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt; move-corresponding itab1 to itfinal.&lt;/P&gt;&lt;P&gt; read table itab2 with key field1 = itab1-field1.&lt;/P&gt;&lt;P&gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  move-corresponding itab2 to itfinal.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; read table itab3 with key field1 = itab1-field1.&lt;/P&gt;&lt;P&gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  move-corresponding itab3 to itfinal.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;append itfinal.&lt;/P&gt;&lt;P&gt;clear itfinal.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now the itfinal table contains the records from 3 tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Feb 2007 04:48:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-23T04:48:58Z</dc:date>
    <item>
      <title>internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1959600#M394584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to fetch the data from 3 internal tables into another interna table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2007 04:44:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1959600#M394584</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-23T04:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1959601#M394585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There will be atleast one key fields in 3 internal tables based on this you can write a logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg:&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt; move-corresponding itab1 to itfinal.&lt;/P&gt;&lt;P&gt; read table itab2 with key field1 = itab1-field1.&lt;/P&gt;&lt;P&gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  move-corresponding itab2 to itfinal.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; read table itab3 with key field1 = itab1-field1.&lt;/P&gt;&lt;P&gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  move-corresponding itab3 to itfinal.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;append itfinal.&lt;/P&gt;&lt;P&gt;clear itfinal.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now the itfinal table contains the records from 3 tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2007 04:48:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1959601#M394585</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-23T04:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1959602#M394586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Balu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose i have three internal tables ITAB1, ITAB2, ITAB3 into ITAB with a key field1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do the following:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at ITAB1.&lt;/P&gt;&lt;P&gt;clear ITAB.&lt;/P&gt;&lt;P&gt;move correspond ITAB1 to ITAB. &lt;/P&gt;&lt;P&gt;read table ITAB2 with key field1 = ITAB1-key.&lt;/P&gt;&lt;P&gt;move correspond ITAB2 to ITAB.&lt;/P&gt;&lt;P&gt;read table ITAB3 with key field1 = ITAB1-key.&lt;/P&gt;&lt;P&gt;move correspond ITAB3 to ITAB.&lt;/P&gt;&lt;P&gt;append ITAB.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;after this you will get all the data in ITAB internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or Else...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if there are common fields in the 3 internal tables , the use&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;sort itab1 by field1.&lt;/P&gt;&lt;P&gt;sort itab1 by field2.&lt;/P&gt;&lt;P&gt;sort itab1 by field3.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;   move-corresponding itab1 to it_final.&lt;/P&gt;&lt;P&gt; read table itab2 with key field1 = itab1-field1 binary search.&lt;/P&gt;&lt;P&gt; if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;    move-corresponding itab2 to it_final.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt; read table itab3 with key field1 = itab1-field1 binary search.&lt;/P&gt;&lt;P&gt; if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;    move-corresponding itab3 to it_final.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;append it_final.&lt;/P&gt;&lt;P&gt;clear it_final.&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;&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;Priyanka.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2007 04:49:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1959602#M394586</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-23T04:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1959603#M394587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt; Use &lt;/P&gt;&lt;P&gt;ITAB 3 = itab1.&lt;/P&gt;&lt;P&gt;itab 3 = itab 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2007 04:51:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1959603#M394587</guid>
      <dc:creator>sreeramkumar_madisetty</dc:creator>
      <dc:date>2007-02-23T04:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1959604#M394588</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 need to &lt;/P&gt;&lt;P&gt;Loop at ITAB1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read ITAB2 with key &amp;lt;field2&amp;gt; = &amp;lt;itab1-field1&amp;gt;.&lt;/P&gt;&lt;P&gt;read ITAB2 with key &amp;lt;field3&amp;gt; = &amp;lt;itab1-field1&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab4-field1 = itab1-field1.&lt;/P&gt;&lt;P&gt;itab4-field2 = ita21-field2.&lt;/P&gt;&lt;P&gt;itab4-field3 = itab3-field3.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;append itab4.&lt;/P&gt;&lt;P&gt;clear itab4.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal table ITAB4 contains the combined data of all the three tables itab1,itab2,itab3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saumya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2007 04:51:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1959604#M394588</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-23T04:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1959605#M394589</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. Declare a final itab with all the fields and move the values of one db table to this &lt;/P&gt;&lt;P&gt;2. get the date from 2 tables&lt;/P&gt;&lt;P&gt;3. sort them &lt;/P&gt;&lt;P&gt;4.  loop at final itab &lt;/P&gt;&lt;P&gt;5. read statement for each table and use binary search&lt;/P&gt;&lt;P&gt;6. modify final itab transporting the values&lt;/P&gt;&lt;P&gt;7.endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2007 05:17:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1959605#M394589</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-23T05:17:20Z</dc:date>
    </item>
  </channel>
</rss>

