<?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 excel file in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-file/m-p/2475350#M557150</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;How to upload excel file from Application server into SAP?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Jul 2007 08:01:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-02T08:01:43Z</dc:date>
    <item>
      <title>Upload excel file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-file/m-p/2475350#M557150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;How to upload excel file from Application server into SAP?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 08:01:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-file/m-p/2475350#M557150</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T08:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Upload excel file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-file/m-p/2475351#M557151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi siri,&lt;/P&gt;&lt;P&gt;  You should use 'UPLOAD' function module,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report ZUDAY_BDC_TCL1 no standard page heading line-size 255.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;include bdcrecx1.&lt;/P&gt;&lt;P&gt;TABLES EBAN.&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ITAB OCCURS 0,&lt;/P&gt;&lt;P&gt;      NUMBER(3) TYPE C,&lt;/P&gt;&lt;P&gt;      MATNR LIKE EBAN-MATNR,&lt;/P&gt;&lt;P&gt;      TXZ01 LIKE EBAN-TXZ01,&lt;/P&gt;&lt;P&gt;      MENGE(13) TYPE C,&lt;/P&gt;&lt;P&gt;      MEINS LIKE EBAN-MEINS,&lt;/P&gt;&lt;P&gt;      EEIND TYPE RM06B-EEIND,&lt;/P&gt;&lt;P&gt;      EKGRP LIKE EBAN-EKGRP,&lt;/P&gt;&lt;P&gt;      MATKL LIKE EBAN-MATKL,&lt;/P&gt;&lt;P&gt;      WERKS(4) TYPE C,&lt;/P&gt;&lt;P&gt;      END OF ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: LVALUE TYPE I,&lt;/P&gt;&lt;P&gt;      COUNT TYPE I,&lt;/P&gt;&lt;P&gt;      TEMP(20) TYPE C,&lt;/P&gt;&lt;P&gt;      CTRL TYPE I,&lt;/P&gt;&lt;P&gt;      CTRL1(3) TYPE C,&lt;/P&gt;&lt;P&gt;      PAGES(5) TYPE c VALUE '10',&lt;/P&gt;&lt;P&gt;      PVALUE(3) TYPE C VALUE 0.&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;&lt;/P&gt;&lt;P&gt;PERFORM GETDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT ITAB BY NUMBER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform open_group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;    IF ITAB-NUMBER &amp;lt;&amp;gt; LVALUE.&lt;/P&gt;&lt;P&gt;     COUNT = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT ITAB WHERE NUMBER = ITAB-NUMBER.&lt;/P&gt;&lt;P&gt;       COUNT = COUNT + 1.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPMM06B' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'EBAN-BSART'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'EBAN-BSART'&lt;/P&gt;&lt;P&gt;                              'NB'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RM06B-LPEIN'&lt;/P&gt;&lt;P&gt;                              'T'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'EBAN-EKGRP'&lt;/P&gt;&lt;P&gt;                              '008'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPMM06B' '0106'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                              'EBAN-MATNR(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;    PAGES = 10.&lt;/P&gt;&lt;P&gt;    CTRL = 0.&lt;/P&gt;&lt;P&gt;    DO COUNT TIMES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       CTRL = CTRL + 1.&lt;/P&gt;&lt;P&gt;       IF CTRL &amp;gt;= 19.&lt;/P&gt;&lt;P&gt;         PAGES = PAGES + 10.&lt;/P&gt;&lt;P&gt;       ENDIF.&lt;/P&gt;&lt;P&gt;       CTRL1 = CTRL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       IF CTRL &amp;gt;= 19.&lt;/P&gt;&lt;P&gt;         CTRL1 = '19'.&lt;/P&gt;&lt;P&gt;       ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       IF CTRL &amp;gt;= 10.&lt;/P&gt;&lt;P&gt;          PVALUE = ''.&lt;/P&gt;&lt;P&gt;       ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; perform bdc_field       using 'RM06B-BNFPO'&lt;/P&gt;&lt;P&gt;                                PAGES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Concatenate  'EBAN-MATNR(' PVALUE  CTRL1 ')' into Temp.&lt;/P&gt;&lt;P&gt; CONDENSE Temp NO-GAPS.&lt;/P&gt;&lt;P&gt; perform bdc_field    using Temp itab-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Concatenate  'EBAN-TXZ01(' PVALUE  CTRL1 ')' into Temp.&lt;/P&gt;&lt;P&gt; CONDENSE Temp NO-GAPS.&lt;/P&gt;&lt;P&gt; perform bdc_field    using Temp itab-TXZ01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Concatenate  'EBAN-MENGE(' PVALUE  CTRL1 ')' into Temp.&lt;/P&gt;&lt;P&gt; CONDENSE Temp NO-GAPS.&lt;/P&gt;&lt;P&gt; perform bdc_field    using Temp itab-MENGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Concatenate  'EBAN-MEINS(' PVALUE  CTRL1 ')' into Temp.&lt;/P&gt;&lt;P&gt; CONDENSE Temp NO-GAPS.&lt;/P&gt;&lt;P&gt; perform bdc_field    using Temp itab-MEINS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Concatenate  'RM06B-EEIND(' PVALUE  CTRL1 ')' into Temp.&lt;/P&gt;&lt;P&gt; CONDENSE Temp NO-GAPS.&lt;/P&gt;&lt;P&gt; perform bdc_field    using Temp itab-EEIND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Concatenate  'EBAN-EKGRP(' PVALUE  CTRL1 ')' into Temp.&lt;/P&gt;&lt;P&gt; CONDENSE Temp NO-GAPS.&lt;/P&gt;&lt;P&gt; perform bdc_field    using Temp itab-EKGRP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Concatenate  'EBAN-MATKL(' PVALUE  CTRL1 ')' into Temp.&lt;/P&gt;&lt;P&gt; CONDENSE Temp NO-GAPS.&lt;/P&gt;&lt;P&gt; perform bdc_field    using Temp itab-MATKL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Concatenate  'EBAN-WERKS(' PVALUE  CTRL1 ')' into Temp.&lt;/P&gt;&lt;P&gt; CONDENSE Temp NO-GAPS.&lt;/P&gt;&lt;P&gt; perform bdc_field    using Temp itab-WERKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPMM06B' '0102'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'EBAN-MENGE'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'EBAN-TXZ01'&lt;/P&gt;&lt;P&gt;                              ITAB-TXZ01. "'HD GLAD BOY tank silver'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'EBAN-MENGE'&lt;/P&gt;&lt;P&gt;                              ITAB-MENGE. "'500'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RM06B-EEIND'&lt;/P&gt;&lt;P&gt;                              ITAB-EEIND."'27.06.2007'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'EBAN-EKGRP'&lt;/P&gt;&lt;P&gt;                              ITAB-EKGRP. "'001'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'EBAN-BADAT'&lt;/P&gt;&lt;P&gt;                              '15.06.2007'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'EBAN-FRGDT'&lt;/P&gt;&lt;P&gt;                              '26.06.2007'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'EBAN-PREIS'&lt;/P&gt;&lt;P&gt;                              '         55.48'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'EBAN-WAERS'&lt;/P&gt;&lt;P&gt;                              'GBP'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'EBAN-PEINH'&lt;/P&gt;&lt;P&gt;                              '1'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'EBAN-REPOS'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPMM06B' '0106'.&lt;/P&gt;&lt;P&gt;Concatenate  'EBAN-MATNR(' PVALUE  CTRL1 ')' into Temp.&lt;/P&gt;&lt;P&gt; CONDENSE Temp NO-GAPS.&lt;/P&gt;&lt;P&gt;perform bdc_field    using 'BDC_CURSOR' Temp.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                                      '/00'.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LVALUE = ITAB-NUMBER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPMM06B' '0106'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'RM06B-BNFPO'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=BU'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RM06B-BNFPO'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                              '80'.&lt;/P&gt;&lt;P&gt;*AT END OF NUMBER.&lt;/P&gt;&lt;P&gt;perform bdc_transaction using 'ME51'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFRESH BDCDATA.&lt;/P&gt;&lt;P&gt;*ENDAT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform close_group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  GETDATA&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&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;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&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; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM GETDATA .&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'UPLOAD'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   FILENAME                      = ' '&lt;/P&gt;&lt;P&gt;   FILETYPE                      = ' '&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;   CONVERSION_ERROR              = 1&lt;/P&gt;&lt;P&gt;   INVALID_TABLE_WIDTH           = 2&lt;/P&gt;&lt;P&gt;   INVALID_TYPE                  = 3&lt;/P&gt;&lt;P&gt;   NO_BATCH                      = 4&lt;/P&gt;&lt;P&gt;   UNKNOWN_ERROR                 = 5&lt;/P&gt;&lt;P&gt;   GUI_REFUSE_FILETRANSFER       = 6&lt;/P&gt;&lt;P&gt;   OTHERS                        = 7&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;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " GETDATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF USEFULL REWARD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 08:03:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-file/m-p/2475351#M557151</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T08:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Upload excel file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-file/m-p/2475352#M557152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Here is the Sample Program to Uplaod from Application Server to SAP, This program will upload TAB delimited file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZUPLOADTAB                                                  *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Example of Uploading tab delimited file                             *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
