<?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 Tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1558916#M252899</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;loop at itab1.
  read table itab2 with key fld1 = itab1-fl1.
  read table itab3 with key fld1 = itab1-fld1.

  move-corresponding itab1 to it_final.
  move-corresponding itab2 to it_final.
  move-corresponding itab3 to it_final.
  
  append it_final.
  clear it_final.

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Sep 2006 12:42:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-28T12:42:44Z</dc:date>
    <item>
      <title>Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1558914#M252897</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;I am getting data from three data base tables to the three different internal tables. Now i have to integrate all the data from the three internal tables based on condition and have to put in single table for display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT AEDAT EKGRP EBELN&lt;/P&gt;&lt;P&gt;       BEDAT LIFNR WAERS&lt;/P&gt;&lt;P&gt;       ERNAM FROM EKKO INTO TABLE GT_EKKO WHERE&lt;/P&gt;&lt;P&gt;                          EBELN IN SO_EBELN AND&lt;/P&gt;&lt;P&gt;                          BUKRS IN SO_BUKRS AND&lt;/P&gt;&lt;P&gt;                          EKGRP IN SO_EKGRP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT EDOKN DIFWR ERDAT&lt;/P&gt;&lt;P&gt;       RSCOD REVNO ERNAM&lt;/P&gt;&lt;P&gt;       FROM EREV INTO TABLE GT_EREV FOR ALL ENTRIES&lt;/P&gt;&lt;P&gt;       IN GT_EKKO WHERE ERNAM IN SO_ERNAM AND&lt;/P&gt;&lt;P&gt;                        ERDAT IN SO_ERDAT AND&lt;/P&gt;&lt;P&gt;                        EDOKN EQ GT_EKKO-EBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT LIFNR NAME1 WERKS&lt;/P&gt;&lt;P&gt;       FROM LFA1 INTO TABLE GT_LFA1 FOR ALL ENTRIES&lt;/P&gt;&lt;P&gt;       IN GT_EKKO WHERE WERKS IN SO_WERKS AND&lt;/P&gt;&lt;P&gt;                        LIFNR EQ GT_EKKO-LIFNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;finally i have to put in table for display. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2006 12:37:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1558914#M252897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-28T12:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1558915#M252898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at GT_EKKO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*populate the final table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table GT_EREV with key EDOKN = GT_EKKO-EBELN.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; populate the final table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table GT_LFA1 with key LIFNR = GT_EKKO-LIFNR.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; populate the final table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif.&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;Here one check as to done whether only data will stored in GT_EREV for a Purchasing Document Number or mutilple data will be stored.&lt;/P&gt;&lt;P&gt;If multiple datas are there use loop instead of read statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prakash.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2006 12:42:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1558915#M252898</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-28T12:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1558916#M252899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;loop at itab1.
  read table itab2 with key fld1 = itab1-fl1.
  read table itab3 with key fld1 = itab1-fld1.

  move-corresponding itab1 to it_final.
  move-corresponding itab2 to it_final.
  move-corresponding itab3 to it_final.
  
  append it_final.
  clear it_final.

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2006 12:42:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1558916#M252899</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-28T12:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1558917#M252900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi chandu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u got data from 3 database tables into 3 interanl tables &lt;/P&gt;&lt;P&gt;now u want to join those internaltables into final internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;consider this example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1 with a1 a2 a3 contains 100 records&lt;/P&gt;&lt;P&gt;itab2 with b1 b2 b3 contains 30 reocrds&lt;/P&gt;&lt;P&gt;itab3 with c1 c2 c3 contains 30 records&lt;/P&gt;&lt;P&gt;and a1 = b1 and b2 = c2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u want to fill itab4 with a1 a2 a3 b2 b3 c1 c3 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now follow this&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;itab4-a1 = itab1-a1.&lt;/P&gt;&lt;P&gt;itab4-a2 = itab1-a2.&lt;/P&gt;&lt;P&gt;itab4-a3 = itab1-a3.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;now read table itab2 by comparing a1 and b1 on these tables and append to itab4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table itab2 with key b1 = itab1-a1.&lt;/P&gt;&lt;P&gt;itab4-b2 = itab2-b2.&lt;/P&gt;&lt;P&gt;itab4-b3 = itab2-b3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;now read table itab3 by comparing b2 from retrieved itab2 and with c2 in itab3, on these tables and append to itab4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table itab3 with key c2 = itab2-b2.&lt;/P&gt;&lt;P&gt;itab4-c1 = itab3-c1.&lt;/P&gt;&lt;P&gt;itab4-c3 = itab3-c3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append itab4.&lt;/P&gt;&lt;P&gt;endloop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now in final internal table itab4 u will have all data from all internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;NOTE: while joining two internal table.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;use loop statement for one internal table. and use read statement for one intenaltable.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;NOTE: while using read and loop.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Use LOOP for a table that has large no of records&lt;/P&gt;&lt;P&gt;Use READ for a table that has small no of records&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2006 12:49:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1558917#M252900</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-28T12:49:51Z</dc:date>
    </item>
  </channel>
</rss>

