How to upload the data from excel(3 tabs) file to sap environment

Hi all,
This is Mahesh.
how to upload the data from excel(3 tabs) file to sap environment (internal tables) while doing bdc.

Hi,
The FM 'ALSM_EXCEL_TO_INTERNAL_TABLE' makes it possible to load a worksheet into an internal table in ABAP.
However, if you want to get the data from several worksheets, I think you are stuck with OLE access to your Excel Workbook...
You can find a solution for 2 worksheets in this post :
TO UPLOAD DATA FROM 2 EXCEL SHEETS INTO TWO INTERNAL TABLES
I think you can easily modify it to handle any number of worksheets.
Hope it helps !
Best regards,
Guillaume

Similar Messages

  • How  to load the data from excel  file  into table in oracle using UTL_FI

    How to load the data from excel file into table in oracle
    and from table to excel file
    using UTL_FILE package
    Please give me some example

    This is something i tried in oracle apex
    http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
    Regards,
    CKLP

  • Uploading the data from excel to sap R/3

    Hi Guys,
         Actually i know how to upload the data from text file to sap.when ever i come to excel file while calling 'ALSM_EXCEL_TO_INTERNAL_TABLE' FM I AM NOT ABLE TO HANDLE THE PARAMETERS .
       How can we handle this thing.Plz give me the example code.
    Regards,
    Venkat.

    HI,
    Check this code..
    DATA l_count TYPE sy-tabix.
       CONSTANTS: lc_begin_col TYPE i VALUE '1',
                  lc_begin_row TYPE i VALUE '2',
                  lc_end_col   TYPE i VALUE '2',
                  lc_end_row   TYPE i VALUE '3000'.
    * Begin of CALK912848 - Carlos Werberich - 16Sep08
      CLEAR p_i_excel_data. REFRESH p_i_excel_data.
    * End   of CALK912848 - Carlos Werberich - 16Sep08
    * Function module to read excel file and convert it into internal table
       CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
         EXPORTING
           filename                = p_p_file
           i_begin_col             = lc_begin_col
           i_begin_row             = lc_begin_row
           i_end_col               = lc_end_col
           i_end_row               = lc_end_row
         TABLES
           intern                  = i_data
         EXCEPTIONS
           inconsistent_parameters = 1
           upload_ole              = 2
           OTHERS                  = 3.
    * Error in file upload
       IF sy-subrc NE 0 .
         MESSAGE text-006 TYPE 'E'.
         EXIT.
       ENDIF.
       IF i_data[] IS INITIAL .
         MESSAGE text-007 TYPE 'E'.
         EXIT.
       ELSE.
         SORT i_data BY row col .
    * Loop to fill data in Internal Table
         LOOP AT i_data .
           MOVE i_data-col TO l_count .
           ASSIGN COMPONENT l_count OF STRUCTURE p_i_excel_data TO <fs_source> .
           MOVE i_data-value TO <fs_source> .
           AT END OF row .
    * Append data into internal table
             APPEND p_i_excel_data.
             CLEAR p_i_excel_data.
           ENDAT .
         ENDLOOP .
       ENDIF .

  • How to read the data from Excel file and Store in XML file using java

    Hi All,
    I got a problem with Excel file.
    My problem is how to read the data from Excel file and Store in XML file using java excel api.
    For getting the data from Excel file what are all the steps i need to follow to get the correct result.
    Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
    Thanks & Regards,
    Sreenu,
    [email protected],
    india,

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

  • How to Load the data from excel file(Extension is .CSV) into the temp.table

    Hi
    How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
    My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
    Kindly Suggest the Solution.
    Regards,
    Sachin

    Hello Sachin,
    You can use the following metalink note:How to Read Data from an EXCEL Spreadsheet into a Form Using Webutil Client_OLE2 (Doc ID 813535.1) and modify it a little bit.
    Instead of copy values into forms you can save them in your temporary table.
    Kind regards,
    Alex
    If someone's helpful or correct please mark it accordingly.

  • How to load the data from excel file into temprory table in Forms 11g?

    Hi
    How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
    My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
    Kindly Suggest the Solution.
    Regards,
    Sachin

    Declare
        v_full_filename         varchar2(500);
        v_server_path           varchar2(2000);
        v_separator             VARCHAR2(1);
        v_filename              VARCHAR2(400);
        filename                VARCHAR2 (100);
        v_stop_load             varchar2 (2000);
        v_rec_error_log         varchar2(4000);
        v_error_log             varchar2(4000);
        ctr                     NUMBER (12);
        cols                    NUMBER (2);
        btn                     number;
        RES                     BOOLEAN;   
        application             ole2.obj_type;
        workbooks               ole2.obj_type;
        workbook                ole2.obj_type;
        worksheets              ole2.obj_type;
        worksheet               ole2.obj_type;
        cell                    ole2.obj_type;
        cellType                ole2.OBJ_TYPE;
        args                    ole2.obj_type;
        PROCEDURE olearg
        IS
        args   ole2.obj_type;
        BEGIN
        args := ole2.create_arglist;
        ole2.add_arg (args, ctr);                                
        ole2.add_arg (args, cols);                                   
        cell := ole2.get_obj_property (worksheet, 'Cells', args);
        ole2.destroy_arglist (args);
        END;
    BEGIN
    v_full_filename := client_get_file_name(directory_name => null
                                     ,file_name      => null
                                     ,file_filter    => 'Excel  files (*.xls)|*.xls|'  
                                                                            ||'Excel  files (*.xlsx)|*.xlsx|'                                                                 
                                     ,message        => 'Choose Excel file'
                                     ,dialog_type    => null
                                     ,select_file    => null
    If v_full_filename is not null Then
    v_separator := WEBUTIL_CLIENTINFO.Get_file_Separator ;
    v_filename := v_separator||v_full_filename ;
    :LOAD_FILE_NAME := substr(v_filename,instr(v_filename,v_separator,-1) + 1);                                
    RES := Webutil_File_Transfer.Client_To_AS(v_full_filename,"server_path"||substr(v_filename,instr(v_filename,v_separator,-1) + 1));     
    --Begin load data from EXCEL
    BEGIN
        filename := v_server_path||substr(v_filename,instr(v_filename,v_separator,-1) + 1); -- to pick the file
        application := ole2.create_obj ('Excel.Application');
        ole2.set_property (application, 'Visible', 'false');
        workbooks := ole2.get_obj_property (application, 'Workbooks');
        args := ole2.create_arglist;
        ole2.add_arg (args, filename); -- file path and name
        workbook := ole2.get_obj_property(workbooks,'Open',args);
        ole2.destroy_arglist (args);
        args := ole2.create_arglist;
        ole2.add_arg (args, 'Sheet1');
        worksheet := ole2.get_obj_property (workbook, 'Worksheets', args);
        ole2.destroy_arglist (args);
        ctr := 2;                                                     --row number
        cols := 1;                                                -- column number
        go_block('xxx');
        FIRST_RECORD;  
        LOOP       
                --Column 1 VALUE --------------------------------------------------------------------
            olearg;
            v_stop_load := ole2.get_char_property (cell, 'Text'); --cell value of the argument
            :item1 := v_stop_load;
            cols := cols + 1;                                                      
              --Column 2 VALUE --------------------------------------------------------------------
            olearg;
            :item2 := ole2.get_char_property (cell, 'Text'); --cell value of the argument
            cols := cols + 1;
            --<and so on>
        ole2.invoke (application, 'Quit');
        ole2.RELEASE_OBJ (cell);
        ole2.RELEASE_OBJ (worksheet);
        ole2.RELEASE_OBJ (worksheets);
        ole2.RELEASE_OBJ (workbook);
        ole2.RELEASE_OBJ (workbooks);
        ole2.RELEASE_OBJ (application);
    END;
    --End load data from EXCELPlease mark it as answered if you helped.

  • How to upload the data from two sheets in one excel into SAP

    Hi experts,
                    My requirement is to upload the data from two sheets in an excel into an internal table.How can this be achieved.Is some OLE application has to be used?
    Thanks
    Abhishek

    Hi
    see this program will upload excel file to application.
    *& Report  ZSD_EXCEL2
    REPORT  ZSD_EXCEL2.
    types: begin of ttab ,
          fld1(30) type c,
          fld2(30) type c,
          fld3(30) type c,
          fld4(30) type c,
          fld5(30) type c,
          end of ttab.
    data: itab type table of ttab with header line.
    selection-screen skip 1.
    parameters: p_file type localfile default
                'C:\test.xls'.
    selection-screen skip 1.
    at selection-screen on value-request for p_file.
      call function 'KD_GET_FILENAME_ON_F4'
           exporting
                static    = 'X'
           changing
                file_name = p_file.
    start-of-selection.
      clear itab. refresh itab.
      perform upload_data.
      loop at itab.
        write:/ itab-fld1, itab-fld2, itab-fld3, itab-fld4, itab-fld5.
      endloop.
    * Upload_Data
    form upload_data.
      data: file type  rlgrap-filename.
      data: xcel type table of alsmex_tabline with header line.
      file = p_file.
      call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           exporting
                filename                = file
                i_begin_col             = '1'
                i_begin_row             = '1'
                i_end_col               = '200'
                i_end_row               = '5000'
           tables
                intern                  = xcel
           exceptions
                inconsistent_parameters = 1
                upload_ole              = 2
                others                  = 3.
      loop at xcel.
        case xcel-col.
          when '0001'.
            itab-fld1 = xcel-value.
          when '0002'.
            itab-fld2 = xcel-value.
          when '0003'.
            itab-fld3 = xcel-value.
          when '0004'.
            itab-fld4 = xcel-value.
          when '0005'.
            itab-fld5 = xcel-value.
        endcase.
        at end of row.
          append itab.
          clear itab.
        endat.
      endloop.
    endform.

  • How to take the data from excel list to sap r/3(with time interval)

    hi experts,
       how to transfer the data from a third party system(if it is in format of excel) to sap r/3.with that in a particular time interval,it will delete the data from excel sheet.

    Hi
    use the Fm
    'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                filename                = p_path
                i_begin_col             = '1'
                i_begin_row             = '2'
                i_end_col               = '2'
                i_end_row               = '500'
          giving the starting row and column and passing the ending row and column name
    Reward points if useful........
    Regards,
    Nitin Sachdeva

  • How to create a form which has browse option ? Then how to upload the data from the excel file to table in Oracle DB?

    Hi Everyone,
    I am new to Oracle forms. I have a requirement where user wants a form which can be used to browse a excel file from his/her system. Also after browsing the file the user should be able to load the data from the file to a table in the Oracle DB.
    Any help pointers would be appreciated.
    Thanks,
    Satya
    Message was edited by: user12098633

    Hi Marcus,
    I am using EBS (E- Business Suite) ERP and version is 11.5.10.2
    My database version is as below
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE
    11.2.0.3.0
    Production
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    I want to move csv file via EBS only. Average size of this will be max 600-700 bytes.
    Program should be in pl/sql package or concurrent program or custom .fmb (d2k forms) or custom .rdf (d2k report) or through alert. I am not using samba.

  • Upload the data from excel sheet to form 6i

    hi all,
    i am using Forms [32 Bit] Version 6.0.8.24.1 (Production)
    my requirement is to import data from excel to forms.
    i have gone through the help, they have mentioned as below
    To build this demo:
    1     Create a spreadsheet containing the initial data and formulae that you want to appear in your form.
    2     In the Layout Editor, click the OLE container tool and drag out the area where you want to display the spreadsheet.
    3     From the pop-up menu on the OLE container, click Insert Object. 
    4     Click Create from File.  Enter the name of the spreadsheet.  Click OK.
    5     In the Object Navigator, attach the library EXCEL.PLL.
    6     To get the value of a cell, call the function GETCELL from the SPREADSHEET package contained in the EXCEL library.
    To get the value of a cell, call the procedure SETCELL from the same package.
    7     To add other interactions with the spreadsheet, use the OLE2 built-in package.  Consult the Excel documentation
    for details of Excel’s object model.but if anybody explain this with sample then it will be useful for me..This is first time i am comming such type of requirement across.
    Thanks..

    hi,
    i have some sample code(taken from some source)
    DECLARE
    application ole2.obj_type;
    workbooks ole2.obj_type;
    workbook ole2.obj_type;
    args ole2.list_type;
    worksheets OLE2.OBJ_TYPE;
    worksheet OLE2.OBJ_TYPE;
    BEGIN
    application:=ole2.create_obj('Excel.Application');
    ole2.set_property(application, 'Visible', 'True');
    workbooks := OLE2.GET_OBJ_PROPERTY(application, 'workbooks');
    args:=ole2.create_arglist;
    ole2.add_arg(args, 'FILE_NAME');
    workbook:= ole2.invoke_obj(workbooks, 'Open',args);
    ole2.destroy_arglist(args);
    args:=ole2.create_arglist;
    ole2.add_arg(args, 'c:\Pasta1!teste'); --how to pass the arguments
    ole2.invoke(application, 'Run', args);
    ole2.destroy_arglist(args);
    ole2.release_obj(workbook);
    ole2.release_obj(workbooks);
    ole2.release_obj(application);
    END; but i don't know how to pass the arguments(i have to pass the excell cell values(data)as an arguments)
    Suggest me to proceed further..
    Thanks..
    Edited by: user13329002 on Nov 13, 2010 1:16 AM

  • How to read the data from excel file and store into the table?

    Hi All,
    I have table with BLOB datatype contains a excel file. I have to read that data from excel and store into one table with all the fields in excel.
    All the excel fields and my table columns are same.
    Can you share with me how can acheive this using LOB's?
    Thanks

    Hi OraSuirya,
    you can try with external tables .
    syntax as follows
    create table ext_table_csv (
    i Number,
    n Varchar2(20),
    m Varchar2(20)
    organization external (
    type oracle_loader
    default directory ext_dir
    access parameters (
    records delimited by newline
    fields terminated by ','
    missing field values are null
    location ('file.csv')
    reject limit unlimited;
    For this you need to create directory
    Directory Creation syntax:
    create or replace directory ext_dir as 'D:\oracle\user_dir\ext_dir';
    grant read, write on directory ext_dir to <User>;
    please paste the excel file in the particular directory .
    I hope this will help you.
    Please correct me if I am wrong anywhere .
    Thanks,
    Tippu.

  • How to upload the data from existing ods to new cube?

    Hi all,
    There is an existing ods and reports are been created for that ods. My task is to create a cube and pull out the data from the ods to cube.
    I have created a cube with update rule. And i want to know to how to load all the data from the existing ods to the newly created cube.
    thanxs
    haritha

    Hi haritha,
    If you've already created the update-rules, try to create cube, than make a mapping between ODS & Cube.
    If done,
    1. Right-Click on ODS, find the menu update data to data target.
    2. Choose for Init.
    If you wanna make it update data to cube automatically, then you must setup the setting in ODS.
    1. double-click on it.
    2. In setting, you'll see the option for "automatically update data to data target".
    3. Choose for it.
    Hopefully it can help you a lot.
    Regards,
    Niel.
    thanks for any points you choose to assign.

  • Transfer Data from excel to text file or SAP R/3

    Hi,
    Can anyone please let me know if there is any function module to transfer data from excel to a .txt file.
    I am using a CRM 5.0 system and some standard SAP function modules are missing.
    I want to fetch data from excel to SAP R/3.
    Wish you great time.
    Best Regards
    Sid

    Hi Sid,
    extracting data from an excel sheet to SAP u can use the function module GUI_UPLOAD.
    I am providing u its parameters also as it might be useful to u.
    The mandatory fields here are FILENAME n in TABLES (in which u will be saving ur data).
    and also if u need to download from sap to any file u can use GUI_DOWNLOAD in which u can save data in both excel or txt file.
    U can also use SAP_CONVERT_TO_TEX_FORMAT function module to convert into text file.
    Rewards would be highly appreciated. Thanks.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      =
      FILETYPE                      = 'ASC'
      HAS_FIELD_SEPARATOR           = ' '
      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                      =
    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 <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • How to upload the data from legacy system database to SAP data base

    Hi.
    We are doing analysis of Legacy system and which needs to be converted to SAP system i.e. SAP implementation.
    I just want to know , how we migrate the existing whole data( from legacy system) into SAP system.
    and which method is the best method to use data migration from legacy to SAP system if data legacy data amount is huge.
    Please suggest me.
    Thanks.

    Hi
    We can either use the BDC or BAPI or LSMW  or Direct Input techiniques for the data transfers.
    The combination of both Session and Call transaction can be used to achieve this that includes the error handling also. This invloves the screen interaction.
    These days, BAPIs are used to overvome some upgrade problems. For easy upgradation, we cna go for BAPIs. Here ther is no screen intercation.
    LSMW mainly used for master data transfers using some standrad programs.
    As per your client or company desicions  we can choose any of them.
    Please refer to these links for more understanding -
    BDC Vs LSMW -
    BDC VS LSMW
    BDC Vs BAPI -
    BDC VS LSMW
    Thanks & Regards,
    Chandralekha.

  • How to upload the data from XML file to SAP database using IDOC

    Hi,
    I need some steps  to upload  data from XML format file from other directory to SAP database using IDOC.
    how to approch this please if any one knows give me ans
    it will be a great help ful to me
    Thanks in Advance
    Mallik

    Thank you vijay,
    But i heard that by using this Fun modules, when we are passing IDOC in back ground schedule,  so some other depended FM not supporting, so how to approach this and how to avoid this problem. 
    Have you worked on this before if any one worked on this please help me out
    And thank you once again for your valuable information
    Best Regards
    Mallik

Maybe you are looking for

  • Calendar Will Not Sync With Outlook

    Calendar won't sync with Outlook 2003. Tasks, memos, and contacts will though. Under default services, it lists Facebook as my Calendar (CICAL). What do I need to do to change this so that my calendar syncs properly? Solved! Go to Solution.

  • Oracle 11g wallet open failed

    Hi All: I have being having issues with oracle wallet on oracle 11g Release 2. I have an application that cannot connect to the database due to the wallet. Wallet is now becoming a nightmare for developers of application connecting to oracle. SQL> st

  • Z22 on Mac Leopard - getting a 'file is busy' error when starting up Pilot Desktop.

    Been thru the delete and re-enstall the Desktop software. the Palm is fine and I want to get info from palm to desktop palm.  Lots of info i don't want to loose. and i type slow enough on the Mac, I don't want to have to put all in palm and the have

  • Identifying which Layer is a template from Printing Company?

    I've taken over a graphic design position, and am having a it of trouble with something simple. For a 28 page catalog, the printing company has told me that my predecessor's uploaded files (PDF's exported from .indd) contains their (the printing comp

  • Not a single format will import

    I have a flip video which records in AVI. Older iMovie had no problem importing this. I spent several hours at the Apple store Genius bar a month or so ago and we developed a workaround using Toast Titanium to convert my AVI files to Quicktime so iMo