<?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: Problem with 'SAP_CONVERT_TO_CSV_FORMAT' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sap-convert-to-csv-format/m-p/6840514#M1473017</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;So convert to character and try. C N D and T are conider as character field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Apr 2010 09:48:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-04-05T09:48:18Z</dc:date>
    <item>
      <title>Problem with 'SAP_CONVERT_TO_CSV_FORMAT'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sap-convert-to-csv-format/m-p/6840513#M1473016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I am trying to covert internal table to CSV format. But i am getting error "The statement is defined only for character tye objects only". Only character-type data objects are supported at the argument&lt;/P&gt;&lt;P&gt;position "op1" for the statement&lt;/P&gt;&lt;P&gt;  "IF ... op1 CO op2 ...".In this case, the operand "op1" has the non-character-type "I". The&lt;/P&gt;&lt;P&gt;current program is flagged as a Unicode program. In the Unicode context,&lt;/P&gt;&lt;P&gt; type X fields are seen as non-character-type, as are structures that&lt;/P&gt;&lt;P&gt;contain non-character-type components.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below this my coding&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 
*TYPE-POOLS: truxs.*

*TABLES: BSEG.*

*DATA: ITAB TYPE STANDARD TABLE OF  BSEG  WITH HEADER LINE .*
*DATA: ITAB1 TYPE TRUXS_T_TEXT_DATA.*

*SELECT **
*UP TO 5 ROWS*
*FROM BSEG*
*INTO TABLE itab WHERE GJAHR EQ '2006'.*

*CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'*
*EXPORTING*
*i_field_seperator = ';'*
*TABLES*
*i_tab_sap_data = itab*
*CHANGING*
*i_tab_converted_data = itab1*
*EXCEPTIONS*
*conversion_failed = 1*
*OTHERS = 2.*
*IF sy-subrc EQ 0.*
*MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno*
*WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.*
*ENDIF.*

*CALL FUNCTION 'GUI_DOWNLOAD'*
*EXPORTING*
*filename = 'C:\TMP\test.CSV'*
*TABLES*
*data_tab = itab1*
*EXCEPTIONS*
*OTHERS = 1.*

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Apr 2010 09:23:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sap-convert-to-csv-format/m-p/6840513#M1473016</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-05T09:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with 'SAP_CONVERT_TO_CSV_FORMAT'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sap-convert-to-csv-format/m-p/6840514#M1473017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;So convert to character and try. C N D and T are conider as character field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Apr 2010 09:48:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sap-convert-to-csv-format/m-p/6840514#M1473017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-05T09:48:18Z</dc:date>
    </item>
  </channel>
</rss>

