<?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: Error when transferring table data to a CSV format file. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-transferring-table-data-to-a-csv-format-file/m-p/1614614#M275397</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks its working now.&lt;/P&gt;&lt;P&gt;But another problem I am noticing now. Which is my I_TAB is holding an extra blank row. so the output is putting an extra smi-colon at the end. Any solutions for that? and also its putting smi-colon though I used coma to separate them? Is there anything else I need to do in order to have the coma as a separator instead of smi-colon?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Oct 2006 14:51:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-18T14:51:49Z</dc:date>
    <item>
      <title>Error when transferring table data to a CSV format file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-transferring-table-data-to-a-csv-format-file/m-p/1614610#M275393</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 am getting an error when I am passing the parameter value for the file name from the selection screen. If i hard code the path and name it works fine. can any one help me please. here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: OUTFILE LIKE dxfile-filename &lt;/P&gt;&lt;P&gt;                       DEFAULT 'C:\Apositivepay.txt',&lt;/P&gt;&lt;P&gt;      RUNDATE LIKE PAYR-LAUFD,&lt;/P&gt;&lt;P&gt;      Bank LIKE T012K-HBKID.     "List of Possible Banks&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;type-pools:TRUXS.&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF OUTPUT_REC OCCURS 0,  "Output file for USBANK&lt;/P&gt;&lt;P&gt;      ACCT(12),           "bank account no&lt;/P&gt;&lt;P&gt;      ...&lt;/P&gt;&lt;P&gt;      Payee2(40) type c,         "payee 2&lt;/P&gt;&lt;P&gt;      END OF OUTPUT_REC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:  itab1 type TRUXS_T_TEXT_DATA.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;         I_FIELD_SEPERATOR          = ','&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;         I_TAB_SAP_DATA             = OUTPUT_REC&lt;/P&gt;&lt;P&gt;     CHANGING&lt;/P&gt;&lt;P&gt;         I_TAB_CONVERTED_DATA       =  itab1&lt;/P&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;          CONVERSION_FAILED          = 1&lt;/P&gt;&lt;P&gt;          OTHERS                     = 2.&lt;/P&gt;&lt;P&gt; IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;        filename = OUTFILE  "This doesn't work&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;        filename = 'C:\Apositivepay.txt' "This works&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;          DATA_TAB            = itab1&lt;/P&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;          FILE_OPEN_ERROR     = 1&lt;/P&gt;&lt;P&gt;          FILE_WRITE_ERROR    = 2&lt;/P&gt;&lt;P&gt;          INVALID_FILESIZE    = 3&lt;/P&gt;&lt;P&gt;          INVALID_TABLE_WIDTH = 4&lt;/P&gt;&lt;P&gt;          INVALID_TYPE        = 5&lt;/P&gt;&lt;P&gt;          NO_BATCH            = 6&lt;/P&gt;&lt;P&gt;          UNKNOWN_ERROR       = 7&lt;/P&gt;&lt;P&gt;          OTHERS              = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Anwarul Kabir&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2006 14:34:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-transferring-table-data-to-a-csv-format-file/m-p/1614610#M275393</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-18T14:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Error when transferring table data to a CSV format file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-transferring-table-data-to-a-csv-format-file/m-p/1614611#M275394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;data: v_outputfile type string.&lt;/P&gt;&lt;P&gt;v_outputfile = OUTFILE.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;filename = v_OUTputFILE&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = itab1&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;FILE_OPEN_ERROR = 1&lt;/P&gt;&lt;P&gt;FILE_WRITE_ERROR = 2&lt;/P&gt;&lt;P&gt;INVALID_FILESIZE = 3&lt;/P&gt;&lt;P&gt;INVALID_TABLE_WIDTH = 4&lt;/P&gt;&lt;P&gt;INVALID_TYPE = 5&lt;/P&gt;&lt;P&gt;NO_BATCH = 6&lt;/P&gt;&lt;P&gt;UNKNOWN_ERROR = 7&lt;/P&gt;&lt;P&gt;OTHERS = 8. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make the highlighted changes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Ravi Kanth Talagana&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2006 14:37:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-transferring-table-data-to-a-csv-format-file/m-p/1614611#M275394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-18T14:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: Error when transferring table data to a CSV format file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-transferring-table-data-to-a-csv-format-file/m-p/1614612#M275395</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;try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;DATA: FILENAME TYPE STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE OUTFILE TO FILENAME.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;filename = FILENAME&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = itab1&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;FILE_OPEN_ERROR = 1&lt;/P&gt;&lt;P&gt;FILE_WRITE_ERROR = 2&lt;/P&gt;&lt;P&gt;INVALID_FILESIZE = 3&lt;/P&gt;&lt;P&gt;INVALID_TABLE_WIDTH = 4&lt;/P&gt;&lt;P&gt;INVALID_TYPE = 5&lt;/P&gt;&lt;P&gt;NO_BATCH = 6&lt;/P&gt;&lt;P&gt;UNKNOWN_ERROR = 7&lt;/P&gt;&lt;P&gt;OTHERS = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2006 14:38:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-transferring-table-data-to-a-csv-format-file/m-p/1614612#M275395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-18T14:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error when transferring table data to a CSV format file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-transferring-table-data-to-a-csv-format-file/m-p/1614613#M275396</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;use this code and save that file in CSV format it will work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET P_IFILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;    MESSAGE E000 WITH 'Problem in opening Application Server file'.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    DO.&lt;/P&gt;&lt;P&gt;      READ DATASET P_IFILE INTO IT_UPLOAD.&lt;/P&gt;&lt;P&gt;      IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        APPEND IT_UPLOAD.&lt;/P&gt;&lt;P&gt;        CLEAR IT_UPLOAD.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDDO.&lt;/P&gt;&lt;P&gt;    CLOSE DATASET P_IFILE.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  IF IT_UPLOAD[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    MESSAGE E000 WITH 'NO data in the file/upload problem'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT IT_UPLOAD.&lt;/P&gt;&lt;P&gt;    SPLIT IT_UPLOAD AT ','&lt;/P&gt;&lt;P&gt;                     INTO&lt;/P&gt;&lt;P&gt;                     IT_FDATA-MATNR&lt;/P&gt;&lt;P&gt;                     IT_FDATA-WERKS.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                    IT_FDATA-SLGORT.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND IT_FDATA.&lt;/P&gt;&lt;P&gt;    CLEAR  IT_FDATA.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   IT_TOTAL1[] = IT_FDATA[].&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2006 14:40:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-transferring-table-data-to-a-csv-format-file/m-p/1614613#M275396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-18T14:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Error when transferring table data to a CSV format file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-transferring-table-data-to-a-csv-format-file/m-p/1614614#M275397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks its working now.&lt;/P&gt;&lt;P&gt;But another problem I am noticing now. Which is my I_TAB is holding an extra blank row. so the output is putting an extra smi-colon at the end. Any solutions for that? and also its putting smi-colon though I used coma to separate them? Is there anything else I need to do in order to have the coma as a separator instead of smi-colon?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2006 14:51:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-transferring-table-data-to-a-csv-format-file/m-p/1614614#M275397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-18T14:51:49Z</dc:date>
    </item>
  </channel>
</rss>

