<?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: Updating internal table with CSV file in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-internal-table-with-csv-file/m-p/5767949#M1306037</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sowmya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These record values has been provided by customer and hence I can not change the value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Jun 2009 09:49:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-29T09:49:04Z</dc:date>
    <item>
      <title>Updating internal table with CSV file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-internal-table-with-csv-file/m-p/5767945#M1306033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a flat file as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aaaa, bbbb, asdc, dfgfhg, sdfsg, sdf, sdf, sdf, dfg, sdf, sgf, drgftfgh, sgf, drgtf, swftgd, sgf, &lt;/P&gt;&lt;P&gt;'sjhdfjhf','2003-10-11 07:52:37','167','alkjd',NULL,NULL,NULL,NULL,NULL,'MX1',NULL,NULL,'dkjffdj ,',NULL,NULL,NULL,'1',NULL,NULL,'AR, dfkj ',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where we can see it is separated by commas.I want to upload this one into onr internal table.I used GUI_UPLOAD and gave the logic as folows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF ttab,&lt;/P&gt;&lt;P&gt;rec(1000) TYPE c,&lt;/P&gt;&lt;P&gt;END OF ttab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF tdat,&lt;/P&gt;&lt;P&gt;aaaa type char10&lt;/P&gt;&lt;P&gt;bbbb type char10,&lt;/P&gt;&lt;P&gt;asdc  type char10,&lt;/P&gt;&lt;P&gt;dfgfhg  type char10,&lt;/P&gt;&lt;P&gt;sdfsg  type char10,&lt;/P&gt;&lt;P&gt;sdf  type char10,&lt;/P&gt;&lt;P&gt;sdf  type char10,&lt;/P&gt;&lt;P&gt;sdf  type char10,&lt;/P&gt;&lt;P&gt;dfg   type char10,&lt;/P&gt;&lt;P&gt;sdf    type char10,&lt;/P&gt;&lt;P&gt;sgf  type char10,&lt;/P&gt;&lt;P&gt;drgftfgh  type char10,&lt;/P&gt;&lt;P&gt;sgf  type char10,&lt;/P&gt;&lt;P&gt;drgtf  type char10,&lt;/P&gt;&lt;P&gt;swftgd  type char10,&lt;/P&gt;&lt;P&gt;sgf  type char10, &lt;/P&gt;&lt;P&gt;END OF tdat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: itab TYPE TABLE OF ttab WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: idat TYPE TABLE OF tdat WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: file_str TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_file TYPE localfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'KD_GET_FILENAME_ON_F4'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;static = 'X'&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;file_name = p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;file_str = p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;filename = file_str&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;data_tab = itab&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;file_open_error = 1&lt;/P&gt;&lt;P&gt;file_read_error = 2&lt;/P&gt;&lt;P&gt;no_batch = 3&lt;/P&gt;&lt;P&gt;gui_refuse_filetransfer = 4&lt;/P&gt;&lt;P&gt;invalid_type = 5&lt;/P&gt;&lt;P&gt;no_authority = 6&lt;/P&gt;&lt;P&gt;unknown_error = 7&lt;/P&gt;&lt;P&gt;bad_data_format = 8&lt;/P&gt;&lt;P&gt;header_not_allowed = 9&lt;/P&gt;&lt;P&gt;separator_not_allowed = 10&lt;/P&gt;&lt;P&gt;header_too_long = 11&lt;/P&gt;&lt;P&gt;unknown_dp_error = 12&lt;/P&gt;&lt;P&gt;access_denied = 13&lt;/P&gt;&lt;P&gt;dp_out_of_memory = 14&lt;/P&gt;&lt;P&gt;disk_full = 15&lt;/P&gt;&lt;P&gt;dp_timeout = 16&lt;/P&gt;&lt;P&gt;OTHERS = 17.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab.&lt;/P&gt;&lt;P&gt;CLEAR idat.&lt;/P&gt;&lt;P&gt;SPLIT itab-rec AT ',' INTO idat-aaaa &lt;/P&gt;&lt;P&gt;idat-bbbb ,&lt;/P&gt;&lt;P&gt;idat-asdc  ,&lt;/P&gt;&lt;P&gt;idat-dfgfhg  ,&lt;/P&gt;&lt;P&gt;idat-sdfsg  ,&lt;/P&gt;&lt;P&gt;idat-sdf  ,&lt;/P&gt;&lt;P&gt;idat-sdf  ,&lt;/P&gt;&lt;P&gt;idat-sdf  ,&lt;/P&gt;&lt;P&gt;idat-dfg   ,&lt;/P&gt;&lt;P&gt;idat-sdf    ,&lt;/P&gt;&lt;P&gt;idat-sgf  ,&lt;/P&gt;&lt;P&gt;idat-drgftfgh  ,&lt;/P&gt;&lt;P&gt;idat-sgf  ,&lt;/P&gt;&lt;P&gt;idat-drgtf  ,&lt;/P&gt;&lt;P&gt;idat-swftgd  ,&lt;/P&gt;&lt;P&gt;idat-sgf  , &lt;/P&gt;&lt;P&gt;APPEND idat.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the issue is when I use the statement SPLIT itab-rec AT ',' this is not updating the table idat properly.Because the flat file contains the value as 'dkjffdj ,', too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone give me some solution to update the internal table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2009 08:45:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-internal-table-with-csv-file/m-p/5767945#M1306033</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-29T08:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Updating internal table with CSV file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-internal-table-with-csv-file/m-p/5767946#M1306034</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;or you delete ' from csv file before uploading it or after uploading it, in this last case u can use statament replace:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE ''' WITH SPACE INTO ITAB-FIELD.&lt;/P&gt;&lt;P&gt;&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, 29 Jun 2009 08:52:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-internal-table-with-csv-file/m-p/5767946#M1306034</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-29T08:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Updating internal table with CSV file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-internal-table-with-csv-file/m-p/5767947#M1306035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.But my issue is the record are having comma value too.If I split at comma then the reocrd which has comma also gets splitted at comma.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2009 08:56:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-internal-table-with-csv-file/m-p/5767947#M1306035</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-29T08:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Updating internal table with CSV file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-internal-table-with-csv-file/m-p/5767948#M1306036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi..&lt;/P&gt;&lt;P&gt;try replacing ,', with ',  before splitting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as in dfkj ,','asdasd', .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u replace it will become dfkj ',asdasd',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will this work fro you??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2009 09:01:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-internal-table-with-csv-file/m-p/5767948#M1306036</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-29T09:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Updating internal table with CSV file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-internal-table-with-csv-file/m-p/5767949#M1306037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sowmya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These record values has been provided by customer and hence I can not change the value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2009 09:49:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-internal-table-with-csv-file/m-p/5767949#M1306037</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-29T09:49:04Z</dc:date>
    </item>
  </channel>
</rss>

