FM to Upload EXCEL in SRM

Hello friends,
Are there any FM to Upload Excl files in SRM.
I have checked some of the R/3 FM  but dosent exist,
Ster

Hi,
You can use the FM "GUI_UPLOAD".
BR,
Disha.

Similar Messages

  • Uploading Excel file in SRM

    Hello,
    I need to upload excel file in SRM system.
    FM ALSM_EXCEL_TO_INTERNAL_TABLE & TEXT_CONVERT_XLS_TO_SAP are not available in this system.
    i am able to upload text file (.txt) using following code
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
    PROGRAM_NAME        = SYST-REPID
    * DYNPRO_NUMBER       = SYST-DYNNR
    *   FIELD_NAME          = 'P_FILE'
    STATIC              = 'X'
    MASK                = '.excel , *.xls '
      CHANGING
    file_name           = p_file
    EXCEPTIONS   MASK_TOO_LONG       = 1
    OTHERS              = 2          .
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO*
    *       WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ld_file = p_file.
      CALL METHOD cl_gui_frontend_services=>gui_upload
      EXPORTING
        filename = ld_file
    *    filetype = 'ASC'
    *    filetype = 'BIN'
        filetype = 'DAT'
        HAS_FIELD_SEPARATOR           = 'X'
      CHANGING
        data_tab = itab[]
      EXCEPTIONS
        OTHERS   = 1.
    tried with filetype = ASC ,  BIN  & DAT  - All r allowing .txt file only.
    Please tell me which parameters do i need to provide in order to upload excel file
    thanks & regrads,

    Hello,
    This is a simple example program to get data from an excel file and store it in an internal table.
    Try it in this way.
    REPORT  zexcel_to_itab.
    TYPE-POOLS: truxs.
    PARAMETERS: p_file TYPE  rlgrap-filename.
    TYPES: BEGIN OF t_datatab,
          col1(30)    TYPE c,
          col2(30)    TYPE c,
          col3(30)    TYPE c,
          END OF t_datatab.
    DATA: it_datatab type standard table of t_datatab,
          wa_datatab type t_datatab.
    DATA: it_raw TYPE truxs_t_text_data.
    * At selection screen
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          field_name = 'P_FILE'
        IMPORTING
          file_name  = p_file.
    *START-OF-SELECTION.
    START-OF-SELECTION.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
    *     I_FIELD_SEPERATOR        =
          i_line_header            =  'X'
          i_tab_raw_data           =  it_raw       " WORK TABLE
          i_filename               =  p_file
        TABLES
          i_tab_converted_data     = it_datatab[]    "ACTUAL DATA
       EXCEPTIONS
          conversion_failed        = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    * END-OF-SELECTION.
    END-OF-SELECTION.
      LOOP AT it_datatab INTO wa_datatab.
        WRITE:/ wa_datatab-col1,
                wa_datatab-col2,
                wa_datatab-col3.
      ENDLOOP.

  • How to Upload Excel sheet in DB or internal table using SAP NetWeaver ABAP

    Dear All experts,
    Pls provide guidance  to Upload Excel sheet in DB or internal table using ABAP in  ( SAP NetWeaver stack  )
    Regards
    Machindra
    Edited by: Machindra Patade on Apr 8, 2010 3:07 PM

    Please search before posting.
    Thread locked.
    Thomas

  • How to upload Excel data in Ztables fastly & easily.

    Dear ALL,
    I  want to compare material codes in 2 different excel sheets.
    I have downloaded output from 2 different SQVI into 2 different excel sheets.
    Now I want to compare these 2 sheets to get matching codes or unmatching codes.
    I can use VLOOKUP in excel also. But How can I make use of ABAP by downloading these excel data in 2 different Ztables and compare these 2 tables with some user defined TC (transaction code) ?
    For this activity How to upload Excel data(2 sheets) in 2 Ztables fastly & easily ?
    Is there any method other than SCAT , BDC and LSMW  ???
    Or which is best method in above ?
    Pl' reply.
    Thanks.

    Have a look at the program
    *: Description                                                :
    *: This is a simple example program to get data from an excel :
    *: file and store it in an internal table.                    :
    *: Author : www.sapdev.co.uk, based on code from Jayanta      :
    *: SAP Version : 4.7                                          :
    REPORT  zupload_excel_to_itab.
    TYPE-POOLS: truxs.
    PARAMETERS: p_file TYPE  rlgrap-filename.
    TYPES: BEGIN OF t_datatab,
          col1(30)    TYPE c,
          col2(30)    TYPE c,
          col3(30)    TYPE c,
          END OF t_datatab.
    DATA: it_datatab type standard table of t_datatab,
          wa_datatab type t_datatab.
    DATA: it_raw TYPE truxs_t_text_data.
    At selection screen
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          field_name = 'P_FILE'
        IMPORTING
          file_name  = p_file.
    *START-OF-SELECTION.
    START-OF-SELECTION.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
        I_FIELD_SEPERATOR        =
          i_line_header            =  'X'
          i_tab_raw_data           =  it_raw       " WORK TABLE
          i_filename               =  p_file
        TABLES
          i_tab_converted_data     = it_datatab[]    "ACTUAL DATA
       EXCEPTIONS
          conversion_failed        = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    END-OF-SELECTION.
    END-OF-SELECTION.
      LOOP AT it_datatab INTO wa_datatab.
        WRITE:/ wa_datatab-col1,
                wa_datatab-col2,
                wa_datatab-col3.
      ENDLOOP.
    Message was edited by:
            K N  REDDY

  • How to upload Excel file in BI using function module in abap program

    How to upload Excel file in BI using function module in abap program?

    Hi Anuj,
    To upload the file , you can try a standard program "RSEPSFTP" .
    while you execute the program , a selection screen appears in which the inputs should be give as
    RFC destination - The target server name
    FTP command- PUT
    local file - your file name
    local directory - path of your local file
    remote file - your target file name
    remote directory - where it has to be stored
    Hope this is useful for you
    Thanks & regards
    Anju

  • Upload Excel sheet using Data Integrator 6.1?

    hi all ,
    Upload Excel sheet using Data Integrator? and how to create ODBC for the PC and jobserver i am using version 6.1? i am using excel as my one of the data source and tell me how to use different types of data sources in DI . after uploading the xl file if i apply any transform on the excel data i will give error like
    Posted: 25 Sep 2008 04:30
    Post subject: Re: Upload Excel sheet using Data Integrator? 
    I am getting the error like
    3128 292 CON-120302 09-25-08 09:59:40 ODBC call <SQLDriverConnect> for data source <sas> failed: <[Microsoft][ODBC Driver Manager] Data source name not found and no
    3128 292 CON-120302 09-25-08 09:59:40 default driver specified>. Notify Customer Support.
    1512 2992 CON-120302 09-25-08 09:59:41 ODBC call <SQLDriverConnect> for data source <sas> failed: <[Microsoft][ODBC Driver Manager] Data source name not found and no
    1512 2992 CON-120302 09-25-08 09:59:41 default driver specified>. Notify Customer Support.
    Please help me out
    Thank u

    Hi Shonti,
    The DI 11.7 installer can be used to upgrade a DI 6.1 local repository (e.g. the upgrade is supported).  This will migrate all jobs and flows.  They will remain intact, however, this is always a major migration effort and should not be taken lightly.  If you do upgrade, please make sure this is a planned effort with rigorous testing and validation.  You should also ensure that you consult the release notes and [supported platforms documentation|https://websmp110.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000712240&_SCENARIO=01100035870000000202] for the 11.7 package you intend to install.  The DI 11.7 documentation also contains info about how to install and configure the Excel Adapter, and what functionality it provides.
    Thanks,
    ~Scott

  • SharePoint 2013 Foundation error when uploading Excel files

    Hello 
    I have a specific problem. I have an xlsx file that I cannot upload in SharePoint. Normally our SharePoint can upload Excel files and other file formats normally but this one has data with nearly 5000 rows. The size of the file is less then 500 KB. The error
    message is: "The URL is invalid. Perhaps it refers to a nonexistent file or folder, or it refers to a valid file or folder in the current Web." When I am uploading this file I am getting the same error message in every library. When I save
    the file as a 97-2003 compatible xls then it works. Sometimes even Excel files with Macros won't upload. 
    Kind regards
    ivicapro1987

    Hi,
    This issue occurs when the Version column is configured as an Indexed Column. 
    To work around this issue, remove the Version column from the list of Indexed Columns for the list that has this issue. To do this, follow these steps:
    Browse to the list where the issue exists.
    In the ribbon, click the Library tab, and then click
    Library Settings.
    In the fields list, click Indexed Columns.
    In the Indexed Columns list, click Version.
    Click Delete, and then click OK.
    Upload any files that you previously experienced the issue with.
    Reference:
    https://support.microsoft.com/kb/2796640?wa=wsignin1.0
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Upload Excel File from Portal (R/3 working fine)

    Hi Experts!!
    We have a report in which we are uploading an excel file from presentation server into an itab. When F4 clicked for file path, browser will open for choosing the path. Now, we have created an iView in Portal for this t-code. However, F4 is not working from Portal, rather giving an error 'Please wait. You will be forwarded automatically. This page had to be included for technical reasons.'.
    We need to upload excel file even from Portal too. Can somebody please give me some inputs or suggestions?

    Hi Jigar,
    Now I am able to get into SAP screen. However it's not opening the t-code that I mentioned. I gave some Z t-code ZTEST. Once I check the iView, it is showing SAP screen with the below things:
    Service Type:
    Service ID:
    TCode: ZTEST
    Object Type:
    Key:
    Field 1:
    Val. 1:
    Field 2:
    Val.2:
    Field 3:
    Val 3:
    And at the bottom it's giivng a warning message:
    Object type or object does not exist
    Message no. 1W001
    In iView properties I can see Object Type as com.sapportals.portal.iview. Is this the same Object Type that the message is talkign about? Can you please help me out?

  • How to upload excel file in Webdynpro application using ABAP

    Hi Experts,
    Am developing a webdynpro application in which it will take an excel file as input and display the contents in the form of a table in output. I am able to upload tab delimited text file and populate the table using the below code but not able to do the same with .xls file. Pls let me know if I need to use a different function module for upload excel file.
    get single attribute
      wd_context->get_attribute(
        EXPORTING
          name =  `DATASOURCE`
        IMPORTING
          value = l_xstring ).
      CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
        EXPORTING
          in_xstring = l_xstring
        IMPORTING
          out_string = l_string.
      SPLIT l_string  AT cl_abap_char_utilities=>newline INTO TABLE i_data.
    Bind With table Element.
      LOOP AT i_data INTO l_string.
        SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields.
        READ TABLE fields INTO lv_field INDEX 1.
        fs_table-name = lv_field.
        READ TABLE fields INTO lv_field INDEX 2.
        fs_table-age = lv_field.
        APPEND fs_table TO t_table1.
      ENDLOOP.
    lo_nd_data = wd_context->get_child_node( 'DATA_TAB' ).
    lo_nd_data->bind_table( T_TABLE1 ).
    Thanks,
    Subathra

    Dear Exports
    Can anyone guide me how to uplode the .xlsx or ..xls formatted excel file using abap webdynpro without converting it to .txt file. Because my client requirement is only to upload the excel file. because to convert the .xlsx flie to .txt file it will be time taking and cost expanssive. Another requirement is suppose today i have create a application for uploading a file which has 8 columns and 10 rows. suppose tomorrow the client will make some changes in that flat file means the client will add 2 extra columns and 10 more columns in that fil. and will upload that file. Then the new file will be display on the browser or old file. but my requirement is to display the new file in browser.
    Can anyone kindly help to solve my problem. I am completely fresher in this field and I need to do it as soon as possible. Please help to solve the problem. 
    Regards
    Rashmita

  • Error message while upload excel file (with macro) to sap (iw28)

    While upload excel file to sap through iw28, i get error message (vb)
    u2022     i have to say that the excel file contain macro , with out the macro , work fine .
    u2022     The error display just in refresh command.
    the error message :
    Public Sub ALV_CUS_Exit()
    Dim objs As ChartObjects
    Dim obj As ChartObject
    Dim sheet As Worksheet
    Dim r As Range
    For Each sheet In Sheets
    Set objs = sheet.ChartObjects
    For Each obj In objs
    Set r = Sheets("RawData").UsedRange
    obj.Chart.SetSourceData Source:=r
    Next obj
    Next sheet
    End Sub

    hi,
    This is releated to the ABAP coding...There might be some ouput problem in the Abap list viewer...Pls check it with the ABAP consultant...
    Regards
    Priyanka.P

  • Upload excel file in SAP BI-7.0

    Hi ,
    i  need to  upload an excel  file in SAP BI 7.0 where the standard r/3 fm are not available.
    Currently we uploading a file in CSV format but now we want to upload using XLS also.
    ia way to upload excel  file in SAP BI 7.0
    Best Regards,
    Sharad
    Edited by: sharad narayan on Jan 7, 2011 10:58 AM
    while searching the forum i  found the fm MS_EXCEL_OLE_STANDARD_DAT .
    but while using this FM i  am getting the exception file not exist.
    Kindlu  suggest what  to  do
    i  even tried the FM TMP_GUI_GET_FILE_EXIST' to  check  the existence of the file.
    even then same problem.
    Please suggest
    Edited by: sharad narayan on Jan 10, 2011 2:51 PM

    Hi,
    Scheduled jobs are the jobs for which we have scheduled for a time, may be daily so that each day the scheduled jobs will trigger at the time given.So that every time u need not to trigger the job manully urself as the schedule time will hit the job will trigger itself.
    Released job means the job which is in between Sheduled state and active state.say For eg: 10 jobs are Scheduled in a queue Job no 1 is released from the queue that means any moment it will be in active state.So it is the state between Schedule and Active state of a job.
    Thanks
    Varun

  • Uploading Excel to Internal Table

    Hi,
      Can anyone please look into the code and suggest me the changes in uploading Excel to Internal Table. Code is as below in OnInputProcessing.
    DATA: event TYPE REF TO CL_HTMLB_EVENT.
    event =
    CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
    DATA: fileUpload TYPE REF TO CL_HTMLB_FILEUPLOAD,
           fcontent type xstring,
           fstring  type string,
                  len TYPE I.
    fileUpload ?= CL_HTMLB_MANAGER=>GET_DATA(
    request = runtime->server->request
    name = 'fileUpload'
    id = 'myFileUpload1').
    len = fileUpload->file_length.
    IF event->id = 'submitButton' AND
        event->event_type = 'click'.
       fileUpload ?=
    CL_HTMLB_MANAGER=>GET_DATA( request = request
                               id = 'myFileUpload1'
                               name = 'fileUpload' ).
       IF ( fileUpload->file_name NE '' ) AND
       ( fileUpload->file_length GT 0 ).
         IF fileUpload->file_content_type
         = 'application/vnd.ms-excel'.
           DATA: content TYPE ZTABLE,
           conv TYPE REF TO CL_ABAP_CONV_IN_CE,
           viewoff TYPE REF TO CL_ABAP_VIEW_OFFLEN,
           it_off TYPE ABAPOFFLENTAB,
           wa_off TYPE ABAPOFFLEN,
           dd_fields TYPE DDFIELDS,
           wa_fields TYPE DFIES.
    data: codepage type CPCODEPAGE.
    CALL FUNCTION 'SCP_CODEPAGE_BY_EXTERNAL_NAME'
    EXPORTING
    external_name       = 'utf-16le'
      KIND                = 'H'
      IMPORTING
      SAP_CODEPAGE        = codepage.
    conv = CL_ABAP_CONV_IN_CE=>CREATE( encoding = '4103'
    endian = 'L'
    input =   fileUpload->file_content
    ignore_cerr = 'X').
           CALL FUNCTION 'TR_NAMETAB_GET'
             EXPORTING
               IV_TABNAME                 = 'ZTABLE'
               IV_GET_LENGTHS_IN_CHARMODE = 'X'
               IV_GET_TEXTS               = ' '
             IMPORTING
               ET_DFIES                   = dd_fields.
            LOOP AT dd_fields INTO wa_fields.
             MOVE wa_fields-offset TO wa_off-ioff.
             MOVE wa_fields-intlen TO wa_off-ilen.
             APPEND wa_off TO it_off.
            ENDLOOP.
           viewoff = CL_ABAP_VIEW_OFFLEN=>CREATE( tab = it_off ).
            call method conv->read( importing data = fstring ).
           fcontent = conv->get_buffer( ).
           call function 'HR_KR_XSTRING_TO_STRING'
               exporting
                   from_codepage = '4103'
                   in_xstring    = fcontent
              importing
                   out_string    = fstring.
          data: input_string type string.
          data: fields  type string_table.
          data: s_table type string_table.
    split fstring at cl_abap_char_utilities=>cr_lf into table s_table.
    field-symbols: <wa_table> like line of s_table.
    loop at s_table assigning <wa_table>.
      split <wa_table> at cl_abap_char_utilities=>HORIZONTAL_TAB into table
    fields.
    endloop.
      endif.
      endif.
      endif.
    thanks in advance,
    anjani.

    Hi anjani,
    it doesn't help much if you just post some code and request changes, if you don't state the kind of problem you are having ... in order to receice helpful replies, you have to give detailed information, what you want to do, what is not working as expected ... so please post more details.
    Meanwhile I recommend doing a search for your excel problem in the forum and also read the excel weblogs from <a href="https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/pub/u/1918">Thomas Jung</a>.
    Regards,
    Max

  • Uploading Excel file  using 'ALSM_EXCEL_TO_INTERNAL_TABLE'

    Hi,
    I am uploading excel file into an internal table using 'ALSM_EXCEL_TO_INTERNAL_TABLE' FM.
    but I'm getting a popup with the message
    'There is a large amount of the information on the clipboard. Do you want to be able to paste this information into another programme later.' and there are three buttons in the popup 'YES', 'CANCEL' and 'NO'. but for any choice there is no data in the internal table. 
    the progrsm is working in other systems but giving problem in customer laptop, can you please tell me is there any settings need to set for EXCEL or SAP.
    system details are as below
    OS: windows 7
    MS-Office - 2007
    SAP : ECC06

    Looks like there was an intention to clear the clipboard in the code, but this does not seem to work.
    I copied the function module to my own version and added the following code, which seems to work :
    * clear clipboard
      refresh excel_tab.
      call method cl_gui_frontend_services=>clipboard_export
         importing
            data                 = excel_tab
         changing
            rc                   = ld_rc
         exceptions
            cntl_error           = 1
    *       ERROR_NO_GUI         = 2
    *       NOT_SUPPORTED_BY_GUI = 3
            others               = 4
    * Copy only one cell to prevent the clipboard data message.
      call method of worksheet 'Cells' = h_cell
          exporting #1 = 1 #2 = 1.
      m_message.
      call method of worksheet 'Cells' = h_cell1
          exporting #1 = 1 #2 = 1.
      m_message.
      call method  of worksheet 'RANGE' = range
                     exporting #1 = h_cell #2 = h_cell1.
      m_message.
      call method of range 'SELECT'.
      m_message.
    * copy marked area (whole spread sheet) into Clippboard
      call method of range 'COPY'.
      m_message.
    * quit Excel and free ABAP Object - unfortunately, this does not kill
    * the Excel process
      call method of application 'QUIT'.
      m_message.

  • Uploading Excel file to SAP

    Hi Friends,
    Iam trying to Upload Excel file into SAP using the FM
    ALSM_EXCEL_TO_INTERNAL_TABLE. But it is going to dump n the error is                                                                             
    The call to the function module "ALSM_EXCEL_TO_INTERNAL_TABLE" is incorrect:                                                                               
    In the function module interface, you can specify only                          
    fields of a specific type and length under "INTERN".                            
    Although the currently specified field                                          
    "ITAB" is the correct type, its length is incorrect.                            
    I have attached the code also.
    Please let me know where iam getting the error.
    Code :
    Tables : mara,
             ztable.
    parameters : p_infile like rlgrap-filename.
    data : begin of itab occurs 0,
           matnr like mara-matnr,
           mbrsh like mara-mbrsh,
           matkl like mara-matkl,
           end of itab.
           CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
             EXPORTING
               FILENAME                      = p_infile
               I_BEGIN_COL                   = 1
               I_BEGIN_ROW                   = 1
               I_END_COL                     = 100
               I_END_ROW                     = 100
             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.
    sort itab by matnr.
    loop at itab.
    write:/ itab.
    *modify ztable from table itab.
    endloop.

    hi check this code:
    DATA : BEGIN OF TYP_INPUT ,
               MATNR LIKE MARA-MATNR,
               WERKS LIKE MARC-WERKS,
               LGORT LIKE MARD-LGORT,
               LGNUM LIKE MLGN-LGNUM,
               LGTYP LIKE MLGT-LGTYP,
               LTKZA LIKE MLGN-LTKZA,
               LTKZE LIKE MLGN-LTKZE,
               LGBKZ LIKE MLGN-LGBKZ,
               LGPLA LIKE MLGT-LGPLA,
            END OF TYP_INPUT.
    *Input File Data
    DATA : IT_FILE LIKE TYP_INPUT OCCURS 0 WITH HEADER LINE.
    *"INTERNAL TAB TO TAKE EXCEL SHEET.
    DATA : IT_EXCEL    LIKE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
           CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
            EXPORTING
                 FILENAME                = P_PFILE
                 I_BEGIN_COL             = 1
                 I_BEGIN_ROW             = 2
                 I_END_COL               = 9
                 I_END_ROW               = 6000
            TABLES
                 INTERN                  = IT_EXCEL
            EXCEPTIONS
                 INCONSISTENT_PARAMETERS = 1
                 UPLOAD_OLE              = 2
                 OTHERS                  = 3.
    * IT_EXCEL CONTAINS DATA IN THE FORM OF ROW, COL, VALUE       *
    * CONVERTING THAT INTERNAL TABLE TO FORMAT THAT OF EXCEL SHEET *
       IF NOT IT_EXCEL[] IS INITIAL.
         SORT IT_EXCEL BY ROW COL.
         LOOP AT IT_EXCEL.
           CASE IT_EXCEL-COL.
            WHEN 1.
                  IT_FILE-MATNR = IT_EXCEL-VALUE.
            WHEN 2.
                  IT_FILE-WERKS = IT_EXCEL-VALUE.
            WHEN 3.
                  IT_FILE-LGORT = IT_EXCEL-VALUE.
            WHEN 4.
                  IT_FILE-LGNUM = IT_EXCEL-VALUE.
            WHEN 5.
                  IT_FILE-LGTYP = IT_EXCEL-VALUE.
            WHEN 6.
                  IT_FILE-LTKZA = IT_EXCEL-VALUE.
            WHEN 7.
                  IT_FILE-LTKZE = IT_EXCEL-VALUE.
            WHEN 8.
                  IT_FILE-LGBKZ = IT_EXCEL-VALUE.
            WHEN 9.
                  IT_FILE-LGPLA = IT_EXCEL-VALUE.
           ENDCASE.
           AT END OF ROW.
             APPEND IT_FILE.
             CLEAR IT_FILE.
           ENDAT.
         ENDLOOP.
       ELSE.
         MESSAGE I000  WITH 'The input file is empty'.
         STOP.
       ENDIF.

  • Upload excel sheet data through sqlloader into oracle tables

    hi everyone,
    i am working with excel sheet with following records
    8501      Jacob Marshall      15000      21/10/2009      Finance
    8502      Chris Campell      50000      13/06/2008      R&D
    8503      Simon Dough      50000      3/07/2008      Engineering
    8504      Mark Haggai      75000      9/3/2006      Product Management
    8505      Verica Beverley      45000      7/2/2008      HR
    and i saved it in emp_details.csv
    after that when i write following code to make control file
    load data
    infile 'C:\Documents and Settings\prashant_dabral\Desktop\a.txt'
    into table tmp
    field terminated by','optionally enclosed by" "
    (emp_no,emp_name,salary,doj,dept_name)
    after this pl\sqldev returning me error message that ORA-00900:invalid sql statement
    can anybody tell me how to resolve issue
    or
    another method to Upload excel sheet data through sqlloader into oracle tables

    A control file is a file located on the operating system, not some SQL or PL/SQL code you try and execute.
    Create the control file as a file and then use that to load your data with SQL*Loader from the command line.
    http://www.morganslibrary.org/reference/sqlloader.html
    Or better still, create it as an external table and then you don't need a seperate control file or need to use sql loader from the command line...
    http://www.morganslibrary.org/reference/externaltab.html

Maybe you are looking for