<?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: Concatenating the table fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-the-table-fields/m-p/5832546#M1316745</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;Both are in different tables.Any updates ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Varun on Jun 16, 2009 8:01 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Jun 2009 14:25:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-16T14:25:36Z</dc:date>
    <item>
      <title>Concatenating the table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-the-table-fields/m-p/5832544#M1316743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;In my req I have to concatenate the header and item details, during concatenating I have to concatenate one header and one line item and push it as one line(Single Line), I am unable to concatenate the values into a single line they are coming in two lines, how to achive this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 14:22:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-the-table-fields/m-p/5832544#M1316743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-16T14:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating the table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-the-table-fields/m-p/5832545#M1316744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how are u having those header and item details??? two internal tables or in same or how?&lt;/P&gt;&lt;P&gt;depending upon this i can suggest&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 14:24:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-the-table-fields/m-p/5832545#M1316744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-16T14:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating the table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-the-table-fields/m-p/5832546#M1316745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;Both are in different tables.Any updates ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Varun on Jun 16, 2009 8:01 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 14:25:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-the-table-fields/m-p/5832546#M1316745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-16T14:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating the table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-the-table-fields/m-p/5832547#M1316746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming &lt;STRONG&gt;header_data&lt;/STRONG&gt; is table which holds header names as rows, whereas &lt;STRONG&gt;item_data&lt;/STRONG&gt; is a table which stores one item value in each row, then the following would apply:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: itab type string occurs 0.
       
loop at header_data.
  read table item_data index sy-tabix. "read it by index if i.e first row in ITEM_DATA has value for first row in HEADER_DATA
  if sy-subrc = 0.
    concatenate header_data item_data into itab separeted by ';' ."line would look like MATNR;045678031
   append itab.
  endif.      
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 14:36:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-the-table-fields/m-p/5832547#M1316746</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-06-16T14:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating the table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-the-table-fields/m-p/5832548#M1316747</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;P&gt;loop at header into wa_header &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table lt_line into wa_line with key &amp;lt;COndition&amp;gt;&lt;/P&gt;&lt;P&gt;loop in lt_line ito wa_line&lt;/P&gt;&lt;P&gt;concatenate wa_head-field wa_line-field into temp.&lt;/P&gt;&lt;P&gt;'append temp&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt; Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 14:38:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-the-table-fields/m-p/5832548#M1316747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-16T14:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating the table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-the-table-fields/m-p/5832549#M1316748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;clear : gv_concat_line, is_item.

loop at it_item into is_item.
    concatenate gv_concat_line is_item-desc into gv_concat_line.  

    at end of key. "--------&amp;gt;key field separating records in header table which is in item table also
       clear: is_header .
       read table it_header into is_header with key key = is_item-key.
       if sy-subrc = 0.
          gs_final-line = gv_concat_line.
          append gs_final to gt_final.
          clear : gv_concat_line.
      endif.
    
    endat.

    clear is_item.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps.. self explanatory,...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 14:40:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-the-table-fields/m-p/5832549#M1316748</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-16T14:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating the table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-the-table-fields/m-p/5832550#M1316749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Loop on the item table and read the header table by matching the key fields in both.&lt;/P&gt;&lt;P&gt;Then concatenate both into some variable and append it to a new internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 18:02:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-the-table-fields/m-p/5832550#M1316749</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-16T18:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating the table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-the-table-fields/m-p/5832551#M1316750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Varun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First Lets sat Table A(header), Table B(Items), Table C(Final after concatineing,,)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table A--- Contains 4 records,,,,&lt;/P&gt;&lt;P&gt;Table B--- Contains 4 records,,,,(Or more records based on line Items)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Loop at Table A.

Loop at Table B (based on Work Area of Table A--- Where clause)
Concatinate (Table A - Field) (Table B - Field) into (Table C- Field). "Gives you First header at the end available no of items, one by one...
Endloop.

Append Table C.
Endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;Dileep .C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 01:51:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-the-table-fields/m-p/5832551#M1316750</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T01:51:18Z</dc:date>
    </item>
  </channel>
</rss>

