Upload data from flat file into internal table

Hi friends,
I want to upload the data from a flat file into internal table , but the problem is that all the columns in that flat file are seperated by "|" character instead of tabs.
Plz help me out.........

HEllo,
DO like this.
  CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
  FILENAME = LV_FILENAME
  FILETYPE = 'ASC'
  HAS_FIELD_SEPARATOR = 'X'  " Check here
* HEADER_LENGTH = '1'
* READ_BY_LINE = 'X'
* DAT_MODE = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* CHECK_BOM = ' '
* IMPORTING
* FILELENGTH =
* HEADER =
  TABLES
  DATA_TAB = IT_COJRNL
  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.
VAsanth

Similar Messages

  • Short dump while reading a currency field from Flat file into internal tabl

    Hi,
    I am getting a short dump........saying number conversion dump (while reading a currency value into field in internal table from a fixed lenght flat file).........
    Do I need to use a string variable to get the value from flat file or how ??
    Please suggest.

    Santosh,
    Thanks for your inputs,
    But my internal table type is of DEC (5,2) , I am getting that... it needs to be of type 'C'. Can you suggest.
    Ex :
    MOVE wa_temp-infile_string+106(8)  TO wa_item-QT_PERCENT
    This didnt work
    so i tried moving into a seperate variable
    MOVE wa_temp-infile_string+106(8)  TO v_percent.
    and then write to
    WRITE v_percent to  wa_item-QT_PERCENT.

  • Uploading data from xls file to internal table

    Hello,
         I have an excel file with just one column that has phone numbers. I want to upload these phone numbers into an internal table.
        Now my question is: What is the method/function to do this? I tried GUI_UPLOAD but after upload the values in the internal table shows lots of # signs instead of the expected phone numbers.
    Regards,
    Prafful.

    Hello Prafful,
    If you successed to upload XLS into Internal Table and the only problem you have is a # signs try to the following:
    1) instead of the XLS file try to use CSV file (it's a TEXT file - C omma S eperated V alues).
    2) Check your Encoding (your FILE Encoding should be a same as GUI_UPLOAD encoding)
    Good Luck
    Eli Steklov

  • Upload data from excel file to Oracle table

    Dear All,
    I have to upload data from excel file to Oracle table without using third party tools and without converting into CSV file.
    Could you tell me please how can i do this using PLSQl or SQL Loader.
    Thnaks in Advance..

    Dear All,
    I have to upload data from excel file to
    Oracle table without using third party tools and
    without converting into CSV file.
    Could you tell me please how can i do this
    using PLSQl or SQL Loader.
    Thnaks in Advance..As billy mentioned using ODBC interface ,the same HS service which is a layer over using traditional ODBC to access non oracle database.Here is link you can hit and trial and come out here if you have any problem.
    http://www.oracle-base.com/articles/9i/HSGenericConnectivity9i.php[pre]
    Khurram                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Upload data from flat file to OVKK  using BDC

    Hi All,
    I want to upload data from flat file to OVKK tcode using BDC.
    OVKK is a maintaince view with  a table control.
    So please send me code for uploading data to OVKK through BDC.
    Thanks & Regards,
    Siva.B

    Hi,
    Welcome to SDN!!!!!!!!!!
    Can you see this example for Table control.
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    Today this is the second post on the same issue and same Tranx.
    1st try through SHDB and check the code.
    Thanks.
    If this helps you reward with points.

  • Loading data from .csv file into Oracle Table

    Hi,
    I have a requirement where I need to populate data from .csv file into oracle table.
    Is there any mechanism so that i can follow the same?
    Any help will be fruitful.
    Thanks and regards

    You can use Sql Loader or External tables for your requirement
    Missed Karthick's post ...alredy there :)
    Edited by: Rajneesh Kumar on Dec 4, 2008 10:54 AM

  • How to  upload data from flat file to datastore object in BI 7.0

    Dear friends,
    Please tell me
    step by step process for upload data from flat file to datastore object in BI 7.0
    <removed by moderator>
    please help me
    Thanks,
    D.prabhu
    Edited by: Siegfried Szameitat on Aug 17, 2011 11:40 AM

    Create transformation on thr data source and keep the DSO as the target and load.
    Ravi Thothadri

  • Loading data from .csv file into existing table

    Hi,
    I have taken a look at several threads which talk about loading data from .csv file into existing /new table. Also checked out Vikas's application regarding the same. I am trying to explain my requirement with an example.
    I have a .csv file and I want the data to be loaded into an existing table. The timesheet table columns are -
    timesheet_entry_id,time_worked,timesheet_date,project_key .
    The csv columns are :
    project,utilization,project_key,timesheet_category,employee,timesheet_date , hours_worked etc.
    What I needed to know is that before the csv data is loaded into the timesheet table is there any way of validating the project key ( which is the primary key of the projects table) with the projects table . I need to perform similar validations with other columns like customer_id from customers table. Basically the loading should be done after validating if the data exists in the parent table. Has anyone done this kind of loading through the APEX utility-data load.Or is there another method of accomplishing the same.
    Does Vikas's application do what the utility does ( i am assuming that the code being from 2005 the utility was not incorporated in APEX at that time). Any helpful advise is greatly appreciated.
    Thanks,
    Anjali

    Hi Anjali,
    Take a look at these threads which might outline different ways to do it -
    File Browse, File Upload
    Loading CSV file using external table
    Loading a CSV file into a table
    you can create hidden items in the page to validate previous records before insert data.
    Hope this helps,
    M Tajuddin
    http://tajuddin.whitepagesbd.com

  • Error when uploading data from Flat file

    I am uplading data from Flat file.
    When I am uploading it gives an error
    An error occurred in record 1 during execution of conversion exit CONVERSION_EXIT_CUNIT_INPUT for field UNIT.
    Can any one help.
    Thanx in Advance.
    Regards,
    Pradeep.

    Hi Pradeep,
    Refer this link:
    CONVERSION_EXIT_CUNIT_INPUT error in flat file load
    Re: Error in Flat files upload
    Also try this - In the transfer structure check the checkbox fo UNIT and retry the load. Hopefully it should be fine.
    Bye
    Dinesh

  • How to transfer data from excel files into z-tables

    Please help me with a code which transfers data from excel file to z-table.
    Thanks in advance
    Shuvir

    Hi Daniel,
    Export Data
    Purpose
    Use this procedure to export SAP data to a local file such as Microsoft Excel.
    Menu Path
    Use the following menu path to begin this process:
    ·         SystemèListèSaveèLocal File
    Helpful Hints
    When reviewing fields, R = Required,  O = Optional and C = Conditional.
    Procedure
    1.       Start the transaction using the menu path or transaction code.
          Whatever Data You Want to Export
    2.       Select SystemèListèSaveèLocal File.  This works well for any data in SAP.  This is the only option for the top-level (first page) of a report. 
    In a drill-down view within a report the Local File button  on the toolbar may be used and has the same options.
          Choose File Format
    3.       Click  .
    4.       Click  to continue.  If prompted for a format after choosing Spreadsheet, select Excel Table to get an Excel file that can be modified more easily.
          Choose File Save Location Step 1
    5.       Click  to the right of the Directory field to choose a different location.
          Choose File Save Location Step 2
    6.       Click  or browse your computer to locate the directory where you want to save your file.
    7.       Complete the following field:
    ·         File name:
        You must add the proper file extension to the name of your file (.xls for Excel, .rtf for Rich Text, .html for HTML).  The file extension tells your computer what program to open the file with.  If you do not have the file extension at the end, you may not be able to open it.
    8.       Click  to continue.
          Generate File in Location and Format Selected
    9.       Click  to create the file in the location and format selected.  In this example the file was named "example.xls" and saved on the desktop.
    Result
    You have completed the export process.
    thanks
    karthik

  • Upload data from flat file

    Is there a way to upload data from a flat file and check of existing records and perform updates and inserts respectively on a table using MERGE as available in Oracle 9i version.
    I don't want to use SQLLOADER utility for this purpose as I will be having existing data which might give exceptions for primary key, etc.
    Is it possible to do this using UTL_FILE utility and use of MERGE statement.
    Any inputs will be highly appreciated.
    Thanks

    This is what i am doing as of today :-
    This process reads the flat file and uploads and updates data into 2 different tables.
    create or replace procedure EPS.GET_DATA(filelocation varchar2,filename varchar2)
    IS
    --declare
    my_file utl_file.file_type;
    -- variables used to parse the input data line ...
    line char(45);
    l_EPCI_CID_ID char(25);
    l_cid number :=0;
    l_EPCI_BILLING_ACCOUNT_ID char(15);
    l_account number :=0;
    l_EPCI_BILLING_COMPANY_CD char(2);
    l_EPCI_SOURCE_SYSTEM_CD char(3);
    -- timing variables ...
    l_start_time date;
    l_end_time date;
    l_difference number;
    l_run_id varchar2(40) := '';
    counter number := 0;
    mrow number :=0;
    oldCustomerCid number :=0 ;
    rowsFound number :=0;
    rowsFoundForCustomer number :=0;
    rowsFound2 number :=0;
    rowsFound3 number :=0;
    mUpdate number :=0;
    cUpdate number :=0;
    cInsert number :=0;
    cSkipped number :=0 ;
    mrowupd number :=0;
    rowsSkipped number :=0;
    begin
    -- Open the input file ....
    begin
    dbms_output.put_line('opening file :'||filename||' from location :'||filelocation);
    my_file := utl_file.fopen(filelocation,filename,'r');
    exception
    when utl_file.invalid_filehandle then
    dbms_output.put_line('invalid_filehandle');
    raise_application_error(-20100,'file error');
    when no_data_found then
    dbms_output.put_line('no data found exception');
    raise_application_error(-20100,'file error');
    when others then
    null;
    end;
    -- Read data and insert it into the table ...
    dbms_output.put_line('program started: now = '|| to_char(sysdate,'HH:MI:SS'));
    l_start_time := sysdate;
    begin
    dbms_output.put_line('looping cursor to search existing groups');
    loop
    utl_file.get_line(my_file,line);
    l_EPCI_CID_ID := substr(line,1,25);
    l_cid := to_number(l_EPCI_CID_ID);
    l_EPCI_BILLING_ACCOUNT_ID := substr(line,26,15);
    l_account :=to_number(l_EPCI_BILLING_ACCOUNT_ID);
    l_EPCI_BILLING_COMPANY_CD := substr(line,41,2);
    l_EPCI_SOURCE_SYSTEM_CD := substr(line,43,3);
    -- Populating Mad.Mad_Customer_Profile table with EPS CID, If CID exists then updating MCP_LAST_INVOICE_LOAD_DT with system date
    if(oldCustomerCid <> l_cid) then
    Select count(*) into rowsFoundForCustomer from MAD.MAD_CUSTOMER_PROFILE WHERE MCP_CID_ID = l_cid ;
    if rowsFoundForCustomer=0 then
    Insert into MAD.MAD_CUSTOMER_PROFILE values(l_cid,sysdate,sysdate,'EBILL');
    cInsert := cInsert+1;
    else
    Update MAD.MAD_CUSTOMER_PROFILE set MCP_LAST_INVOICE_LOAD_DT=SYSDATE,
    MCP_UPDATE_DATE=SYSDATE, MCP_USER_ID='EBILL' where MCP_CID_ID=l_cid;
    cUpdate := cUpdate+1;
    end if;
    else
    cSkipped := cSkipped+1;
    end if ;
    oldCustomerCid := l_cid;
    -- Populating EPS.EPS_CBS_INVOICE_CUSTOMER table with the flat file data.
    select count(*) into rowsFound
    from EPS.EPS_CBS_INVOICE_CUSTOMER
    WHERE EPCI_CID_ID=l_cid and
    to_number(EPCI_BILLING_ACCOUNT_ID)=l_account
    AND rtrim(EPCI_BILLING_COMPANY_CD)=rtrim(l_EPCI_BILLING_COMPANY_CD)
    AND rtrim(EPCI_SOURCE_SYSTEM_CD)=rtrim(l_EPCI_SOURCE_SYSTEM_CD)
    and rtrim(EPCI_ACTIVE_IND)='Y';
    if rowsFound=0 then
    Declare
    Cursor c1 is
    select * from EPS.EPS_CBS_INVOICE_CUSTOMER
    WHERE
    to_number(EPCI_BILLING_ACCOUNT_ID)=l_account
    AND rtrim(EPCI_BILLING_COMPANY_CD)=rtrim(l_EPCI_BILLING_COMPANY_CD)
    AND rtrim(EPCI_SOURCE_SYSTEM_CD)=rtrim(l_EPCI_SOURCE_SYSTEM_CD)
    and EPCI_ACTIVE_IND='Y';
    myRec eps.eps_cbs_invoice_customer%ROWTYPE ;
    Begin
    if not c1%isopen then
    open c1 ;
    end if;
    loop
    fetch c1 into myRec;
    exit When c1%notfound;
    UPDATE EPS.EPS_CBS_INVOICE_CUSTOMER
    SET EPCI_ACTIVE_IND='N',EPCI_UPDATE_DT=SYSDATE,EPCI_UPDATE_USER_ID='EBILL'
    WHERE
                             --EPCI_CID_ID=L_CID and
    TO_NUMBER(EPCI_BILLING_ACCOUNT_ID)=l_account
    AND rtrim(EPCI_BILLING_COMPANY_CD)=rtrim(l_EPCI_BILLING_COMPANY_CD)
    AND rtrim(EPCI_SOURCE_SYSTEM_CD)=rtrim(l_EPCI_SOURCE_SYSTEM_CD);
    mrowupd := mrowupd+1;
    end loop;
    close c1;
    insert into EPS.EPS_CBS_INVOICE_CUSTOMER(EPCI_CID_ID,EPCI_BILLING_ACCOUNT_ID,
    EPCI_BILLING_COMPANY_CD,EPCI_SOURCE_SYSTEM_CD,EPCI_ACTIVE_IND,EPCI_UPDATE_DT,EPCI_UPDATE_USER_ID)
    Values(l_cid,l_EPCI_BILLING_ACCOUNT_ID,l_EPCI_BILLING_COMPANY_CD,l_EPCI_SOURCE_SYSTEM_CD,'Y',SYSDATE,'EBILL');
    mrow := mrow+1;
    end ;
    Else
    rowsSkipped:=rowsSkipped+1;
    END IF;
    end loop;
    Exception
    when no_data_found then
    utl_file.fclose(my_file);
    dbms_output.put_line('Number of lines parsed =');
    when value_error then
    dbms_output.put_line('value error');
    raise_application_error(-20100,'file error');
    when utl_file.invalid_path then
    dbms_output.put_line('invalid path');
    raise_application_error(-20100,'file error');
    when utl_file.invalid_mode then
    dbms_output.put_line('invalid_mode');
    raise_application_error(-20100,'file error');
    when utl_file.invalid_filehandle then
    dbms_output.put_line('invalid_filehandle');
    raise_application_error(-20100,'file error');
    when utl_file.invalid_operation then
    dbms_output.put_line('invalid_operation');
    raise_application_error(-20100,'file error');
    when utl_file.read_error then
    dbms_output.put_line('read_error');
    raise_application_error(-20100,'file error');
    when utl_file.write_error then
    dbms_output.put_line('write_error');
    raise_application_error(-20100,'file error');
    when utl_file.internal_error then
    dbms_output.put_line('internal_error');
    raise_application_error(-20100,'file error');
    WHEN DUP_VAL_ON_INDEX THEN
    dbms_output.put_line('DUPLICATE RECORD FOUND WHILE INSERTING RECORD');
    when others then
    dbms_output.put_line('un-handled');
    raise_application_error(-20100,'file error');
    null;
    end;
    -- Now commit and close the file ...
    COMMIT;
    dbms_output.put_line('program finished: now = '||
    to_char(sysdate,'HH:MI:SS'));
    dbms_output.put_line('Rows Inserted into EPS table :'|| mrow);
    dbms_output.put_line('Rows Updates in EPS table:'|| mrowupd);
    dbms_output.put_line('Rows Skipped :'|| rowsSkipped);
    dbms_output.put_line('Rows Inserted into Customer table :'|| cInsert);
    dbms_output.put_line('Rows Updates in Customer table:'|| cUpdate);
    dbms_output.put_line('Duplicate CID''s Skipped :'|| cSkipped);
    l_end_time := sysdate;
    l_difference := l_end_time - l_start_time;
    utl_file.fclose(my_file);
    end;

  • Uploading data from an excel to internal table.

    Hi All,
                I have a small problem when uploading data from an excel sheet to internal table using the function "GUI_UPLOAD".
    Some garbage value is getting stored in the internal table after the upload. If i change the format of the file to ".txt" then its working fine. Pls help me out to upload the data frm Excel to Internal Table.
    Thanks.
    Sirisha.

    hi
    good
    pls check this code , this might help you to solve your problem
    Multiple excel sheets generation in a workbook
    CREATE OBJECT EXCEL 'EXCEL.SHEET'.
    GET PROPERTY OF EXCEL 'Application' = APPLICATION.
    SET PROPERTY OF APPLICATION 'Visible' = 1.
    CALL METHOD OF APPLICATION 'Workbooks' = BOOKS.
    CALL METHOD OF BOOKS 'Add' = BOOK.
    CALL METHOD OF BOOK 'WORKSHEETS' = SHEET.
    CALL METHOD OF SHEET 'ADD'.
    Fill all the sheets with relavant data
    PERFORM SHEET1 TABLES ITAB1.
    PERFORM SHEET2 TABLES ITAB2.
    PERFORM SHEET3 TABLES ITAB3.
    PERFORM SHEET4 TABLES ITAB4.
    Quit the excel after use
    CALL METHOD OF EXCEL 'QUIT'.
    FREE OBJECT: COLUMN,SHEET,BOOK,BOOKS,APPLICATION,EXCEL. "NO FLUSH.
    CLEAR V_SHEET.
    FORM FILL_CELL USING ROW COL VAL.
    CALL METHOD OF SHEET 'cells' = CELL NO FLUSH
    EXPORTING #1 = ROW #2 = COL.
    SET PROPERTY OF CELL 'value' = VAL.
    FREE OBJECT CELL NO FLUSH.
    ENDFORM. " FILL_CELL
    FORM SHEET1 TABLES ITAB1 STRUCTURE ITAB1.
    V_SHEET = Sheet Name.
    V_NO = V_NO + 1.
    CALL METHOD OF BOOK 'worksheets' = SHEET NO FLUSH EXPORTING #1 = V_NO.
    SET PROPERTY OF SHEET 'Name' = V_SHEET NO FLUSH.
    PERFORM FILL_SHEET1 TABLES ITAB1 USING V_NO V_SHEET.
    CALL METHOD OF SHEET 'Columns' = COLUMN.
    FREE OBJECT SHEET.
    CALL METHOD OF COLUMN 'Autofit'.
    FREE OBJECT COLUMN.
    ENDFORM.
    Repeat above procedure for all sheets you want to add
    FORM FILL_SHEET1
    TABLES ITAB1 STRUCTURE ITAB1
    USING V_NO V_SHEET.
    ROW = 1.
    PERFORM FILL_CELL USING ROW 1 'Column1 Name'.
    PERFORM FILL_CELL USING ROW 2 'Column2 Name'.
    PERFORM FILL_CELL USING ROW 3 'Column3 Name'.
    ROW = ROW + 1.
    LOOP AT ITAB1.
    PERFORM FILL_CELL USING ROW 1 ITAB1-Column1.
    PERFORM FILL_CELL USING ROW 2 ITAB1-Column2.
    PERFORM FILL_CELL USING ROW 3 ITAB1-Column3.
    ROW = ROW + 1.
    ENDLOOP.
    ENDFORM.
    Repeat above procedure for all sheets you want to add
    Try this also
    TYPE-POOLS: truxs.
    DATA: it_raw TYPE truxs_t_text_data.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    field_name = 'P_FILE'
    IMPORTING
    file_name = p_file.
    Upload Excel file
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
    I_FIELD_SEPERATOR =
    i_line_header = 'X'
    i_tab_raw_data = it_raw
    i_filename = p_file
    TABLES
    i_tab_converted_data = i_XCEL[]
    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.
    Thanks&regds,
    Sree.
    Edited by: Sree on Mar 17, 2008 8:07 AM

  • Loading data from flat file into 0EMPLOYEE

    Dear,
    I want to see the <b>'monthly change of numbers of employees'</b> of my company in a BW report.
    i want to do this by loading data from a dummy flat file into 0EMPLOYEE and afterwards into cube 0PAPA_C02.
    i've searched the whole 'help and service sap' websites but nowhere, i could find a usefull user guide.
    Could you explain me how this job needs to be done, are there certain steps that need to be taken?
    here are a few of my questions:
    1: what fields and data do i have to fill in my flat file?
    2: how does the time-dependency of master data of employee work?
    3: why do you only have to map 0calday and 0employee from infosource 0HR_PA_PA_1 to the corresponding fields of cube 0PAPA_C02?
    4: how is the key figure 0HDCNT_VC filled automathically?
    (the activation of cube 0PAPA_C02  and its flow is already done.)
    or maybe you know a user guide which explains the whole picture and could you send me its link?
    thanks a lot in advance,
    Julie de Meyer

    Hi,
    Employee is master data : You need to extarct data every month.Once the extraction is done , you need rto activate to see the results. Otherwise it will display old result.
    You can extract data for 0HR_PA_0 and 0HR_PA_1 cubes also. After that  you can do the reporting based on this.
    You can try some sap standard BI reports .
    Headcount is calculated based on employement percentage which is maintained in infotype 0007 (Planned Working Time). If it is 100 then it is considerd as headcount 1.
    you can check .
    http://help.sap.com/saphelp_nw2004s/helpdata/en/63/351e3c6a2fc036e10000000a114084/frameset.htm
    Regards
    Nilesh

  • 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 get data from maintaince view into internal table

    Hi,
    I want to get the all data from v_t179 (maintanence view) into intrenal table.
    if i write select stmt , it is giving error.
    I want all data into internal table.
    regards,
    Ajay

    I think this is what you want:
    TABLES: t179, t179t.
    DATA: v_t179_int TYPE TABLE OF v_t179.
    SELECT * FROM t179
      JOIN t179t ON
        t179~prodh = t179t~prodh
      INTO CORRESPONDING FIELDS OF TABLE v_t179_int.
    Rob

Maybe you are looking for

  • Two View Objects & One Entity Object

    Has anyone ever had it where they create a row from a view object, set some attributes, insert it into that view object, and it shows up in another view object (as well as the one the row was actually inserted on)? Both of these view objects are usin

  • I have a 2008 13" Mac Book and want to put a solid state drive in it

    I installed Lion firdt and then Clones my hard drive to the solid state drive but it has issues. I tried to do a clesn install on the solid state drive but the install will not complete

  • Having trouble with one cash receipt...

    Hello, thanks for reading this.  I have a report that displays cash receipts for the day, using 3 different tables.  This report breaks down the daily receipts by payment method - cash, check, credit card, eft.   I recently added a field that would d

  • How to expdp table with a BLOB field when table is larger than UNDO tbs?

    We have a 4-node RAC instance and are at 11.1. We have a 100 gig schema with a few hundred tables. One table contains about 80 gig of data. the table has pictures in it (BLOB column). Our 4 node RAC has 4 12 gig undo tablespaces. We run out of undo w

  • How to supress the result in a query?

    Hi Experts! I have a query, and by default show results right / down. How can I set in design-mode that dont show any result? Thanks!