<?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: Insert lines with different fields between two tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-lines-with-different-fields-between-two-tables/m-p/1723281#M315504</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Clemens&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tokio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Nov 2006 19:55:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-14T19:55:34Z</dc:date>
    <item>
      <title>Insert lines with different fields between two tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-lines-with-different-fields-between-two-tables/m-p/1723279#M315502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again I need a help!!! here I go with my problem: I have one internal table with 3 records and I have another internal table with data related first internal table wich I need to fill it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 1&lt;/P&gt;&lt;P&gt;F1  F2 F3 F4 F5&lt;/P&gt;&lt;P&gt;01  A   C        X&lt;/P&gt;&lt;P&gt;02  A   B        X&lt;/P&gt;&lt;P&gt;03  B   C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2&lt;/P&gt;&lt;P&gt;F1  F2 F3 F4   &lt;/P&gt;&lt;P&gt;01  A   C   5&lt;/P&gt;&lt;P&gt;01  A   C  10&lt;/P&gt;&lt;P&gt;02  B   C  5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result Table (Table 1)&lt;/P&gt;&lt;P&gt;F1  F2 F3 F4 F5&lt;/P&gt;&lt;P&gt;01  A   C  5    X&lt;/P&gt;&lt;P&gt;-     -    -  10   X&lt;/P&gt;&lt;P&gt;02  A   B  5    X&lt;/P&gt;&lt;P&gt;03  B   C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Loop at TABLE1.
Read TABLE 2 with key F1 = TABLE1-F1.
if sy-subrc = 0.
   TABLE1-F4 = TABLE2-F4.
    MODIFY TABLE1 FROM TABLE1
       TRANSPORTING F4
    WHERE F1 = TABLE1-F1.
endif.
Endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; But only modify first record of TABLE1 and I need to append the records of TABLE2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance with any help !!! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tokio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Nov 2006 18:50:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-lines-with-different-fields-between-two-tables/m-p/1723279#M315502</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-11T18:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Insert lines with different fields between two tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-lines-with-different-fields-between-two-tables/m-p/1723280#M315503</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;in result table &lt;/P&gt;&lt;P&gt;- - - 10 X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is hard to explain. - - - 10 - would be resonable, or better 01 A C 15 X?.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better define your result table separately. Loop at table 1, read table 2 with key. If found, move-corresponding table 1 ro result table header line, fill empty collumns in table1 from table 2, then append combined line to result table. The delete row in table 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When done, loop at table 2 and move-corresponding table 2 ro result table header line, append it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Nov 2006 13:36:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-lines-with-different-fields-between-two-tables/m-p/1723280#M315503</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2006-11-12T13:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Insert lines with different fields between two tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-lines-with-different-fields-between-two-tables/m-p/1723281#M315504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Clemens&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tokio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2006 19:55:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-lines-with-different-fields-between-two-tables/m-p/1723281#M315504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-14T19:55:34Z</dc:date>
    </item>
  </channel>
</rss>

