<?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 Data set-Storing in CSV format in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-set-storing-in-csv-format/m-p/3299371#M789697</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I can save my file to a text file but I want to store it in a CSV file.&lt;/P&gt;&lt;P&gt;Each Field should be under diffrent column.&lt;/P&gt;&lt;P&gt;How can achieve this?&lt;/P&gt;&lt;P&gt;Following code brings it to only single column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE '&lt;BR /&gt;TEST\' sy-sysid '\FILE\' sy-datum '.txt' INTO p_file.&lt;/P&gt;&lt;P&gt;  OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT t_output.&lt;/P&gt;&lt;P&gt;    TRANSFER t_output-vtext TO p_file.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLOSE DATASET p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    MESSAGE  'Error closing the File' TYPE 'E'.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;  ELSEIF sy-subrc IS INITIAL.&lt;/P&gt;&lt;P&gt;    WRITE : 'Everything OK!!!!, File saved in the Location'  COLOR COL_POSITIVE , p_file.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Jan 2008 21:44:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-29T21:44:35Z</dc:date>
    <item>
      <title>Data set-Storing in CSV format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-set-storing-in-csv-format/m-p/3299371#M789697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I can save my file to a text file but I want to store it in a CSV file.&lt;/P&gt;&lt;P&gt;Each Field should be under diffrent column.&lt;/P&gt;&lt;P&gt;How can achieve this?&lt;/P&gt;&lt;P&gt;Following code brings it to only single column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE '&lt;BR /&gt;TEST\' sy-sysid '\FILE\' sy-datum '.txt' INTO p_file.&lt;/P&gt;&lt;P&gt;  OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT t_output.&lt;/P&gt;&lt;P&gt;    TRANSFER t_output-vtext TO p_file.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLOSE DATASET p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    MESSAGE  'Error closing the File' TYPE 'E'.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;  ELSEIF sy-subrc IS INITIAL.&lt;/P&gt;&lt;P&gt;    WRITE : 'Everything OK!!!!, File saved in the Location'  COLOR COL_POSITIVE , p_file.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2008 21:44:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-set-storing-in-csv-format/m-p/3299371#M789697</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-29T21:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Data set-Storing in CSV format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-set-storing-in-csv-format/m-p/3299372#M789698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Praveen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the function module &lt;STRONG&gt;SAP_CONVERT_TO_CSV_FORMAT&lt;/STRONG&gt; to convert your itab data to the .csv format. Do not use a filename for download.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can loop over this converted itab data and store the file on your application server.&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;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2008 21:59:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-set-storing-in-csv-format/m-p/3299372#M789698</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-01-29T21:59:09Z</dc:date>
    </item>
  </channel>
</rss>