REPORT  zuploadtab                    .

PARAMETERS: p_infile  LIKE rlgrap-filename
                        OBLIGATORY DEFAULT  '/usr/sap/'..

DATA: ld_file LIKE rlgrap-filename.

*Internal tabe to store upload data
TYPES: BEGIN OF t_record,
    name1 like pa0002-VORNA,
    name2 like pa0002-name2,
    age   type i,
    END OF t_record.
DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
      wa_record TYPE t_record.

*Text version of data table
TYPES: begin of t_uploadtxt,
  name1(10) type c,
  name2(15) type c,
  age(5)  type c,
 end of t_uploadtxt.
DATA: wa_uploadtxt TYPE t_uploadtxt.

*String value to data in initially.
DATA: wa_string(255) type c.

constants: con_tab TYPE x VALUE '09'.

*If you have Unicode check active in program attributes then you will
*need to declare constants as follows:

*class cl_abap_char_utilities definition load.
*constants:
*    con_tab  type c value cl_abap_char_utilities=&amp;gt;HORIZONTAL_TAB.



************************************************************************
*START-OF-SELECTION
START-OF-SELECTION.
ld_file = p_infile.
OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
ELSE.
  DO.
    CLEAR: wa_string, wa_uploadtxt.
    READ DATASET ld_file INTO wa_string.
    IF sy-subrc NE 0.
      EXIT.
    ELSE.
      SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
                                      wa_uploadtxt-name2
                                      wa_uploadtxt-age.
      MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.
      APPEND wa_upload TO it_record.
    ENDIF.
  ENDDO.
  CLOSE DATASET ld_file.
