<?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: Table to string conversion in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-to-string-conversion/m-p/5342939#M1230586</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;hi,&lt;/P&gt;&lt;P&gt;This can be achieved in the following steps&lt;/P&gt;&lt;P&gt;1) Declare a field symbols &amp;lt;itab&amp;gt; type standard table.&lt;/P&gt;&lt;P&gt;2) Assign your internal table to this field symbols.&lt;/P&gt;&lt;P&gt;3) Assign the field symbols to your required internal table, say table with one column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sharath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Mar 2009 12:59:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-18T12:59:21Z</dc:date>
    <item>
      <title>Table to string conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-to-string-conversion/m-p/5342938#M1230585</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;Is there a FM or some other approach in SAP which could convert all the field records of a internal table to a string fomat into another internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For e.g&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal table IT_TAB has four field F1,F2,F3 &amp;amp; F4 with data d1,d2,d3 and d4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This after conversion will look like d1#d2#d3#d4 under 1 field in another internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried FM 'SAP_CONVERT_TO_TEX_FORMAT', which is doing the same, but will not work with non unicode elements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 12:54:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-to-string-conversion/m-p/5342938#M1230585</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T12:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Table to string conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-to-string-conversion/m-p/5342939#M1230586</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;hi,&lt;/P&gt;&lt;P&gt;This can be achieved in the following steps&lt;/P&gt;&lt;P&gt;1) Declare a field symbols &amp;lt;itab&amp;gt; type standard table.&lt;/P&gt;&lt;P&gt;2) Assign your internal table to this field symbols.&lt;/P&gt;&lt;P&gt;3) Assign the field symbols to your required internal table, say table with one column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sharath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 12:59:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-to-string-conversion/m-p/5342939#M1230586</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T12:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Table to string conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-to-string-conversion/m-p/5342940#M1230587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Feel free to use the code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PERFORM fr_format_error_file TABLES gt_error gt_file. "gt_error is the table with data gt_file is the flat str. table &lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;FORM fr_format_error_file  TABLES p_final_table
                                  p_output_file.

  IF NOT gv_error LT 1.

    DATA : lf_buf TYPE string,
           lf_line TYPE string,
    co_line_feed TYPE c VALUE cl_abap_char_utilities=&amp;gt;cr_lf.

    FIELD-SYMBOLS : &amp;lt;fs_record&amp;gt; TYPE ANY,&amp;lt;fs_comp&amp;gt; TYPE ANY.
    LOOP AT p_final_table ASSIGNING &amp;lt;fs_record&amp;gt;.
      DO.
        ASSIGN COMPONENT sy-index OF STRUCTURE &amp;lt;fs_record&amp;gt; TO &amp;lt;fs_comp&amp;gt;.
        IF sy-subrc &amp;lt;&amp;gt; 0.
          EXIT.
        ENDIF.
        lf_buf = &amp;lt;fs_comp&amp;gt;.
        IF sy-index = 1.
          lf_line = lf_buf.
        ELSE.
          CONCATENATE lf_line lf_buf INTO lf_line SEPARATED BY c_sep. "check what field separator you need
        ENDIF.
        CLEAR lf_buf.
      ENDDO.
      CONCATENATE lf_line co_line_feed INTO lf_line.
      APPEND lf_line TO p_output_file.
      CLEAR lf_line.
    ENDLOOP.
  ENDIF.
ENDFORM.                    " FR_FORMAT_ERROR_FILE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 13:01:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-to-string-conversion/m-p/5342940#M1230587</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-03-18T13:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Table to string conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-to-string-conversion/m-p/5342941#M1230588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Apart from  the above post,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can also try using function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOTR_SERV_TABLE_TO_STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SO_TAB_TO_STRING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COPY_CTAB_TO_STRING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sharath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 13:02:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-to-string-conversion/m-p/5342941#M1230588</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T13:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Table to string conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-to-string-conversion/m-p/5342942#M1230589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt; try this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF ty_asn_head,&lt;/P&gt;&lt;P&gt;        f1 type.. ,&lt;/P&gt;&lt;P&gt;       f2 type ... ,&lt;/P&gt;&lt;P&gt;      f3 type ...&lt;/P&gt;&lt;P&gt;      END OF ty_asn_head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF ty_finalstr,&lt;/P&gt;&lt;P&gt;        str TYPE string,&lt;/P&gt;&lt;P&gt;       END OF ty_finalstr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  it_asn_head TYPE STANDARD TABLE OF ty_asn_head ,&lt;/P&gt;&lt;P&gt;      wa_asn_head TYPE ty_asn_head ,&lt;/P&gt;&lt;P&gt;      it_finalstr TYPE STANDARD TABLE OF ty_finalstr,&lt;/P&gt;&lt;P&gt;      wa_finalstr TYPE ty_finalstr.&lt;/P&gt;&lt;P&gt;loop at it_asn_head into wa_asn_head .&lt;/P&gt;&lt;P&gt;CONCATENATE wa_asn_head-f1   wa_asn_head-f2   wa_asn_head-f3  into  wa_finalstr-str separated by space .&lt;/P&gt;&lt;P&gt;append wa_finalstr into it_finalstr.&lt;/P&gt;&lt;P&gt;ennloop .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;sachhi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 13:06:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-to-string-conversion/m-p/5342942#M1230589</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T13:06:15Z</dc:date>
    </item>
  </channel>
</rss>

