<?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 non-character fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-non-character-fields/m-p/1643359#M286505</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     concatenate is posible only for character strings &lt;/P&gt;&lt;P&gt;      follow below logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data lv_ntweg(17) type c&lt;/P&gt;&lt;P&gt;     lv_gewei(17) type c&lt;/P&gt;&lt;P&gt;     lv_vol(17) type c.  &lt;/P&gt;&lt;P&gt;loop at itab-rec2 into wa2.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;lv_ntweg  = wa2-ntgew&lt;/P&gt;&lt;P&gt;lv_gewei = wa2-gewei &lt;/P&gt;&lt;P&gt;lv_vol = wa2-volum .&lt;/P&gt;&lt;P&gt;condense :lv_ntweg,lv_vol,lv_gewei.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate lv_ntweg,lv_vol,lv_gewei.&lt;/P&gt;&lt;P&gt; wa2-ean11 into text.&amp;lt;/b&amp;gt;tlines-line = text.&lt;/P&gt;&lt;P&gt;append tlines.&lt;/P&gt;&lt;P&gt;clear text.&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;amole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Oct 2006 16:09:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-25T16:09:12Z</dc:date>
    <item>
      <title>Concatenating non-character fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-non-character-fields/m-p/1643357#M286503</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;I have a nested structure which I am trying to convert into a flat structure so that I can output this to a flat file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to concatenate all the fields within my nested structure into a text field but the concatenate command does not automatically convert numerics/quantities.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An extract of my code is as follows:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab-rec2 into wa2.&lt;/P&gt;&lt;P&gt;      concatenate wa2-ntgew wa2-gewei wa2-volum &lt;/P&gt;&lt;P&gt;                  wa2-ean11 into text.&lt;/P&gt;&lt;P&gt;      tlines-line = text.&lt;/P&gt;&lt;P&gt;      append tlines.&lt;/P&gt;&lt;P&gt;      clear text.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone advise me on how I can convert the numeric/qty fields into a character string so I can the concatenate all the fields into a string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ruby&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Oct 2006 15:48:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-non-character-fields/m-p/1643357#M286503</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-25T15:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating non-character fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-non-character-fields/m-p/1643358#M286504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;U may create another internal table where those numeric/ quan fields will be char type including rest of the fields of internal table 1. loop at the 1st internal table  then move all the fields to the 2nd internal table  . And from the 2nd internal table u can try  concatenate.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pl try .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Oct 2006 15:57:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-non-character-fields/m-p/1643358#M286504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-25T15:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating non-character fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-non-character-fields/m-p/1643359#M286505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     concatenate is posible only for character strings &lt;/P&gt;&lt;P&gt;      follow below logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data lv_ntweg(17) type c&lt;/P&gt;&lt;P&gt;     lv_gewei(17) type c&lt;/P&gt;&lt;P&gt;     lv_vol(17) type c.  &lt;/P&gt;&lt;P&gt;loop at itab-rec2 into wa2.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;lv_ntweg  = wa2-ntgew&lt;/P&gt;&lt;P&gt;lv_gewei = wa2-gewei &lt;/P&gt;&lt;P&gt;lv_vol = wa2-volum .&lt;/P&gt;&lt;P&gt;condense :lv_ntweg,lv_vol,lv_gewei.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate lv_ntweg,lv_vol,lv_gewei.&lt;/P&gt;&lt;P&gt; wa2-ean11 into text.&amp;lt;/b&amp;gt;tlines-line = text.&lt;/P&gt;&lt;P&gt;append tlines.&lt;/P&gt;&lt;P&gt;clear text.&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;amole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Oct 2006 16:09:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-non-character-fields/m-p/1643359#M286505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-25T16:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating non-character fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-non-character-fields/m-p/1643360#M286506</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;Create another internal table with all fields as character types. Then move all entries from the original Itab to the new one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab_char[] = itab_original[].&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2006 11:45:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-non-character-fields/m-p/1643360#M286506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-27T11:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating non-character fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-non-character-fields/m-p/1643361#M286507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;U would need to write the particular data into character variables and than use concatenate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lntgew(17) type c.&lt;/P&gt;&lt;P&gt;lgewei(17) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write wa2-ntgew to lntgew using edit mask 'RR_________.___'.&lt;/P&gt;&lt;P&gt;write wa2-gewei to lgewei using edit mask 'RR_________.___'.&lt;/P&gt;&lt;P&gt;concatnate lntgew lgewei into text.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2006 12:05:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-non-character-fields/m-p/1643361#M286507</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-27T12:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating non-character fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-non-character-fields/m-p/1643362#M286508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ruby,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mybe this could help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;pre&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;  lv_separator type c,&lt;/P&gt;&lt;P&gt;  lv_offset type syfdpos,&lt;/P&gt;&lt;P&gt;  lv_len    type sytleng,&lt;/P&gt;&lt;P&gt;  lv_chars  type tab512.&lt;/P&gt;&lt;P&gt;field-symbols:&lt;/P&gt;&lt;P&gt;  &amp;lt;any&amp;gt; type any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_separator = abap_char_utilities=&amp;gt;horizontal_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;  do.&lt;/P&gt;&lt;P&gt;    assign component sy-index of structure itab to &amp;lt;any&amp;gt;.&lt;/P&gt;&lt;P&gt;    if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      exit."loop&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    describe field &amp;lt;any&amp;gt; output length lv_len.&lt;/P&gt;&lt;P&gt;    write &amp;lt;any&amp;gt; to lv_chars+lv_offset(lv_len).&lt;/P&gt;&lt;P&gt;    add lv_len to lv_offset.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;if field separator is needed add these lines&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    write lv_separator to lv_chars+lv_offset(1).    &lt;/P&gt;&lt;P&gt;    add 1 to lv_offset.&lt;/P&gt;&lt;P&gt;  enddo.&lt;/P&gt;&lt;P&gt;  transfer lv_chars to file.&lt;/P&gt;&lt;P&gt;  clear lv_chars.&lt;/P&gt;&lt;P&gt;endloop." at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/pre&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will write a formatted output file but it will use the output formatting options defined for the actual user/language/system. This will determine the representation of numeric and date fields and all other fields with output conversion. That means that in the file you will have what you see on a list or grogram screen, not what you see in debugger. Fields are separated by tabulator. As all fields always are output in the same length, you may omit this part.&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>Sat, 28 Oct 2006 14:33:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenating-non-character-fields/m-p/1643362#M286508</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2006-10-28T14:33:39Z</dc:date>
    </item>
  </channel>
</rss>