ENDIF.


************************************************************************
*END-OF-SELECTION
END-OF-SELECTION.
*!! Text data is now contained within the internal table IT_RECORD

* Display report data for illustration purposes
  loop at it_record into wa_record.
    write:/     sy-vline,
           (10) wa_record-name1, sy-vline,
           (10) wa_record-name2, sy-vline,
           (10) wa_record-age, sy-vline.
  endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 08:07:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-file/m-p/2475352#M557152</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T08:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: Upload excel file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-file/m-p/2475353#M557153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check  the following FM:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;--------------------------------------------------------------------*
*&amp;amp;      Form  UPLOAD_EXCEL_FILE
*&amp;amp;--------------------------------------------------------------------*
*       upload excel spreadsheet into internal table
*---------------------------------------------------------------------*
*      --&amp;gt;P_TABLE    Table to return excel data into
*      --&amp;gt;P_FILE     file name and path
*---------------------------------------------------------------------*
FORM upload_excel_file TABLES   p_table
                       USING    p_file.

  DATA: temp             TYPE truxs_t_text_data,
        t_data           TYPE TABLE OF string.

  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
*   I_FIELD_SEPERATOR          =
*   I_LINE_HEADER              =
      i_tab_raw_data             = temp
      i_filename                 = p_file
    TABLES
      i_tab_converted_data       = p_table
   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.

ENDFORM.                    "UPLOAD_EXCEL&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;Erwan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 08:08:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-file/m-p/2475353#M557153</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T08:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Upload excel file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-file/m-p/2475354#M557154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Siri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/file/file_uploadsap.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/file/file_uploadsap.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/file/file_uptabsap.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/file/file_uptabsap.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 08:15:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-file/m-p/2475354#M557154</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T08:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Upload excel file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-file/m-p/2475355#M557155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sudheer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ur code is so helpful.&lt;/P&gt;&lt;P&gt;But have one doubt, here we are opening file in text mode...bt my file is in excel format...then also the following code works?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to add some more logic while doing changes into the dtable:&lt;/P&gt;&lt;P&gt;"If the same record is existing in dbase table, the i have to modify the record &amp;amp;&lt;/P&gt;&lt;P&gt;If not i have to insert the record.."&lt;/P&gt;&lt;P&gt;Is the above code is included in loop?/ before close dataset?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;siri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 09:48:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-file/m-p/2475355#M557155</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T09:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Upload excel file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-file/m-p/2475356#M557156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI santhosh,&lt;/P&gt;&lt;P&gt;Here the opening file in text mode...bt my file is in excel format...then also can i use the following code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to add some more logic while doing changes into the dtable:&lt;/P&gt;&lt;P&gt;"If the same record is existing in dbase table, the i have to modify the record &amp;amp;&lt;/P&gt;&lt;P&gt;If not i have to insert the record.."&lt;/P&gt;&lt;P&gt;Is the above code is included in loop?/ before close dataset?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 10:40:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-file/m-p/2475356#M557156</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T10:40:30Z</dc:date>
    </item>
  </channel>
</rss>

