<?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: Upload file from excel sheet in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662897#M1096968</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer below code-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Type pools&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPE-POOLS: truxs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: tab_raw_data TYPE truxs_t_text_data,&lt;/P&gt;&lt;P&gt;        l_filename TYPE rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF t_ampl OCCURS 0,&lt;/P&gt;&lt;P&gt;        bmatn TYPE ampl-bmatn,   "Internal Material Number&lt;/P&gt;&lt;P&gt;        ematn TYPE ampl-ematn,   "MPN Material&lt;/P&gt;&lt;P&gt;        datub(10),               "Valid to date&lt;/P&gt;&lt;P&gt;      END OF t_ampl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Upload input excel file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            i_tab_raw_data       = tab_raw_data&lt;/P&gt;&lt;P&gt;            i_filename           = l_filename&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            i_tab_converted_data = t_ampl&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            conversion_failed    = 1&lt;/P&gt;&lt;P&gt;            OTHERS               = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;File upload is not successful&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    MESSAGE e004.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;File upload is successful&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    MESSAGE i005.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note - here 'i_tab_converted_data' can have any number of fields according to your input excel file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aparna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Oct 2008 09:58:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-10T09:58:42Z</dc:date>
    <item>
      <title>Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662876#M1096947</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;PRE&gt;&lt;CODE&gt;data: begin of itab occurs 0,
      f1, f2, f3, f4, f5,
      end of itab.

call function 'GUI_UPLOAD'
  exporting
    filename                      = 'File Path'
   FILETYPE                      = 'ASC'
   HAS_FIELD_SEPARATOR           = 'X'
*   HEADER_LENGTH                 = 0
*   READ_BY_LINE                  = 'X'
*   DAT_MODE                      = ' '
*   CODEPAGE                      = ' '
*   IGNORE_CERR                   = ABAP_TRUE
*   REPLACEMENT                   = '#'
*   CHECK_BOM                     = ' '
*   VIRUS_SCAN_PROFILE            =
*   NO_AUTH_CHECK                 = ' '
* IMPORTING
*   FILELENGTH                    =
*   HEADER                        =
  tables
    data_tab                      = itab
* 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.
endif.

loop at itab.
  write:/ itab-f1,
          itab-f2,
          itab-f3,
          itab-f4,
          itab-f5.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is..,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My excel sheet is having following entries..,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;t	w	w	g	g&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;r	e	d	h	b&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;e	w	f	b	d&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my program giving output as..,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;P&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;P ï ý&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;0.1. / #*&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;î&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ç t&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Þ # é&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;0.1. ç í ® Ì*&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ø&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;â&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;û&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;0.1. u2122 #   u0161*&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Y Ô # #&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;V&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;= #&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;u2020 # Í&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;. $ u2014 § ý&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;What is the problem.?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen.I&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 08:38:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662876#M1096947</guid>
      <dc:creator>naveen_inuganti2</dc:creator>
      <dc:date>2008-10-10T08:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662877#M1096948</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;Use function module ASLM_EXCEL_TO_INTERNAL_TABLE to upload excel to internal table. It uploads data according to row and column. Modify it as per your need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dhanunjaya Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 08:42:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662877#M1096948</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T08:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662878#M1096949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Save Excel as Text (Tab Delimited) file and then use GUI_Upload&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vishal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 08:42:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662878#M1096949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T08:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662879#M1096950</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;&lt;STRONG&gt;filename                      = 'File Path'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;are you passing the right file name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Madhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 08:43:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662879#M1096950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T08:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662880#M1096951</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;Try using this FM TEXT_CONVERT_XLS_TO_SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in  i_tab_raw_data   pass rawdata&lt;/P&gt;&lt;P&gt;&amp;amp; in  i_filename       pass w_filenm(filename of excel thru path)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use FM   CALL FUNCTION 'WS_FILENAME_GET'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      def_filename     = pr_file&lt;/P&gt;&lt;P&gt;      mask             = ',*.xls.'&lt;/P&gt;&lt;P&gt;      mode             = 'O'&lt;/P&gt;&lt;P&gt;      title            = 'Upload File'(i03)&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      filename         = pr_file&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      inv_winsys       = 1&lt;/P&gt;&lt;P&gt;      no_batch         = 2&lt;/P&gt;&lt;P&gt;      selection_cancel = 3&lt;/P&gt;&lt;P&gt;      selection_error  = 4&lt;/P&gt;&lt;P&gt;      OTHERS           = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to get filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_FIELD_SEPERATOR          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_LINE_HEADER              =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      i_tab_raw_data             = rawdata&lt;/P&gt;&lt;P&gt;      i_filename                 = w_filenm&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      i_tab_converted_data       = itab1&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;     conversion_failed          = 1&lt;/P&gt;&lt;P&gt;     OTHERS                     = 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 08:43:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662880#M1096951</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T08:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662881#M1096952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FM GUI_UPLOAD does not works properly for excel sheets.&lt;/P&gt;&lt;P&gt;there are other FM&lt;/P&gt;&lt;P&gt;1. ALSM_EXCEL_TO_INTERNAL_TABLE&lt;/P&gt;&lt;P&gt;2.TEXT_CONVERT_XLS_TO_SAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kumar M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 08:44:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662881#M1096952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T08:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662882#M1096953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;change&lt;/P&gt;&lt;P&gt;FILETYPE                      = 'ASC'&lt;/P&gt;&lt;P&gt;with&lt;/P&gt;&lt;P&gt;FILETYPE                      = 'DAT'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 08:53:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662882#M1096953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T08:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662883#M1096954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naveen ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;copy that same text and give in notepad .txt file .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u declear data as a  lenth  1 and type c .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;copy in ur notepad by giving 1 space between each field or give tab space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and give you file path name correctly  in ur FM .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 08:54:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662883#M1096954</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T08:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662884#M1096955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amit..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I change File type as 'DAT'... Giving error "Wrong value for file type'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Madhu/Vishal..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Here my requirement is to get file from excel type only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Madhan..,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I dont think it will not give error if i pass incorrect file path. Its correct file path, which iam passing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen.I&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 08:56:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662884#M1096955</guid>
      <dc:creator>naveen_inuganti2</dc:creator>
      <dc:date>2008-10-10T08:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662885#M1096956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Danunjay/Mukesh..,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following program is jumping into Dump, let me know if any issues about parameter passing...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
  exporting
    filename                      = 'File Path\File name.xlsx'
    i_begin_col                   = 'A'
    i_begin_row                   = 1
    i_end_col                     = 'E'
    i_end_row                     = 3
  tables
    intern                        = itab
