<?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: Comma problem in CSV file upload from application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843502#M1318436</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remove those commas from the file or use a different delimiter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Jul 2009 15:07:20 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2009-07-08T15:07:20Z</dc:date>
    <item>
      <title>Comma problem in CSV file upload from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843501#M1318435</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 am uploading CSV format data from Application server using Split at ',' command .  &lt;/P&gt;&lt;P&gt; For example my I/p data is like &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  123, 456, "Example1,Example2",987,"SAP,ABAP". That means whenever we had comma in a field then we will &lt;/P&gt;&lt;P&gt;  put the value in Double quotes Here the problem is that whenever any valuu contains COMMA then the Split functionality is not working properly.  Can anybody throw some light  abt how to solve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kumar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;MOVED BY MODERATOR TO THE CORRECT FORUM&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Jul 8, 2009 11:00 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2009 20:34:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843501#M1318435</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-07T20:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Comma problem in CSV file upload from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843502#M1318436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remove those commas from the file or use a different delimiter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 15:07:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843502#M1318436</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2009-07-08T15:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Comma problem in CSV file upload from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843503#M1318437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to first move the entire row in to one string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try try to use the below command ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace all occurances ',' in w_string with ' " '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 15:08:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843503#M1318437</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-08T15:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Comma problem in CSV file upload from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843504#M1318438</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;Is it possible for you give sample code to understand better. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Anand Patil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 15:09:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843504#M1318438</guid>
      <dc:creator>former_member189420</dc:creator>
      <dc:date>2009-07-08T15:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Comma problem in CSV file upload from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843505#M1318439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If we use REPLACE ALL OCCURENCES of ','  with ' " ' then this will not solve the problem because for our  I/p File, Comma is the delimiter.So this will not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching the Code that I had written . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Open the file in application server.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    OPEN DATASET p_pfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      DO.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read the input file data record-by-record&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        READ DATASET p_pfile INTO lv_csv_data.&lt;/P&gt;&lt;P&gt;        IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        REPLACE ALL OCCURENCES OF ' " ' with Space in lv_csv_data.&lt;/P&gt;&lt;P&gt;        Condense lv_csv_data.&lt;/P&gt;&lt;P&gt;*Split the  data at ',' and populate all fields.&lt;/P&gt;&lt;P&gt;          SPLIT lv_csv_data AT ',' INTO gw_input_data-hdate&lt;/P&gt;&lt;P&gt;          gw_input_data-lname     gw_input_data-mname&lt;/P&gt;&lt;P&gt;          gw_input_data-fname     gw_input_data-suffix&lt;/P&gt;&lt;P&gt;          gw_input_data-addres    gw_input_data-addr2&lt;/P&gt;&lt;P&gt;          gw_input_data-bnum      gw_input_data-union&lt;/P&gt;&lt;P&gt;          gw_input_data-carallow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Append the data into the internal table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          APPEND gw_input_data TO gt_input_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us suppose we have to update the followingh file  in Appl.server with the following data.&lt;/P&gt;&lt;P&gt;    123, "Test1,test2", 789,"Example~of".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per my code the reult in the string will  be divided ino 6 values instead of 5 values due to Comma in the Value field.&lt;/P&gt;&lt;P&gt;May be wehave to read this character by charcter and need to Check exactly where this " will start and end.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 17:09:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843505#M1318439</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-08T17:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Comma problem in CSV file upload from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843506#M1318440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there  is any alternative way of solving this prolem other than checking the file with "".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 17:12:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843506#M1318440</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-08T17:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Comma problem in CSV file upload from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843507#M1318441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see Rich's reply. Using a different delimiter is the simplest solution; otherwise, you will end up trying to parse the data after the split and trying to re-combine it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 17:14:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843507#M1318441</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-08T17:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Comma problem in CSV file upload from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843508#M1318442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; If we use REPLACE ALL OCCURENCES of ','  with ' " ' then this will not solve the problem because for our  I/p File, Comma is the delimiter.So this will not work.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; I am attaching the Code that I had written . &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; * Open the file in application server.&lt;/P&gt;&lt;P&gt;&amp;gt;     OPEN DATASET p_pfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;&amp;gt;     IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&amp;gt;       DO.&lt;/P&gt;&lt;P&gt;&amp;gt; * Read the input file data record-by-record&lt;/P&gt;&lt;P&gt;&amp;gt;         READ DATASET p_pfile INTO lv_csv_data.&lt;/P&gt;&lt;P&gt;&amp;gt;         IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&amp;gt;         REPLACE ALL OCCURENCES OF ' " ' with Space in lv_csv_data.&lt;/P&gt;&lt;P&gt;&amp;gt;         Condense lv_csv_data.&lt;/P&gt;&lt;P&gt;&amp;gt; *Split the  data at ',' and populate all fields.&lt;/P&gt;&lt;P&gt;&amp;gt;           SPLIT lv_csv_data AT ',' INTO gw_input_data-hdate&lt;/P&gt;&lt;P&gt;&amp;gt;           gw_input_data-lname     gw_input_data-mname&lt;/P&gt;&lt;P&gt;&amp;gt;           gw_input_data-fname     gw_input_data-suffix&lt;/P&gt;&lt;P&gt;&amp;gt;           gw_input_data-addres    gw_input_data-addr2&lt;/P&gt;&lt;P&gt;&amp;gt;           gw_input_data-bnum      gw_input_data-union&lt;/P&gt;&lt;P&gt;&amp;gt;           gw_input_data-carallow.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; *  Append the data into the internal table.&lt;/P&gt;&lt;P&gt;&amp;gt;           APPEND gw_input_data TO gt_input_data.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Let us suppose we have to update the followingh file  in Appl.server with the following data.&lt;/P&gt;&lt;P&gt;&amp;gt;     123, "Test1,test2", 789,"Example~of".&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; As per my code the reult in the string will  be divided ino 6 values instead of 5 values due to Comma in the Value field.&lt;/P&gt;&lt;P&gt;&amp;gt; May be wehave to read this character by charcter and need to Check exactly where this " will start and end.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand that you can not change the delimiter of the input file. Are you sure of how many quotes will be there? &lt;/P&gt;&lt;P&gt;If yes, What you can do is:&lt;/P&gt;&lt;P&gt;1. Spilt the input file based on ".&lt;/P&gt;&lt;P&gt;2. Based on what you get after step 1. Change only those , with some character say ~ that is  rarely used. &lt;/P&gt;&lt;P&gt;3. Concatenate the split into a string and split based on ,&lt;/P&gt;&lt;P&gt;4. Replace some character i.e. ~ (we had considered in step 2) by ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After step 4 you will be having data split based only on the delimiter say ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps. Let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Anand Patil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 17:41:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843508#M1318442</guid>
      <dc:creator>former_member189420</dc:creator>
      <dc:date>2009-07-08T17:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Comma problem in CSV file upload from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843509#M1318443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are correct. But  the file is coming from Taleo and it is not possible to delimit the Comma seperator. We have to use the string parser. Can u please tell me how to solve this problem using string parseing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 17:42:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843509#M1318443</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-08T17:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Comma problem in CSV file upload from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843510#M1318444</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;check the class CL_ABAP_CHAR_UTILITIES in se24..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and see the attributes and check anyone will help you..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 17:55:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843510#M1318444</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-08T17:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Comma problem in CSV file upload from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843511#M1318445</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;Below code is to replace , within the double quotes by #. So that you can go about using your logic of split at ,(comma) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_ifile is the work area after you read a record from the file using read dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: strlength type i,
         i type i,
        start.

