<?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: Read CSV file in background in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-csv-file-in-background/m-p/7297482#M1533681</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rebeka,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the CSV file if a single field value contains ,(comma) as a character, then the CSV format puts " at the begining and at the end. You need to handle this by putting some logic. meand at the time of spliting the values u need to consider " for making it understand it is single field value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reagrds,&lt;/P&gt;&lt;P&gt;Amitava&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Oct 2010 03:48:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-10-07T03:48:39Z</dc:date>
    <item>
      <title>Read CSV file in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-csv-file-in-background/m-p/7297480#M1533679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use the open dataset for uploading CSV file in background but I get the values with "' and , characters.&lt;/P&gt;&lt;P&gt;What am I doing wrong? Can I get an example ?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rebeka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Oct 2010 22:41:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-csv-file-in-background/m-p/7297480#M1533679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-06T22:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Read CSV file in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-csv-file-in-background/m-p/7297481#M1533680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rebeka,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While reading CSV file you have to SPLIT at , to get the values of each fields separately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Immanuel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Oct 2010 02:55:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-csv-file-in-background/m-p/7297481#M1533680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-07T02:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Read CSV file in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-csv-file-in-background/m-p/7297482#M1533681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rebeka,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the CSV file if a single field value contains ,(comma) as a character, then the CSV format puts " at the begining and at the end. You need to handle this by putting some logic. meand at the time of spliting the values u need to consider " for making it understand it is single field value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reagrds,&lt;/P&gt;&lt;P&gt;Amitava&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Oct 2010 03:48:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-csv-file-in-background/m-p/7297482#M1533681</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-07T03:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Read CSV file in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-csv-file-in-background/m-p/7297483#M1533682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If I remember correctly, when using OPEN DATASET, the file name can not have spaces in the name. Try renaming your file removing spaces and retry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your code, you'll need to breakdown the CSV file by the delimiter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code makes an archive file while reading the main file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET filname IN TEXT MODE MESSAGE t_mesg.&lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;MOVE 'X' TO t_error.&lt;/P&gt;&lt;P&gt;MESSAGE e100(z0) WITH 'Error reading file:' t_mesg.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF p_load = 'X'.&lt;/P&gt;&lt;P&gt;OPEN DATASET archfilname FOR OUTPUT IN TEXT MODE MESSAGE t_mesg.&lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;MOVE 'X' TO t_error.&lt;/P&gt;&lt;P&gt;MESSAGE e100(z0) WITH 'Error opening achrive file:' t_mesg.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;READ DATASET filname INTO my_rec.&lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;IF p_load = 'X'.&lt;/P&gt;&lt;P&gt;TRANSFER my_rec TO archfilname.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;SPLIT my_rec AT c_tab " Here my delimter was a tab change to ',' for comma&lt;/P&gt;&lt;P&gt;INTO in_rec-id&lt;/P&gt;&lt;P&gt;in_rec-fname&lt;/P&gt;&lt;P&gt;in_rec-lname&lt;/P&gt;&lt;P&gt;in_rec-addr&lt;/P&gt;&lt;P&gt;in_rec-apt&lt;/P&gt;&lt;P&gt;in_rec-city&lt;/P&gt;&lt;P&gt;in_rec-state&lt;/P&gt;&lt;P&gt;in_rec-zip&lt;/P&gt;&lt;P&gt;in_rec-branch&lt;/P&gt;&lt;P&gt;in_rec-phone1&lt;/P&gt;&lt;P&gt;in_rec-phone2&lt;/P&gt;&lt;P&gt;in_rec-phone3&lt;/P&gt;&lt;P&gt;in_rec-phone3_ext&lt;/P&gt;&lt;P&gt;in_rec-email&lt;/P&gt;&lt;P&gt;in_rec-hear&lt;/P&gt;&lt;P&gt;in_rec-prefcont&lt;/P&gt;&lt;P&gt;in_rec-ownland&lt;/P&gt;&lt;P&gt;in_rec-build&lt;/P&gt;&lt;P&gt;in_rec-ownhome&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;in_rec-get_promo&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;in_rec-cmt1&lt;/P&gt;&lt;P&gt;in_rec-subdate.&lt;/P&gt;&lt;P&gt;APPEND in_rec TO it_input.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;CLOSE DATASET filname.&lt;/P&gt;&lt;P&gt;IF p_load = 'X'.&lt;/P&gt;&lt;P&gt;CLOSE DATASET archfilname.&lt;/P&gt;&lt;P&gt;DELETE DATASET filname.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer This:&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="5119024"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="5200788"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Oct 2010 03:51:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-csv-file-in-background/m-p/7297483#M1533682</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-07T03:51:51Z</dc:date>
    </item>
  </channel>
</rss>

