<?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: Convert Internal table to string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-string/m-p/2839405#M664987</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001 line-size 500.

data: it001 type table of t001 with header line.
data: string type string.

select * into table it001 from t001.


loop at it001.
 concatenate string it001 into string separated by ','.
endloop.
shift string left deleting leading ','.


write:/ string.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Sep 2007 18:09:36 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2007-09-26T18:09:36Z</dc:date>
    <item>
      <title>Convert Internal table to string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-string/m-p/2839403#M664985</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 an internal table , i need to convert that to a string. How it can be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sa_R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 18:06:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-string/m-p/2839403#M664985</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T18:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-string/m-p/2839404#M664986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data : v_string type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; loop at itab.&lt;/P&gt;&lt;P&gt; concatenate itab-value v_string into v_string.&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; write  v_string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 18:09:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-string/m-p/2839404#M664986</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T18:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-string/m-p/2839405#M664987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001 line-size 500.

data: it001 type table of t001 with header line.
data: string type string.

select * into table it001 from t001.


loop at it001.
 concatenate string it001 into string separated by ','.
endloop.
shift string left deleting leading ','.


write:/ string.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 18:09:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-string/m-p/2839405#M664987</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-09-26T18:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-string/m-p/2839406#M664988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mahesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I forget tell you that i am working in Unicode environment. so MOVE will not work &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After making this string i need to pass CL_ABAP_GZIP to compress&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sa_R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 18:10:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-string/m-p/2839406#M664988</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T18:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-string/m-p/2839407#M664989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with that , but system giving non compatible error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sa_R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 18:13:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-string/m-p/2839407#M664989</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T18:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-string/m-p/2839408#M664990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, how about moving one field at a time?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001 line-size 500.

data: it001 type table of t001 with header line.
data: string type string.
data: fldstr type string.
data: substr type string.
field-symbols: &amp;lt;fs&amp;gt;.

select * into table it001 from t001.


loop at it001.
  do.
    assign component sy-index of structure it001 to &amp;lt;fs&amp;gt;.
    if sy-subrc &amp;lt;&amp;gt; 0.
      exit.
    endif.
    fldstr = &amp;lt;fs&amp;gt;.
    concatenate substr fldstr into substr separated by space.
    shift substr left deleting leading space.
  enddo.
  concatenate string substr into string separated by ','.
endloop.
shift string left deleting leading ','.


write:/ string.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 18:17:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-string/m-p/2839408#M664990</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-09-26T18:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-string/m-p/2839409#M664991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simply You can use FM  SOTR_SERV_TABLE_TO_STRING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 18:20:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-string/m-p/2839409#M664991</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T18:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-string/m-p/2839410#M664992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check with this FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOTR_SERV_TABLE_TO_STRING&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 18:24:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-string/m-p/2839410#M664992</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T18:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-string/m-p/2839411#M664993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seshu/Mahesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This fm only with type compatible structures , in unicode this will not work.&lt;/P&gt;&lt;P&gt;After using this fm it is giving dump in the following line&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
000420   * only one line of text   &amp;gt; directly into text-string
000430     if sy-tfill = 1.
000440       read table text_tab index 1.
     &amp;gt;       text = text_tab.
000460   * more than one line of text   &amp;gt; concatenate into text-string
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to use you logic to get this done. I try to avoid the loop . But there is no other way to avoid the loop, i have to go with loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sa_R.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 18:29:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-string/m-p/2839411#M664993</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T18:29:23Z</dc:date>
    </item>
  </channel>
</rss>

