<?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 I need get value from two internal table. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/i-need-get-value-from-two-internal-table/m-p/2345460#M517341</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt; I have two internal table.one itab1 and itab2 is other one.now i need to ALV  report with fields of matnr ,ersda and mtart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:begin of itab1 occurs 0,&lt;/P&gt;&lt;P&gt;       matnr type mara-matnr,&lt;/P&gt;&lt;P&gt;      ersda type mara-ersda,&lt;/P&gt;&lt;P&gt;      end of itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:begin of itab2 occurs0,&lt;/P&gt;&lt;P&gt;       matnr type mara-matnr,&lt;/P&gt;&lt;P&gt;      mtart type mara-mtart,&lt;/P&gt;&lt;P&gt;      end of itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Jun 2007 10:05:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-08T10:05:21Z</dc:date>
    <item>
      <title>I need get value from two internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/i-need-get-value-from-two-internal-table/m-p/2345460#M517341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt; I have two internal table.one itab1 and itab2 is other one.now i need to ALV  report with fields of matnr ,ersda and mtart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:begin of itab1 occurs 0,&lt;/P&gt;&lt;P&gt;       matnr type mara-matnr,&lt;/P&gt;&lt;P&gt;      ersda type mara-ersda,&lt;/P&gt;&lt;P&gt;      end of itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:begin of itab2 occurs0,&lt;/P&gt;&lt;P&gt;       matnr type mara-matnr,&lt;/P&gt;&lt;P&gt;      mtart type mara-mtart,&lt;/P&gt;&lt;P&gt;      end of itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 10:05:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/i-need-get-value-from-two-internal-table/m-p/2345460#M517341</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T10:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: I need get value from two internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/i-need-get-value-from-two-internal-table/m-p/2345461#M517342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare one more table itab3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data:begin of itab3occurs 0,
matnr type mara-matnr,
ersda type mara-ersda,
mtart type mara-mtart,
end of itab3.

loop at itab1.
read table itab2 with key matnr = itab1-matnr.
if sy-subrc = 0.
itab3-matnr  = itab1-matnbr.
itab3-ersda = itab1-ersda.
itab3-mtart = itab2-mtart.
append itab3.
endif.
endloop.
Pass the table itab3 to the ALV.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If useful reward.&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 10:10:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/i-need-get-value-from-two-internal-table/m-p/2345461#M517342</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T10:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: I need get value from two internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/i-need-get-value-from-two-internal-table/m-p/2345462#M517343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data : begin of ifinal occurs 0,&lt;/P&gt;&lt;P&gt;        matnr type mara-matnr,&lt;/P&gt;&lt;P&gt;ersda type mara-ersda,&lt;/P&gt;&lt;P&gt;mtart type mara-mtart,&lt;/P&gt;&lt;P&gt;end of ifinal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;ifinal-matnr = itab1-matnr.&lt;/P&gt;&lt;P&gt;ifinal-ersda = itab1-ersda.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table itab2 with key matnr = itab1-matnr.&lt;/P&gt;&lt;P&gt;ifinal-mtart = itab2-mtart.&lt;/P&gt;&lt;P&gt;append ifinal.&lt;/P&gt;&lt;P&gt;clear : itab2.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now pass the ifinal to alv display fm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 10:10:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/i-need-get-value-from-two-internal-table/m-p/2345462#M517343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T10:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: I need get value from two internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/i-need-get-value-from-two-internal-table/m-p/2345463#M517344</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;y dont u select all the three fields in one shot in this case...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any how&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;declare another tabel withe all the three records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr ersda from mara into table itab1.&lt;/P&gt;&lt;P&gt;if not itab1 is initial.&lt;/P&gt;&lt;P&gt;select matnr mtart from mara for all entries in itab1&lt;/P&gt;&lt;P&gt;where matnr = itab1-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;sort itab2.&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;read table itab2 with key matnr = itab1-matnr binary search.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;itab3-matnr = itab1-matnr&lt;/P&gt;&lt;P&gt;itab3-ersda  = itab1-matnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab3-mtart= itab1-mtart.&lt;/P&gt;&lt;P&gt;append itab3.&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;now display the itab3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venkatesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 10:12:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/i-need-get-value-from-two-internal-table/m-p/2345463#M517344</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T10:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: I need get value from two internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/i-need-get-value-from-two-internal-table/m-p/2345464#M517345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can create itab3  internal table  with  these fileds (matnr ,ersda and mtart).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;finally move these fileds to itab3 based on matnr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 10:12:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/i-need-get-value-from-two-internal-table/m-p/2345464#M517345</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T10:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: I need get value from two internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/i-need-get-value-from-two-internal-table/m-p/2345465#M517346</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 suggested,declare third internal table with fields matnr,ersda and mtart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the two internal table asre populated,put a loop to populate itab3.&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;move-corresponding itab1 to itab3.&lt;/P&gt;&lt;P&gt;   loop at itab2 where matnr = itab1-matnr.&lt;/P&gt;&lt;P&gt;    move-corresponding itab2 to itab3.&lt;/P&gt;&lt;P&gt;    append itab3.&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>Fri, 08 Jun 2007 10:18:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/i-need-get-value-from-two-internal-table/m-p/2345465#M517346</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2007-06-08T10:18:09Z</dc:date>
    </item>
  </channel>
</rss>