* EXCEPTIONS
*   INCONSISTENT_PARAMETERS       = 1
*   UPLOAD_OLE                    = 2
*   OTHERS                        = 3
          .
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.
endif.


loop at itab.
  write:/ itab-f1,
          itab-f2,
          itab-f3,
          itab-f4,
          itab-f5.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen.I&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 09:04:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662885#M1096956</guid>
      <dc:creator>naveen_inuganti2</dc:creator>
      <dc:date>2008-10-10T09:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662886#M1096957</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;No need of changing it to DAT.&lt;/P&gt;&lt;P&gt;Let it be saved as .xls only..&lt;/P&gt;&lt;P&gt;and try using the FM's as i said earlier..it has worked for me for all BDC's ..it will surely work for u as well..&lt;/P&gt;&lt;P&gt;tell mw if there's any more prob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 09:07:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662886#M1096957</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T09:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662887#M1096958</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 this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA: BEGIN OF itab OCCURS 0.
   INCLUDE STRUCTURE  alsmex_tabline.
 DATA: END OF itab.

PARAMETERS: filename LIKE rlgrap-filename MEMORY ID M01,
            begcol TYPE i DEFAULT 1 NO-DISPLAY,
            begrow TYPE i DEFAULT 1 NO-DISPLAY,
            endcol TYPE i DEFAULT 100 NO-DISPLAY,
            endrow TYPE i DEFAULT 32000 NO-DISPLAY.
 CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
       EXPORTING
            filename                = 'UR Filename'
            i_begin_col             = begcol
            i_begin_row             = begrow
            i_end_col               = endcol
            i_end_row               = endrow
       TABLES
            intern                  = itab
       EXCEPTIONS
            inconsistent_parameters = 1
            upload_ole              = 2
            OTHERS                  = 3.

