<?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: Excel upload - # Character in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-character/m-p/8048851#M1611623</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to implement following logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data: gt_data  type table of string.
 data: ls_data           type string.
 data: lt_data           type table of string.

Load the GT_DATA using GUI_UPLOAD from Excel.

call function 'GUI_UPLOAD'
    exporting
      filename                = lv_temp_file
      has_field_separator     = ' '
    tables
      data_tab                = gt_data
    exceptions
      file_open_error         = 1
      file_read_error         = 2
      no_batch                = 3
      gui_refuse_filetransfer = 4
      invalid_type            = 5
      no_authority            = 6
      unknown_error           = 7
      bad_data_format         = 8
      header_not_allowed      = 9
      separator_not_allowed   = 10
      header_too_long         = 11
      unknown_dp_error        = 12
      access_denied           = 13
      dp_out_of_memory        = 14
      disk_full               = 15
      dp_timeout              = 16
      others                  = 17.
  if sy-subrc &amp;lt;&amp;gt; 0.
    message id sy-msgid type sy-msgty number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    gv_error = abap_true.
  endif.


loop  at gt_data into ls_data.

split ls_data at cl_abap_char_utilities=&amp;gt;horizontal_tab into table lt_data.

endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by above code you will have each value with one record line in LT_DATA.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jul 2011 03:18:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-07-12T03:18:59Z</dc:date>
    <item>
      <title>Excel upload - # Character</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-character/m-p/8048850#M1611622</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 using a program to upload a excel file and read the contents. One of the field in the excel has value ABC - XYZ, but, this field is read as ABC # XYZ in the program. I tried to use replace and all the class/methods of abap_char_util but its still not working. &lt;/P&gt;&lt;P&gt;In hex, the value of # is 23 right?  But when executing the program,  the value of ABC # XYZ has 96 for field # under hexadecimal value.&lt;/P&gt;&lt;P&gt;So what is this 96 hex value? Or how do we search or replace this # value? Pls help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Subha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jul 2011 22:30:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-character/m-p/8048850#M1611622</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-11T22:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Excel upload - # Character</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-character/m-p/8048851#M1611623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to implement following logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data: gt_data  type table of string.
 data: ls_data           type string.
 data: lt_data           type table of string.

Load the GT_DATA using GUI_UPLOAD from Excel.

call function 'GUI_UPLOAD'
    exporting
      filename                = lv_temp_file
      has_field_separator     = ' '
    tables
      data_tab                = gt_data
    exceptions
      file_open_error         = 1
      file_read_error         = 2
      no_batch                = 3
      gui_refuse_filetransfer = 4
      invalid_type            = 5
      no_authority            = 6
      unknown_error           = 7
      bad_data_format         = 8
      header_not_allowed      = 9
      separator_not_allowed   = 10
      header_too_long         = 11
      unknown_dp_error        = 12
      access_denied           = 13
      dp_out_of_memory        = 14
      disk_full               = 15
      dp_timeout              = 16
      others                  = 17.
  if sy-subrc &amp;lt;&amp;gt; 0.
    message id sy-msgid type sy-msgty number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    gv_error = abap_true.
  endif.


loop  at gt_data into ls_data.

split ls_data at cl_abap_char_utilities=&amp;gt;horizontal_tab into table lt_data.

endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by above code you will have each value with one record line in LT_DATA.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2011 03:18:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-character/m-p/8048851#M1611623</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-12T03:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Excel upload - # Character</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-character/m-p/8048852#M1611624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have resolved it myself. I converted the hex value 96 to string using method cl_abap_conv_in_ce-&amp;gt;convert. Then used REPLACE the string(#) with - . This worked.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2011 13:19:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-character/m-p/8048852#M1611624</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-12T13:19:19Z</dc:date>
    </item>
  </channel>
</rss>

