<?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 Upload from Excel in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-from-excel/m-p/814614#M42047</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SAp Gurus,&lt;/P&gt;&lt;P&gt; I need to upload data from Excel sheet(desktop)which has a field of length 80.&lt;/P&gt;&lt;P&gt;Fn module ALSM_EXCEL_TO_INTERNAL_TABLE has 'value' parm of lenght 50.&lt;/P&gt;&lt;P&gt;Gui_upload give file type mismatch....&lt;/P&gt;&lt;P&gt;upload/ws_upload give output data in junk format...&lt;/P&gt;&lt;P&gt;Any suggestions ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Dec 2004 11:09:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2004-12-13T11:09:42Z</dc:date>
    <item>
      <title>Upload from Excel</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-from-excel/m-p/814614#M42047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SAp Gurus,&lt;/P&gt;&lt;P&gt; I need to upload data from Excel sheet(desktop)which has a field of length 80.&lt;/P&gt;&lt;P&gt;Fn module ALSM_EXCEL_TO_INTERNAL_TABLE has 'value' parm of lenght 50.&lt;/P&gt;&lt;P&gt;Gui_upload give file type mismatch....&lt;/P&gt;&lt;P&gt;upload/ws_upload give output data in junk format...&lt;/P&gt;&lt;P&gt;Any suggestions ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Dec 2004 11:09:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-from-excel/m-p/814614#M42047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-13T11:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: Upload from Excel</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-from-excel/m-p/814615#M42048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Convert excel file to &amp;lt;b&amp;gt;csv&amp;lt;/b&amp;gt; format and use method &amp;lt;b&amp;gt;gui_upload&amp;lt;/b&amp;gt; of class &amp;lt;b&amp;gt;cl_gui_frontend_services&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CALL METHOD cl_gui_frontend_services=&amp;gt;gui_upload
    EXPORTING
      filename                = v_file
      filetype                = 'ASC'
      has_field_separator     = space
*    HEADER_LENGTH           = 1
    IMPORTING
      filelength              = v_filelength
      header                  = v_header
    CHANGING
      data_tab                = i_file
    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 OR v_result IS INITIAL.
    MESSAGE e015(zz) WITH 'File Invalid'.
  ENDIF.

*** Splitting the contents of the file

  LOOP AT i_file INTO wa_file.
    SPLIT wa_file-data AT ',' INTO wa_data-werks
                                   wa_data-maabc
                                   wa_data-matnr
                                   wa_data-validfrom
                                   wa_data-validto
                                   wa_data-weektype
                                   wa_data-week1
                                   wa_data-week2
                                   wa_data-week3
                                   wa_data-week4
                                   wa_data-week5.
    APPEND wa_data TO i_data.
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Dec 2004 11:23:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-from-excel/m-p/814615#M42048</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-13T11:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Upload from Excel</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-from-excel/m-p/814616#M42049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Convert to tab deliminated text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use:&lt;/P&gt;&lt;P&gt;this &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------" /&gt;&lt;P&gt;  call function 'WS_UPLOAD'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            filename            = filename&lt;/P&gt;&lt;P&gt;            filetype            = 'DAT'&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_write_error    = 2&lt;/P&gt;&lt;P&gt;            invalid_filesize    = 3&lt;/P&gt;&lt;P&gt;            invalid_table_width = 4&lt;/P&gt;&lt;P&gt;            invalid_type        = 5.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or use this&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------------------" /&gt;&lt;P&gt;CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                      = filename&lt;/P&gt;&lt;P&gt;      filetype                      = 'ASC'&lt;/P&gt;&lt;P&gt;      has_field_separator           = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HEADER_LENGTH                 = 0&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      read_by_line                  = 'X'&lt;/P&gt;&lt;P&gt;      DAT_MODE                      = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CODEPAGE                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IGNORE_CERR                   = ABAP_TRUE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  REPLACEMENT                   = '#'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CHECK_BOM                     = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILELENGTH                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HEADER                        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------" /&gt;&lt;P&gt;If it helps please give points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Dec 2004 11:44:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-from-excel/m-p/814616#M42049</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-13T11:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Upload from Excel</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-from-excel/m-p/814617#M42050</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;Im also using the same FM with the ff parameters:&lt;/P&gt;&lt;P&gt;  call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            filename                = p_pfname&lt;/P&gt;&lt;P&gt;            i_begin_col             = 1&lt;/P&gt;&lt;P&gt;            i_begin_row             = 1&lt;/P&gt;&lt;P&gt;            i_end_col               = 30   'upto N-col&lt;/P&gt;&lt;P&gt;            i_end_row               = 5000 'upto N-row&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            intern                  = it_buffer&lt;/P&gt;&lt;P&gt;       exceptions&lt;/P&gt;&lt;P&gt;            inconsistent_parameters = 1&lt;/P&gt;&lt;P&gt;            upload_ole              = 2&lt;/P&gt;&lt;P&gt;            others                  = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should be straight forward and returns the Excel data into an Internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Kelvin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Dec 2004 06:57:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-from-excel/m-p/814617#M42050</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-16T06:57:26Z</dc:date>
    </item>
  </channel>
</rss>