loop at itab.
  write:/ itab-value.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 09:08:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662887#M1096958</guid>
      <dc:creator>GauthamV</dc:creator>
      <dc:date>2008-10-10T09:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662888#M1096959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example ur filename is a.xls&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the code , very simple&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETER:pr_file LIKE rlgrap-filename OBLIGATORY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR pr_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'WS_FILENAME_GET'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      def_filename     = pr_file&lt;/P&gt;&lt;P&gt;      mask             = ',*.xls.'&lt;/P&gt;&lt;P&gt;      mode             = 'O'&lt;/P&gt;&lt;P&gt;      title            = 'Upload File'(i03)&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      filename         = pr_file&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      inv_winsys       = 1&lt;/P&gt;&lt;P&gt;      no_batch         = 2&lt;/P&gt;&lt;P&gt;      selection_cancel = 3&lt;/P&gt;&lt;P&gt;      selection_error  = 4&lt;/P&gt;&lt;P&gt;      OTHERS           = 5.&lt;/P&gt;&lt;P&gt;&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;  WRITE pr_file TO w_filenm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_FIELD_SEPERATOR          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_LINE_HEADER              =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      i_tab_raw_data             = rawdata&lt;/P&gt;&lt;P&gt;      i_filename                 = w_filenm&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      i_tab_converted_data       = itab1&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;     conversion_failed          = 1&lt;/P&gt;&lt;P&gt;     OTHERS                     = 2&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 09:09:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662888#M1096959</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T09:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662889#M1096960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amit Lyer..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the parameter &lt;STRONG&gt;i_tab_raw_data&lt;/STRONG&gt; in the function module &lt;STRONG&gt;TEXT_CONVERT_XLS_TO_SAP&lt;/STRONG&gt; given by you?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen.I&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 09:10:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662889#M1096960</guid>
      <dc:creator>naveen_inuganti2</dc:creator>
      <dc:date>2008-10-10T09:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662890#M1096961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Its Amit Iyer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;btw ..no parameter for it..just hardcode it as rawdata in the Function module. declare it as&lt;/P&gt;&lt;P&gt; DATA: rawdata(4096) TYPE c OCCURS 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 09:13:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662890#M1096961</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T09:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662891#M1096962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Try the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data   it_dtab  type table of string.
"it_utab your upload file structure

data c_hdrln type i 2. " To skip the header in excel file

    call function 'FAA_FILE_UPLOAD_EXCEL'
      exporting
        i_filename                 = l_filename
*       I_TEST                     =
*       I_UCOMM                    =
*       I_MAXCOLS                  =
        i_delimiter                = ','
      tables
        et_filecontent             = it_dtab
     exceptions
       error_accessing_file       = 1
       others                     = 2
              .

  perform delimit_comma2utab tables it_dtab it_utab
                                 using  c_hdrln.

" Processing the table IT_DTAB( data with comma separation ) " to transfer the data to IT_UTAB

form delimit_comma2utab  tables pt_dtab
                                pt_utab structure wa_utab
                         using  p_hline type i.

  data: l_fld1 type string,
        l_fld2 like l_fld1,
        l_type,
        l_flg  type i,
        l_idx  type i.

  field-symbols: &amp;lt;fs&amp;gt; type any.

  refresh pt_utab.

  clear : wa_dtab, wa_utab,l_flg.

  loop at pt_dtab into wa_dtab.


* Skipping the Header Line of Excel sheet
    if sy-tabix &amp;lt;= p_hline or wa_dtab is initial.
      continue.
    endif.

* Storing the entire line data to local field

    l_fld2 = wa_dtab.

* Here we use Field symbols to store each field of structure wa_utab
* and splitting the data from local field l_fld2 to corresponding field in
* WA_UTAB

    do.

      l_idx = sy-index.

* Reading the Field Name for Utab based on the selection

      read table it_fnam index l_idx into wa_fnam.

      if sy-subrc = 0.

        assign component wa_fnam-name of structure wa_utab to &amp;lt;fs&amp;gt;.

        if sy-subrc = 0.

          find ',' in l_fld2.

          if sy-subrc = 0.

            split l_fld2 at ',' into l_fld1 l_fld2.

            if sy-subrc = 0.

* Catching Excepition while uploading wrong layout eXcel file

              catch system-exceptions  conversion_errors = 4
                                      others = 8.
                &amp;lt;fs&amp;gt; = l_fld1.

              endcatch.

              if sy-subrc &amp;lt;&amp;gt; 0.

                message e021.

              endif.

              unassign &amp;lt;fs&amp;gt;.

            else.

              exit.

            endif.

          else.

* Copying the Last Column of the Row

            if l_fld2 is not initial.

              &amp;lt;fs&amp;gt; = l_fld2.

            endif.

            exit.

          endif.

        else.

          exit.

        endif.

      else.

        exit.

      endif.

    enddo.

    if wa_utab is initial.

      exit.

    endif.

    if wa_utab is not initial." AND l_flg = 2.

      append wa_utab to pt_utab.
      clear  wa_utab.

    endif.

  endloop.

endform.                    " delimit_comma2utab

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Regards*,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Jey&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 09:24:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662891#M1096962</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T09:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662892#M1096963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amit..,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I am defining the rawdata as you said..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: begin of itab occurs 0,
      f1, f2, f3, f4, f5,
      end of itab.
data: rawdata(4096) type c occurs 0.

call function 'TEXT_CONVERT_XLS_TO_SAP'
  exporting
