<?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: OPEN DATASET for CSV files in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098135#M1359858</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;could you tell us what end of line character it is? did you determine it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Sep 2009 09:46:34 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2009-09-08T09:46:34Z</dc:date>
    <item>
      <title>OPEN DATASET for CSV files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098128#M1359851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using OPEN DATASET to read CSV files (created using Excel 2007), that contain multiple lines, the problem is when I use READ DATASET it transfers the hole content of the CSV file into the variable instead of transfering line by line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The source code is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: lv_lines type string.

open dataset x_file for input
  in text mode
  encoding default.
if sy-subrc eq 0.
  do.
    clear lv_lines.
    read dataset x_file into lv_lines.
    if sy-subrc eq 0.
      append lv_lines to y_outtab.
    else.
      exit.
    endif.
  enddo.
else.
  message e001(ztim_fi)
    with x_file
    raising general_fault.
endif.

close dataset x_file.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;  Mário Espinheira&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Sep 2009 16:45:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098128#M1359851</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-07T16:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET for CSV files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098129#M1359852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope y outtab is the internal table you are using.&lt;/P&gt;&lt;P&gt;If not append to an internal table.&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;&lt;/P&gt;&lt;P&gt;data: lv_lines type string.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;open dataset x_file for input&lt;/P&gt;&lt;P&gt;  in text mode&lt;/P&gt;&lt;P&gt;  encoding default.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;  do.&lt;/P&gt;&lt;P&gt;    clear lv_lines.&lt;/P&gt;&lt;P&gt;    read dataset x_file into lv_lines.&lt;/P&gt;&lt;P&gt;    if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;      append lv_lines to t_outtab. // t_outtab is internal table&lt;/P&gt;&lt;P&gt;    else.&lt;/P&gt;&lt;P&gt;      exit.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  enddo.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;  message e001(ztim_fi)&lt;/P&gt;&lt;P&gt;    with x_file&lt;/P&gt;&lt;P&gt;    raising general_fault.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;close dataset x_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;pallavi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Sep 2009 16:54:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098129#M1359852</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-07T16:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET for CSV files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098130#M1359853</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;It depends on how that file was created, u make sure the sign of end of record is set at the end of every line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Sep 2009 16:56:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098130#M1359853</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-07T16:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET for CSV files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098131#M1359854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's what I think, because if I create the file using Notepad it works fine. When I use the Excel generated files it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, Y_OUTTAB is an Internal Table of type String.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;  Mário Espinheira&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Sep 2009 17:06:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098131#M1359854</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-07T17:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET for CSV files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098132#M1359855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Determine what is the end of line character, and you may indicate it in the OPEN DATASET statement (check [abap doc for open dataset end of line character|http://help.sap.com/abapdocu_70/en/ABAPOPEN_DATASET_LINEFEED.htm])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Sep 2009 19:47:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098132#M1359855</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-09-07T19:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET for CSV files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098133#M1359856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've already tried all four possibilities and none of them worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;  Mário Espinheira&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2009 09:27:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098133#M1359856</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-08T09:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET for CSV files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098134#M1359857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mario,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use this link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="632394"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you to solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2009 09:44:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098134#M1359857</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-08T09:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET for CSV files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098135#M1359858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;could you tell us what end of line character it is? did you determine it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2009 09:46:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098135#M1359858</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-09-08T09:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET for CSV files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098136#M1359859</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;In debug, when I see the content of LV_LINES (that has all the data in the file) the Linefeed is #.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;  Mário Espinheira&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2009 09:48:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098136#M1359859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-08T09:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET for CSV files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098137#M1359860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;OL&gt;&lt;LI level="1" type="ol"&gt;&lt;P&gt;is usually the replacement character when the character cannot be displayed. Could you switch to hexadecimal view and tell us the code?&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2009 17:29:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-csv-files/m-p/6098137#M1359860</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-09-08T17:29:07Z</dc:date>
    </item>
  </channel>
</rss>

