<?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: 2 itabs data into 3rd itab in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/2-itabs-data-into-3rd-itab/m-p/1752477#M326293</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;use nested loops&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;&lt;/P&gt;&lt;P&gt; loop at itab2 where f1 = itab-f1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  move-corresp. itab2 to itab3...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Dec 2006 07:25:18 GMT</pubDate>
    <dc:creator>andreas_mann3</dc:creator>
    <dc:date>2006-12-19T07:25:18Z</dc:date>
    <item>
      <title>2 itabs data into 3rd itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/2-itabs-data-into-3rd-itab/m-p/1752476#M326292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here i want to fetch 1st record from  itab1 into itab3,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after that i want to fetch records from itab2 into itab3 where data depending on the 1st table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;records which belongs to that itab1 only should go and sit under itab1 record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1 data:    123 &lt;/P&gt;&lt;P&gt;                    234&lt;/P&gt;&lt;P&gt;                    345&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab2 data : 123-x&lt;/P&gt;&lt;P&gt;                  123-y&lt;/P&gt;&lt;P&gt;                  234-y&lt;/P&gt;&lt;P&gt;                  234-z&lt;/P&gt;&lt;P&gt;i want itab3 like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab3: 123&lt;/P&gt;&lt;P&gt;         123-x&lt;/P&gt;&lt;P&gt;         123-y&lt;/P&gt;&lt;P&gt;          234&lt;/P&gt;&lt;P&gt;          234-y&lt;/P&gt;&lt;P&gt;          234-z&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u please guide me in htis ...................&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Dec 2006 07:20:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/2-itabs-data-into-3rd-itab/m-p/1752476#M326292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-19T07:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: 2 itabs data into 3rd itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/2-itabs-data-into-3rd-itab/m-p/1752477#M326293</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;use nested loops&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;&lt;/P&gt;&lt;P&gt; loop at itab2 where f1 = itab-f1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  move-corresp. itab2 to itab3...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Dec 2006 07:25:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/2-itabs-data-into-3rd-itab/m-p/1752477#M326293</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2006-12-19T07:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: 2 itabs data into 3rd itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/2-itabs-data-into-3rd-itab/m-p/1752478#M326294</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;loop at itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move corresponding itab1 to itab3.&lt;/P&gt;&lt;P&gt;append itab3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab2 where field1 = itab1-field1.&lt;/P&gt;&lt;P&gt;&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;&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>Tue, 19 Dec 2006 07:26:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/2-itabs-data-into-3rd-itab/m-p/1752478#M326294</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-19T07:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: 2 itabs data into 3rd itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/2-itabs-data-into-3rd-itab/m-p/1752479#M326295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try likethis&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 itab3.&lt;/P&gt;&lt;P&gt;append itab3.&lt;/P&gt;&lt;P&gt; loop at itab2.&lt;/P&gt;&lt;P&gt;   if itab2-f1 CS itab-f1.&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;  endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&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>Tue, 19 Dec 2006 07:28:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/2-itabs-data-into-3rd-itab/m-p/1752479#M326295</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-19T07:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: 2 itabs data into 3rd itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/2-itabs-data-into-3rd-itab/m-p/1752480#M326296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab3 = itab1.&lt;/P&gt;&lt;P&gt;append itab3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table itab2 with key field1 = itab1-field1. "Header data in itab1 still there&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab3 = itab2.&lt;/P&gt;&lt;P&gt;append itab3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear: itab1, itab2, itab3.&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;This should do it, award points if found helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Dec 2006 07:28:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/2-itabs-data-into-3rd-itab/m-p/1752480#M326296</guid>
      <dc:creator>rahulkavuri</dc:creator>
      <dc:date>2006-12-19T07:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: 2 itabs data into 3rd itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/2-itabs-data-into-3rd-itab/m-p/1752481#M326297</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;If for each record in itab1(say 123),there exists atleast one record in itab2(say 123-x),then&lt;/P&gt;&lt;P&gt;append lines of itab1 to itab3.&lt;/P&gt;&lt;P&gt;append lines of itab2 to itab3.&lt;/P&gt;&lt;P&gt;is sufficient.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise,&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;append itab1 to itab3.&lt;/P&gt;&lt;P&gt;loop at itab2 where f1 = itab-f1.&lt;/P&gt;&lt;P&gt;append itab2 to 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>Tue, 19 Dec 2006 07:39:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/2-itabs-data-into-3rd-itab/m-p/1752481#M326297</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2006-12-19T07:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: 2 itabs data into 3rd itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/2-itabs-data-into-3rd-itab/m-p/1752482#M326298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try with this following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:begin of itab1 occurs 0,&lt;/P&gt;&lt;P&gt;     f1(4) type c,&lt;/P&gt;&lt;P&gt;     f2(4) type c,&lt;/P&gt;&lt;P&gt;     f3(4) type c,&lt;/P&gt;&lt;P&gt;     end of itab1.&lt;/P&gt;&lt;P&gt;data:begin of itab2 occurs 0,&lt;/P&gt;&lt;P&gt;     f1(5) type c,&lt;/P&gt;&lt;P&gt;     f2(5) type c,&lt;/P&gt;&lt;P&gt;     f3(5) type c,&lt;/P&gt;&lt;P&gt;     f4(5) type c,&lt;/P&gt;&lt;P&gt;     end of itab2.&lt;/P&gt;&lt;P&gt;data:begin of itab3 occurs 0,&lt;/P&gt;&lt;P&gt;     f1(5) type c,&lt;/P&gt;&lt;P&gt;     f2(5) type c,&lt;/P&gt;&lt;P&gt;     f3(5) type c,&lt;/P&gt;&lt;P&gt;     f4(5) type c,&lt;/P&gt;&lt;P&gt;     f5(5) type c,&lt;/P&gt;&lt;P&gt;     f6(5) type c,&lt;/P&gt;&lt;P&gt;     end of itab3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1-f1 = '123'. itab1-f2 = '234'.itab1-f3 = '345'.&lt;/P&gt;&lt;P&gt; append itab1. clear itab1.&lt;/P&gt;&lt;P&gt;itab2-f1 = '123-x'.itab2-f2 = '123-y'.itab2-f3 = '234-y'.itab2-f4 = '234-z'.&lt;/P&gt;&lt;P&gt; append itab2. clear itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;read table itab2 index sy-tabix.&lt;/P&gt;&lt;P&gt;itab3-f1 = itab1-f1.&lt;/P&gt;&lt;P&gt;itab3-f2 = itab2-f1.&lt;/P&gt;&lt;P&gt;itab3-f3 = itab2-f2.&lt;/P&gt;&lt;P&gt;itab3-f4 = itab1-f2.&lt;/P&gt;&lt;P&gt;itab3-f5 = itab2-f3.&lt;/P&gt;&lt;P&gt;itab3-f6 = itab2-f4.&lt;/P&gt;&lt;P&gt;append itab3.&lt;/P&gt;&lt;P&gt;clear itab3.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab3.&lt;/P&gt;&lt;P&gt;write:/ itab3-f1, itab3-f2, itab3-f3,itab2-f4,itab3-f5,itab3-f6.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;helpful reward me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Dec 2006 09:28:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/2-itabs-data-into-3rd-itab/m-p/1752482#M326298</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-19T09:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: 2 itabs data into 3rd itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/2-itabs-data-into-3rd-itab/m-p/1752483#M326299</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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : begin of itab1 occurs 0. "itab with work area.