*   I_FIELD_SEPERATOR          =
*   I_LINE_HEADER              =
    i_tab_raw_data             = rawdata
    i_filename                 = &amp;lt;file path&amp;gt;  
  tables
    i_tab_converted_data       = itab
* EXCEPTIONS
*   CONVERSION_FAILED          = 1
*   OTHERS                     = 2
          .
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.
endif.



loop at itab.
  write:/ itab-f1,
          itab-f2,
          itab-f3,
          itab-f4,
          itab-f5.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After excution of this code I am getting following microsoft windows message pop-up...&lt;/P&gt;&lt;P&gt;The file you are trying to open , 'dhfgjgfwqhgfh.tmp', is in a different format than specified by the file extension. verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I give YES. &lt;STRONG&gt;Its giving correct ouput&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Let me know if i can rectify this error with any other coding...&lt;/P&gt;&lt;P&gt;Also let me know why we are passing rawdata here...???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen.I&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 09:26:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662892#M1096963</guid>
      <dc:creator>naveen_inuganti2</dc:creator>
      <dc:date>2008-10-10T09:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662893#M1096964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;'TEXT_CONVERT_XLS_TO_SAP' expects a file extension XLS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'dhfgjgfwqhgfh.tmp' has extension TMP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 09:29:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662893#M1096964</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T09:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662894#M1096965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah Maen..,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My file on desktop &lt;STRONG&gt;Book1.xls&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I am passing the parameter filename as &lt;STRONG&gt;'path\Book1.xls'&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Even then I am getting this issue. Ok I will consult my basis people on this.&lt;/P&gt;&lt;P&gt;Let me know about that RAWDATA variable declaration and.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why &lt;STRONG&gt;ALSM_EXCEL_TO_INTERNAL_TABLE function module is not working&lt;/STRONG&gt; in my case.. where I am doing mistae?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Goutham Chakravarthi.. My Code is similer to your's But still its jumping into dump. Why?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
  exporting
    filename                      = 'File Path\File name.xlsx'
    i_begin_col                   = 'A'
    i_begin_row                   = 1
    i_end_col                     = 'E'
    i_end_row                     = 3
  tables
    intern                        = itab
* EXCEPTIONS
*   INCONSISTENT_PARAMETERS       = 1
*   UPLOAD_OLE                    = 2
*   OTHERS                        = 3
          .
if sy-subrc  0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
 
 
loop at itab.
  write:/ itab-f1,
          itab-f2,
          itab-f3,
          itab-f4,
          itab-f5.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen.I&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 09:37:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662894#M1096965</guid>
      <dc:creator>naveen_inuganti2</dc:creator>
      <dc:date>2008-10-10T09:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Upload file from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662895#M1096966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try Using the below program to get the data from the excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  P_UPLOAD_DATA
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM p_upload_data .
  DATA : gd_scol   TYPE i VALUE '1',
          gd_srow   TYPE i VALUE '2',
          gd_ecol   TYPE i VALUE '5',
          gd_erow   TYPE i VALUE '60000'.

  DATA: it_tab TYPE filetable,
        gd_subrc TYPE i.




  DATA : lt_intern TYPE  kcde_cells OCCURS 0 WITH HEADER LINE.

  DATA : ld_index TYPE i.
  FIELD-SYMBOLS : &amp;lt;fs&amp;gt; .

  CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
    EXPORTING
      filename                = p_path
      i_begin_col             = gd_scol
      i_begin_row             = gd_srow
      i_end_col               = gd_ecol
      i_end_row               = gd_erow
    TABLES
      intern                  = lt_intern
    EXCEPTIONS
      inconsistent_parameters = 1
      upload_ole              = 2
      OTHERS                  = 3.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    FORMAT COLOR COL_BACKGROUND INTENSIFIED.
    WRITE:/ 'Error Uploading file'.
    EXIT.
  ENDIF.

  IF lt_intern[] IS INITIAL.
    FORMAT COLOR COL_BACKGROUND INTENSIFIED.
    WRITE:/ 'No Data Uploaded'.
    EXIT.
  ELSE.
    SORT lt_intern BY row col.
    LOOP AT lt_intern.
      MOVE lt_intern-col TO ld_index.
      ASSIGN COMPONENT ld_index OF STRUCTURE it_final TO &amp;lt;fs&amp;gt;.
      MOVE lt_intern-value TO &amp;lt;fs&amp;gt;.
      AT END OF row.
        APPEND it_final .
        CLEAR  it_final.
      ENDAT.
    ENDLOOP.

  ENDIF.
ENDFORM.                    " P_UPLOAD_DATA

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chidanand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 09:44:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-file-from-excel-sheet/m-p/4662895#M1096966</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T09:44:39Z</dc:date>
    </item>
  </channel>
</rss>

