<?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 internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6225552#M1379813</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;I have 2 internal tables which i am supposed to merge as 1. the problem here is that the the relation is 1: N&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table A                          table   B&lt;/P&gt;&lt;P&gt;key 1  desc                  Key 1  Value1&lt;/P&gt;&lt;P&gt;                                    Key  1 Value 2&lt;/P&gt;&lt;P&gt;                                    key   1 Value 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And my final output should be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;key 1 desc  value1 value2 value3.  One thing I know is there wont be more than 9 values in table b for every one in table a. Any quick ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Oct 2009 10:26:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-02T10:26:32Z</dc:date>
    <item>
      <title>internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6225552#M1379813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;I have 2 internal tables which i am supposed to merge as 1. the problem here is that the the relation is 1: N&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table A                          table   B&lt;/P&gt;&lt;P&gt;key 1  desc                  Key 1  Value1&lt;/P&gt;&lt;P&gt;                                    Key  1 Value 2&lt;/P&gt;&lt;P&gt;                                    key   1 Value 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And my final output should be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;key 1 desc  value1 value2 value3.  One thing I know is there wont be more than 9 values in table b for every one in table a. Any quick ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2009 10:26:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6225552#M1379813</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-02T10:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6225553#M1379814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;quick idea.. use loop at B and read from A &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now a simple code&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data:  gt_final type table of string,
          gs_final like line of gt_final.

sort table_b by key.
loop at table_b into wa_b.
at new key.
 clear : gs_final, wa_a.
 read table table_a into wa_a with key KEY = wa_b-KEY. 
   if sy-subrc = 0.
      concatenate wa_a-key wa_a-desc into gs_final separated by space.
   endif.
endat.

concatenate gs_final wa_b-value into gs_final  separated by space.

at end of key. 
 append gs_final to gt_final.
  clear gs_final.
endat.

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one more option is to use field symbols. search to see how it is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Soumyaprakash Mishra on Oct 2, 2009 3:59 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2009 10:29:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6225553#M1379814</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-02T10:29:16Z</dc:date>
    </item>
  </channel>
</rss>