strlength = strlen ( wa_ifile ).

do strlength times.

if wa_file+i(1) = '"' ----&amp;gt; double quotes

        if start is initial.

             start = 'X'.

        else.

             clear start.

         endif.

endif.

if not start is initial.

      if wa_file+i(1) = ','.    -----------&amp;gt; comma

           wa_file+i(1) = '#'.        -----&amp;gt; this is upto you to decide. , between the quotes will be replace by what type of character.

      endif.

endif.

add 1 to i.

enddo.

clear i.&lt;/CODE&gt;&lt;/PRE&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Anand Patil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 18:10:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843511#M1318445</guid>
      <dc:creator>former_member189420</dc:creator>
      <dc:date>2009-07-08T18:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Comma problem in CSV file upload from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843512#M1318446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&amp;nbsp; Anand...&lt;/P&gt;&lt;P&gt;Please let me know whether you got the points or not..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 19:08:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843512#M1318446</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-03-26T19:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Comma problem in CSV file upload from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843513#M1318447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Bharath for asking and Anand for your input. I browsed extensively for this issue and I must say, this is the best solution so far. It helped me to implement the same. I am able to use it as it is, but, it is failing with the below error message at line &lt;STRONG&gt;wa_file+i(1) = '#'.&amp;nbsp; &lt;/STRONG&gt;: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"At the write position, you cannot use offset and length specifications&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;with fields of type "STRING" or "XSTRING"."&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: strlength type i,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i type i,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; start.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;strlength = strlen ( wa_ifile ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do strlength times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if wa_file+i(1) = '"' ----&amp;gt; double quotes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if start is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; start = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clear start.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not start is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if wa_file+i(1) = ','.&amp;nbsp;&amp;nbsp;&amp;nbsp; -----------&amp;gt; comma&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;wa_file+i(1) = '#'.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -----&amp;gt; Faling here with the above error message &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add 1 to i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help. &lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 08:00:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/5843513#M1318447</guid>
      <dc:creator>former_member788380</dc:creator>
      <dc:date>2014-12-17T08:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: Comma problem in CSV file upload from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/14027782#M2038627</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 805px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/230536iEE33EBD7F50689E0/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hi Guys,&lt;BR /&gt;&lt;BR /&gt;Please have a look of my approach.&lt;BR /&gt;I am considering that only the fields with comma in its value is coming encapsulated with - "&amp;nbsp;&lt;BR /&gt;and we are not doing any REPLACE_OCCURENCES, Instead we are splitting all values with comma into internal tables and finding the the values containing - " from where we determine starting and ending of the field value.&lt;BR /&gt;&lt;BR /&gt;This works for any number of fields that has comma in its values. But the only catch is the values with comma has to come encapsulated with&amp;nbsp; - ".&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 09:10:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comma-problem-in-csv-file-upload-from-application-server/m-p/14027782#M2038627</guid>
      <dc:creator>amarjit_yanglem</dc:creator>
      <dc:date>2025-02-26T09:10:03Z</dc:date>
    </item>
  </channel>
</rss>

