<?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/5073251#M1178554</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rahul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this code to populated itab3 using itab1 and itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say you have:-&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;internal_table , work_area&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;itab1, wa1&lt;/STRONG&gt; ;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;itab2 , wa2&lt;/STRONG&gt; ;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;itab3 , wa3&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at itab1 into wa1.
  wa3-f1 = wa1-f1.
  wa3-f2 = wa1-f2.
  read table itab2 into wa2 with key f1 = wa1-f1. "read itab2
  if sy-subrc eq 0. "if record found
    wa3-f3 = wa2-f3.
    wa3-f4 = wa2-f4.
  endif.
  append wa3 to itab3. "append into itab3
  clear wa3. "clear work_area
  clear wa2. "clear work_area
  clear wa1. "clear work_area
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves you problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Tarun Gambhir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 24 Jan 2009 06:16:30 GMT</pubDate>
    <dc:creator>I355602</dc:creator>
    <dc:date>2009-01-24T06:16:30Z</dc:date>
    <item>
      <title>Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/5073247#M1178550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I am new to the abap. Regarding these questions have a doubt pls let me know completely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Have a 2 internal tables say itab1 and itab2, those having a one field.&lt;/P&gt;&lt;P&gt;   My query is to pass the common records to 3rd internal table say final?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) say 2 internal tables itab1 and itab2.  Itab1 having 4 fields say f1,f2,f3,f4 and first two fields f1,f2 have &lt;/P&gt;&lt;P&gt;   data and another itab2 having 3 fields f1,f3,f4 and last two fields have a data such as f3,f4.&lt;/P&gt;&lt;P&gt;  I need to move the itab2 data to itab1 such as itab2-f3,itab2-f4 to itab1-f3,itab1-f4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Difference between stock transport order and sales order?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could u please anyone for the above...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;regards,&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jan 2009 02:31:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/5073247#M1178550</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-24T02:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/5073248#M1178551</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;Check this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Loop at itab1.
g_index = sy-tabix.
clear itab2.
read table itab2 with key f1 = itab1-f1.
if sy-aubrc eq 0.
itab1-f3 = itab2-f3.
itab1-f4 = itab2-f4.
Modify itab1 index g_index.
endif.
Endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Avinash Kodarapu on Jan 24, 2009 8:13 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jan 2009 02:42:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/5073248#M1178551</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-24T02:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/5073249#M1178552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai,&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;read table itab2 with key f1 = itab1-f1 binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1-f3 = itab2-f3.&lt;/P&gt;&lt;P&gt;itab1-f4 = itab2-f4.&lt;/P&gt;&lt;P&gt;&lt;/P&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;&lt;STRONG&gt;interrelationship between Stock transport order and sales order :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stock transport order acts as purchase order for the receiving plant&lt;/P&gt;&lt;P&gt;whereas it acts as a sales order for supplying plant. It contains the&lt;/P&gt;&lt;P&gt;shipping information in the purchase order itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope it will work out for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;R.Dhineshraj.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: dhinesh raj on Jan 24, 2009 5:27 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jan 2009 04:22:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/5073249#M1178552</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-24T04:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/5073250#M1178553</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;&lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example if ur itab1 itab2 is as follows&lt;/P&gt;&lt;P&gt;itab1       &lt;/P&gt;&lt;P&gt;f1  f2      &lt;/P&gt;&lt;P&gt;x   x       &lt;/P&gt;&lt;P&gt;y   y       &lt;/P&gt;&lt;P&gt;z   z       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     itab2 &lt;/P&gt;&lt;P&gt;      f1 f2&lt;/P&gt;&lt;P&gt;      y   y &lt;/P&gt;&lt;P&gt;      z   z&lt;/P&gt;&lt;P&gt;      a   a&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;    loop at itab2.&lt;/P&gt;&lt;P&gt;        if itab1-f1 eq itab2-f1.&lt;/P&gt;&lt;P&gt;           if itab2-f2 eq itab2-f2.&lt;/P&gt;&lt;P&gt;               final-f1  = itab1-f1.&lt;/P&gt;&lt;P&gt;               final-f2   =  itab1-f2.&lt;/P&gt;&lt;P&gt;                exit.&lt;/P&gt;&lt;P&gt;           endif.&lt;/P&gt;&lt;P&gt;         endif.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jan 2009 04:27:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/5073250#M1178553</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-24T04:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/5073251#M1178554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rahul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this code to populated itab3 using itab1 and itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say you have:-&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;internal_table , work_area&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;itab1, wa1&lt;/STRONG&gt; ;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;itab2 , wa2&lt;/STRONG&gt; ;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;itab3 , wa3&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at itab1 into wa1.
  wa3-f1 = wa1-f1.
  wa3-f2 = wa1-f2.
  read table itab2 into wa2 with key f1 = wa1-f1. "read itab2
  if sy-subrc eq 0. "if record found
    wa3-f3 = wa2-f3.
    wa3-f4 = wa2-f4.
  endif.
  append wa3 to itab3. "append into itab3
  clear wa3. "clear work_area
  clear wa2. "clear work_area
  clear wa1. "clear work_area
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves you problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Tarun Gambhir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jan 2009 06:16:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/5073251#M1178554</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-01-24T06:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/5073252#M1178555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Rahul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test the following code, hope will help you to solve your problem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF t_it,
  name(10),
  sale TYPE p DECIMALS 0,
  END OF t_it.

DATA: it1 TYPE STANDARD TABLE OF t_it WITH HEADER LINE,
      it2 TYPE STANDARD TABLE OF t_it WITH HEADER LINE,
      it3 TYPE STANDARD TABLE OF t_it WITH HEADER LINE.

it1-name = 'F1'.
it1-sale = 10.
APPEND it1 TO it1.
it1-name = 'F2'.
it1-sale = 10.
APPEND it1 TO it1.
it1-name = 'F3'.
it1-sale = 10.
APPEND it1 TO it1.
it1-name = 'F4'.
it1-sale = 10.
APPEND it1 TO it1.

it2-name = 'F1'.
it2-sale = 10.
APPEND it2 TO it2.
it2-name = 'F2'.
it2-sale = 10.
APPEND it2 TO it2.
it2-name = 'F3'.
it2-sale = 10.
APPEND it2 TO it2.

LOOP AT it1 INTO it1.
  READ TABLE it2 INTO it2 WITH KEY name = it1-name.
  IF sy-subrc = 0.
    APPEND it2 TO it3.
  ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Reply if any Issue,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jan 2009 06:24:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/5073252#M1178555</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2009-01-24T06:24:51Z</dc:date>
    </item>
  </channel>
</rss>