key_field1 like ztable1-key_field1,
field1 like ztable1-field1,
field2 like ztable1-field2,
endof itab1. 

data : begin of itab2 occurs 0. "itab with work area.
key_field2 like ztable2-key_field2,
field3 like ztable2-field3,
field4 like ztable2-field4,
endof itab2. 

data : begin of itab_final occurs 0.
key_field1 like ztable1-key_field1,
field1 like ztable1-field1,
field2 like ztable1-field2,
field3 like ztable2-field3,
field4 like ztable2-field4,
endof itab_final. 


LOOP AT ITAB1.
MOVE-CORRESPONDING TO ITAB1 to ITAB_FINAL.
READ TABLE ITAB2 WITH KEY FILED1 = ITAB1-FIELD1.
if sy-subrc = 0.
MOVE-CORRESPONDING TO ITAB2 to ITAB_FINAL.
endif,
READ TABLE ITAB3 WITH KEY FILED1 = ITAB1-FIELD1.
if sy-subrc = 0.
MOVE-CORRESPONDING TO ITAB2 to ITAB_FINAL.
endif,
append itab_final.
clear itab_final.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Dec 2006 09:32:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/2-itabs-data-into-3rd-itab/m-p/1752483#M326299</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-12-19T09:32:51Z</dc:date>
    </item>
  </channel>
</rss>

