How to fetch data in Excel throuth oracle forms 10g on client machine

I am using developer suite 10g forms and i want to fetch data in excel through forms 10g on client machine
presently i m using OLE for fetching the data in excel , it is working fine but it generates the excel file on server machine and i want get the output excel on the client machine. Is there any parameter to set the destination {Server or Client} which decides the location of output file. If such is the case please let me know or please suggest what should i do. Please help me with proper solution.
thanks
Manoj

If you have an "urgent" issue, I highly encourage you to contact Oracle Support. The forum probably isn't going to be your best source for "urgent" issues.
http://www.oracle.com/us/support/oracle-support-services-359636.html
https://support.oracle.com
This will be especially important if you are new to any of the products as you will likely need documentation and/or product updates in order to ensure the most stable environment possible.
There are a few publicly available documents which may help to get you started. In any case, these are just examples. They may or may not work to your liking. Further, in some cases they may not work at all. Many of the examples online are often outdated and do not function exactly as documented against other versions. Here is one:
http://www.oracle.com/technetwork/developer-tools/forms/howto-ole-090332.html
Additional documentation for using WebUtil is included in the Forms Builder online help. An update to the Builder Help files can be downloaded from here. Be sure to carefully review the included ReadMe before attempting to use them.
http://docs.oracle.com/cd/B25016_08/doc/dl/web/forms_help/frmhelp_update.zip

Similar Messages

  • How to generate excel file in oracle forms 10g on client machine

    dear Sir,
    I am using just file server(installed 10g dev suite) not a oracle application server,
    I am running my application from another machine ,it running fine i want to generate excel report on client machine
    presently i m using OLE2 for fetching the data in excel , it is working fine but it generates the excel file on file server machine and i want get the output excel on the client machine. aftre OLE2 i m using CLIENT_OLE2 with webutil (instead of OLE2) its get compile successfully but during runtime it give error "oracle.forms.webutil.ole.OleFunctions bean not "found.CLIENT_OLE2.create_obj will not work"
    *so please tell me without oracle application server is this possible or not .*

    your webutil on server side is not configured
    you need to re install the webutil jacob.dll files etc. then it will work fine..
    you can also generate excel file using reports to change the destination format in SPREADSHEET

  • How to implement the spell check in oracle forms 10g or 6i...

    How to implement the spell check in oracle forms.
    Is there any different method is there.
    Please help me....
    Praveen.K

    Here is one different from Jspell..
    In 6i client/server you can call MS Word spell checker using OLE. Below sample code for 6i.
    For 10g you will need webutil to use same code. install webutil and just replace "OLE2." with "CLIENT_OLE2."
    PROCEDURE spell_check (item_name IN VARCHAR2)
    IS
       my_application   ole2.obj_type;
       my_documents     ole2.obj_type;
       my_document      ole2.obj_type;
       my_selection     ole2.obj_type;
       get_spell        ole2.obj_type;
       my_spell         ole2.obj_type;
       args             ole2.list_type;
       spell_checked    VARCHAR2 (4000);
       orig_text        VARCHAR2 (4000);
    BEGIN
       orig_text := NAME_IN (item_name);
       my_application := ole2.create_obj ('WORD.APPLICATION');
       ole2.set_property (my_application, 'VISIBLE', FALSE);
       my_documents := ole2.get_obj_property (my_application, 'DOCUMENTS');
       my_document := ole2.invoke_obj (my_documents, 'ADD');
       my_selection := ole2.get_obj_property (my_application, 'SELECTION');
       ole2.set_property (my_selection, 'TEXT', orig_text);
       get_spell :=ole2.get_obj_property (my_application, 'ACTIVEDOCUMENT');
       ole2.invoke (get_spell, 'CHECKSPELLING');
       ole2.invoke (my_selection, 'WholeStory');
       ole2.invoke (my_selection, 'Copy');
       spell_checked := ole2.get_char_property (my_selection, 'TEXT');
       spell_checked :=SUBSTR (REPLACE (spell_checked, CHR (13), CHR (10)),1,LENGTH (spell_checked));
       COPY (spell_checked, item_name);
       args := ole2.create_arglist;
       ole2.add_arg (args, 0);
       ole2.invoke (my_document, 'CLOSE', args);
       ole2.destroy_arglist (args);
       ole2.RELEASE_OBJ (my_selection);
       ole2.RELEASE_OBJ (get_spell);
       ole2.RELEASE_OBJ (my_document);
       ole2.RELEASE_OBJ (my_documents);
       ole2.invoke (my_application, 'QUIT');
       ole2.RELEASE_OBJ (my_application);
    END;Call it like this: SPELL_CHECK ('BLOCK.MY_TEXT_ITEM' );

  • How to call a .rpt file from oracle form 10g

    I need to call a .rpt file from oracle form 10g. please suggest what to do for this

    Hi,
    onlz rdf and rep files are Reports executables. Convert rpt to rep and you are file (Reports has a conversion utility in the bin directory)
    Frank

  • How to run an XML Report from Oracle Forms 10G

    Hello Friends,
    I am in need of showing a xml report output through a button press trigger in Oracle Forms10G.
    I have designed the report in XML Publisher and the report looks fine.I found few scripts useful in running the Oracle Report from Oracle forms10G like Run_Report_Object.But I am not aware of any script that could run a XML report and show the output directly from a Form.
    All I want is to run a XML report from an Oracle Form with a button press trigger and show the output in an html version.
    Can this be achieved?
    If so, Kindly advise as this is an immediate work.
    Regards,
    Badrul.

    Hi,
    If I am not wrong the XML publisher is same as BI publisher ...
    There is one document which explains how to integrate using web service
    You want to check this
    http://www.oracle.com/technology/products/xml-publisher/docs/Forms_BIP_v22.pdf
    or you can also try web.show_document ..

  • Sending data to EXCEL from Oracle Forms 6.0 URGENT!!!!!

    Dear all,
    I have a problem to which I hope to get a solution from anyone
    out there...
    The problem is as follows:
    I have a form that contains some data. Now this data I need to
    transfer to an excell sheet. I tried to do so through report
    builder (6.0) but every time I try to convert my report I get a
    general protection fault. So instead I'm sending the data to a
    text file through text_io built in then reopening the text file
    from excel. Isn't there a better way to do it? ie sending the
    data stright from forms to excel?
    Thanks in advance
    null

    TRY THIS OUT....OLE2.... IT WORKS GREAT...DIRECTLY TO EXCEL...
    Oracle Corporate Support
    Problem Repository
    1. Prob# 1030046.6 NEW: OLE AUTOMATION NO LONGER WORKS AFTER
    UPGRADE TO OF
    2. Soln# 2077481.6 NEW: MICROSOFT CHANGED OLE INTERFACE FOR
    OFFICE97
    1. Prob# 1030046.6 NEW: OLE AUTOMATION NO LONGER WORKS AFTER
    UPGRADE TO OF
    Problem ID : 1030046.6
    Affected Platforms : MS Windows 95
    MS Windows NT
    Affected Products : SQL*Forms
    Oracle Reports
    Oracle Graphics
    Oracle Developer/2000
    Affected Components : SF40 V04.05.XX
    SQLREP V02.05.XX
    ORAGRAPH V02.05.XX
    DEV2K Generic
    Affected Oracle Vsn : Generic
    Summary:
    NEW: OLE AUTOMATION NO LONGER WORKS AFTER UPGRADE TO OFFICE97
    +=+
    Problem Description:
    ====================
    You have upgraded to Microsoft Office97 and OLE calls in your
    Developer/2000
    applications no longer work.
    Problem Explanation:
    ====================
    Examples:
    You are using Forms to send data to a Microsoft Word document
    and print
    letters, using ole automation. This worked fine with Word 6.0,
    but when
    they
    upgraded to Word 8.0 (Office97), the letters do not get printed.
    When you try to get an object handle to the Excel97 Workbooks
    collection
    using
    the OLE2 Package, you get the following error:
    FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception
    ORA-305500
    The Same code works fine against Excel 7.0.
    [ Search Words: Office 97 msoffice ms office object linking and
    embedding
    application get_obj_property workbook invoke_obj
    appshow
    upgrade upgrading bug483090 olex.rdf demo ]
    +==+
    Diagnostics and References:
    2. Soln# 2077481.6 NEW: MICROSOFT CHANGED OLE INTERFACE FOR
    OFFICE97
    Solution ID : 2077481.6
    For Problem : 1030046.6
    Affected Platforms : MS Windows 95
    MS Windows NT
    Affected Products : SQL*Forms
    Oracle Reports
    Oracle Graphics
    Oracle Developer/2000
    Affected Components : SF40 V04.05.XX
    SQLREP V02.05.XX
    ORAGRAPH V02.05.XX
    DEV2K Generic
    Affected Oracle Vsn : Generic
    Summary:
    NEW: MICROSOFT CHANGED OLE INTERFACE FOR OFFICE97
    +=+
    Solution Description:
    =====================
    WORD:
    Microsoft made some changes in the upgraded version of Word
    which cause it
    to
    come up as a hidden application. Customer had to add "AppShow"
    to his code,
    and ole automation works fine now.
    EXCEL:
    The issue here is that Microsoft changed the object "Workbooks",
    which is
    now
    a property of object "Excel.Application". So, replace the call:
    workbooks := ole2.invoke_obj(application, 'workbooks');
    with
    workbooks := ole2.get_obj_property(application, 'workbooks');
    For example:
    PACKAGE BODY olewrap IS
    -- Declare the OLE objects
    application OLE2.OBJ_TYPE;
    workbooks OLE2.OBJ_TYPE;
    workbook OLE2.OBJ_TYPE;
    worksheets OLE2.OBJ_TYPE;
    worksheet OLE2.OBJ_TYPE;
    cell OLE2.OBJ_TYPE;
    args OLE2.LIST_TYPE;
    procedure init is
    begin
    -- Start Excel and make it visible
    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, 'c:\test\ms\excel\test.xls');
    workbook := OLE2.GET_OBJ_PROPERTY(workbooks, 'Open', args);
    OLE2.DESTROY_ARGLIST(args);
    worksheets := OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
    worksheet := OLE2.GET_OBJ_PROPERTY(worksheets,'Add');
    -- Return object handle to cell A1 on the new Worksheet
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 1);
    OLE2.ADD_ARG(args, 1);
    cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
    OLE2.DESTROY_ARGLIST(args);
    -- Set the contents of the cell to 'Hello Excel!'
    OLE2.SET_PROPERTY(cell, 'Value', 'Hello Excel!');
    END;
    procedure addstuff is
    BEGIN
    -- Return object handle to cell A1 on the new Worksheet
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 2);
    OLE2.ADD_ARG(args, 2);
    cell:=OLE2.INVOKE_OBJ(worksheet, 'Cells', args);
    OLE2.DESTROY_ARGLIST(args);
    -- Set the contents of the cell to 'This is the added stuff'
    OLE2.SET_PROPERTY(cell, 'Value', 'This is the added stuff');
    END;
    procedure stop is
    begin
    -- Release the OLE objects
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'C:\OLETEST2.XLS');
    OLE2.INVOKE(worksheet, 'SaveAs', args);
    OLE2.DESTROY_ARGLIST(args);
    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;
    Solution Explanation:
    =====================
    Microsoft changed some of the OLE calling interfaces for the
    Office97
    products. Thus, some of your existing OLE calls may need to be
    changed to
    comply with the Office97 interface.
    Consult with Microsoft and your Office97 documentation or more
    information
    on
    what the OLE interface is for the Office97 suite of products.
    Additional Information:
    =======================
    Related Bugs:
    483090 (Closed, Vendor OS Problem)
    FORM GIVES FRM-40735: UNHANDLED EXCEPTION ORA-305500 AGAINST
    EXCEL97.OFMPE0497
    +==+
    References:
    ref: {8192.4} BUG-483090
    Oracle Corporate Support
    Problem Repository
    1. Prob# 1030046.6 NEW: OLE AUTOMATION NO LONGER WORKS AFTER
    UPGRADE TO OF
    2. Soln# 2077481.6 NEW: MICROSOFT CHANGED OLE INTERFACE FOR
    OFFICE97
    1. Prob# 1030046.6 NEW: OLE AUTOMATION NO LONGER WORKS AFTER
    UPGRADE TO OF
    Problem ID : 1030046.6
    Affected Platforms : MS Windows 95
    MS Windows NT
    Affected Products : SQL*Forms
    Oracle Reports
    Oracle Graphics
    Oracle Developer/2000
    Affected Components : SF40 V04.05.XX
    SQLREP V02.05.XX
    ORAGRAPH V02.05.XX
    DEV2K Generic
    Affected Oracle Vsn : Generic
    Summary:
    NEW: OLE AUTOMATION NO LONGER WORKS AFTER UPGRADE TO OFFICE97
    +=+
    Problem Description:
    ====================
    You have upgraded to Microsoft Office97 and OLE calls in your
    Developer/2000
    applications no longer work.
    Problem Explanation:
    ====================
    Examples:
    You are using Forms to send data to a Microsoft Word document
    and print
    letters, using ole automation. This worked fine with Word 6.0,
    but when
    they
    upgraded to Word 8.0 (Office97), the letters do not get printed.
    When you try to get an object handle to the Excel97 Workbooks
    collection
    using
    the OLE2 Package, you get the following error:
    FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception
    ORA-305500
    The Same code works fine against Excel 7.0.
    [ Search Words: Office 97 msoffice ms office object linking and
    embedding
    application get_obj_property workbook invoke_obj
    appshow
    upgrade upgrading bug483090 olex.rdf demo ]
    +==+
    Diagnostics and References:
    2. Soln# 2077481.6 NEW: MICROSOFT CHANGED OLE INTERFACE FOR
    OFFICE97
    Solution ID : 2077481.6
    For Problem : 1030046.6
    Affected Platforms : MS Windows 95
    MS Windows NT
    Affected Products : SQL*Forms
    Oracle Reports
    Oracle Graphics
    Oracle Developer/2000
    Affected Components : SF40 V04.05.XX
    SQLREP V02.05.XX
    ORAGRAPH V02.05.XX
    DEV2K Generic
    Affected Oracle Vsn : Generic
    Summary:
    NEW: MICROSOFT CHANGED OLE INTERFACE FOR OFFICE97
    +=+
    Solution Description:
    =====================
    WORD:
    Microsoft made some changes in the upgraded version of Word
    which cause it
    to
    come up as a hidden application. Customer had to add "AppShow"
    to his code,
    and ole automation works fine now.
    EXCEL:
    The issue here is that Microsoft changed the object "Workbooks",
    which is
    now
    a property of object "Excel.Application". So, replace the call:
    workbooks := ole2.invoke_obj(application, 'workbooks');
    with
    workbooks := ole2.get_obj_property(application, 'workbooks');
    For example:
    PACKAGE BODY olewrap IS
    -- Declare the OLE objects
    application OLE2.OBJ_TYPE;
    workbooks OLE2.OBJ_TYPE;
    workbook OLE2.OBJ_TYPE;
    worksheets OLE2.OBJ_TYPE;
    worksheet OLE2.OBJ_TYPE;
    cell OLE2.OBJ_TYPE;
    args OLE2.LIST_TYPE;
    procedure init is
    begin
    -- Start Excel and make it visible
    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, 'c:\test\ms\excel\test.xls');
    workbook := OLE2.GET_OBJ_PROPERTY(workbooks, 'Open', args);
    OLE2.DESTROY_ARGLIST(args);
    worksheets := OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
    worksheet := OLE2.GET_OBJ_PROPERTY(worksheets,'Add');
    -- Return object handle to cell A1 on the new Worksheet
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 1);
    OLE2.ADD_ARG(args, 1);
    cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
    OLE2.DESTROY_ARGLIST(args);
    -- Set the contents of the cell to 'Hello Excel!'
    OLE2.SET_PROPERTY(cell, 'Value', 'Hello Excel!');
    END;
    procedure addstuff is
    BEGIN
    -- Return object handle to cell A1 on the new Worksheet
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 2);
    OLE2.ADD_ARG(args, 2);
    cell:=OLE2.INVOKE_OBJ(worksheet, 'Cells', args);
    OLE2.DESTROY_ARGLIST(args);
    -- Set the contents of the cell to 'This is the added stuff'
    OLE2.SET_PROPERTY(cell, 'Value', 'This is the added stuff');
    END;
    procedure stop is
    begin
    -- Release the OLE objects
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'C:\OLETEST2.XLS');
    OLE2.INVOKE(worksheet, 'SaveAs', args);
    OLE2.DESTROY_ARGLIST(args);
    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;
    Solution Explanation:
    =====================
    Microsoft changed some of the OLE calling interfaces for the
    Office97
    products. Thus, some of your existing OLE calls may need to be
    changed to
    comply with the Office97 interface.
    Consult with Microsoft and your Office97 documentation or more
    information
    on
    what the OLE interface is for the Office97 suite of products.
    Additional Information:
    =======================
    Related Bugs:
    483090 (Closed, Vendor OS Problem)
    FORM GIVES FRM-40735: UNHANDLED EXCEPTION ORA-305500 AGAINST
    EXCEL97.OFMPE0497
    +==+
    References:
    ref: {8192.4} BUG-483090
    null

  • How to read a Value from Excel Cell into Oracle Forms 10g with Java

    Did any one Implamented a Java PJC to integrate Excel on Oracle Forms 10g?
    I Open Excel Applikation.
    Open a File like c:\import_test.xls
    read a number 05 from A:1 (i get it as return value).
    Save a number in a variable in Forms 10g
    Can any one help my please?
    Thanks

    why don't you use webutil.
    it has package client_ole2 which allows you to have programmatic interface with excel application.
    this is especially useful if the excel to be read is available in the client.

  • Open word document from oracle forms 10g

    Hi,
    Could any one please guide me how to open a word document from forms 10g on client machine (windows). My word document resides on application server (unix).
    Thanks for the help in advance.

    I tried that, but it doesn't work.
    What I have done is, I have written a java code that has a function ope_word that opens up a word document. I have created jar out of it called wordbean.jar.
    Add this wordbean.jar in $ORACLE_HOME/forms/java directory and also added in the formsweb.cfg file (archive_jini=wordbean.jar)
    Then I created a form and usinf fbean.register and fbean.invoke functions of forms, I am trying to call wordbean.jar.
    F.bean.register is registering all the components of wordbean.jar but it is not opening the word document.
    Could you please help ??

  • How to import data from excel or csv files to Oracle table

    hello everybody,
    I am new here and new in Oracle. I would like to know the steps how to import data from excel or csv files to Oracle table.
    Let say I already have table inside the Oracle. Then my user give me the sets of data inside the Excel Worksheet.
    So, how can I import the excel data into Oracle table.
    Thank you in advance.
    cheers,
    shima

    Even easier. Download JDeveloper 11G from this site.
    Set up the database connection, right click on the table, select Import->Excel and specify your file to load it. On the import pop-up, you must view and update each tab indicating Columns, Data Types, and DML.
    Columns -- move the selected columns that you want to load to the box on the right
    Data Types -- select column name from second column to which the data for each column of the import file should load
    DML -- click this tab to generate the INSERT SQL
    Once done click 'Insert'

  • Data From Excel to Oracle

    Hi, how can I do a Stored Procedure or free code to import data from Excel to Oracle Table? Tanks for all.

    I never use UTL_FILE. I use Delphi and I need to make a subrotine to import xls file to oracle. So, I prefer to do into DataBase, using database resource, but I do not oracle expertise, I have some difficulties. Tanks.

  • Data from Excel to Oracle DB

    Hi,
    I can upload data from excel to access having created stored procedure on access.
    I do the upload using my vb code.
    How can I upload data from excel to oracle db? could i use the same technique as above? only problem is im not sure if that vb code will work with oracle?
    has anyone done this before? anyone have example code?
    kindly assist me here
    thanks

    The easiest way to do this is to use a Oracle ODBC connection which can be found on OTN. You do not need a stored proc.
    After installing Oracle ODBC on the machine where Excel and Access live, do the following.
    Note, you already have steps 1, 2 and 3. I list all the steps for others.
    1. Create your MS/Excel workbook
    2. Add data to it.
    3. Save it as "book1.xls".
    4. Open MS/Access
    5. Create new blank database, call it db1.
    6. Then from the file menu, get external data, import, make sure the file type is xls, select book1.xls.
    7. The wizard will walk you through the process of importing you Excel workbook into a new table.
    8. Save
    9. From the file menu select export table.
    10. Select ODBC at the bottom of the "Save as type list".
    11. Then (depending how you set up ODBC) select Machine Data Source.
    12 . Select your Oracle ODBC connection and press OK.
    You now have taken data from Excel to Access and placed it in the Oracle schema that was named when you setup your Oracle ODBC connection.
    BG...

  • Upload data from excel to oracle table

    Hi,
    if i'm user and using an application and i want to upload data from excel to oracle table on button click . Is it possible by using sql loader.
    If yes then please clarify it .
    is it possible from client end.
    thanks
    kam

    Yes it is possible using SQL*LDR, External tables and ORCL Export Utility. Though I didn't try Export Utility to load the external files.
    SQLLdr sysntax:
    Create a control file.
    It looks like this
    Load data
    Infile 'source.dat' 
    Into Table tablename
    Fields terminated by ',' optionally enclosed by '"'
    {code}
    then use sqlldr command from your OS.
    {code}
    sqlldr userid/password@sid control = filename.ctl, data = source.dat, log = logname.log, bad = badname.log, discard = discardname.discard
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • HOW TO UPLOAD DATA FROM EXCEL TO INTERNALTABLE

    HI,
    HOW TO UPLOAD DATA FROM EXCEL TO INTERNALTABLE?  & WITH EXAMPLE.

    hi,
    chk this, put the data into an excel file.
    fields inside it are name and age.
    sample excel sheet.
    coloumn 1 is name and column 2 is age
    name age
    A     8
    C     13
    D     55
    DATA : int_excel LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE.
    data : record like db_name_age occurs 0 with header line.
    DATA : v_start_col TYPE i VALUE '1', "starting col
           v_start_row TYPE i VALUE '1', " starting row
           v_end_col   TYPE i VALUE '2', " total columns
           v_end_row   TYPE i VALUE '10'. "total no of record
    FORM f_upload .
      CLEAR : int_excel, int_excel[].
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = wf_filename
          i_begin_col             = v_start_col
          i_begin_row             = v_start_row
          i_end_col               = v_end_col
          i_end_row               = v_end_row
        TABLES
          intern                  = int_excel
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
    *Message is 'Unable to upload data from  '  wf_filename.
        MESSAGE e169(zm050) WITH wf_filename.
      ELSE.
        SORT int_excel BY row col.
        REFRESH : record.
        CLEAR   : record.
        LOOP AT int_excel.
          CASE int_excel-col. "go thru each column.
            WHEN 1.
              record-name  = int_excel-value.
            WHEN 2.
              record-age = int_excel-value.     
          ENDCASE.
          AT END OF row.
            APPEND record.
            CLEAR record.
          ENDAT.
        ENDLOOP.
    *inserting into table
    modfiy db_name_age from table record.
      ENDIF.
    <i><b>ANOTHER EXAMPLE</b></i>
    TYPE-POOLS truxs.
    types: begin of t_tab,
    col1(5) type c,
    col2(5) type c,
    col3(5) type c,
    end of t_tab.
    data : itab type standard table of t_tab,
           wa type t_tab.
    data it_type type truxs_t_text_data.
    parameter p_file type rlgrap-filename.
    data ttab type tabname.
    at selection-screen on value-request for p_file.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    PROGRAM_NAME = SYST-CPROG
    DYNPRO_NUMBER = SYST-DYNNR
    FIELD_NAME = 'P_FILE'
    IMPORTING
    FILE_NAME = p_file
    start-of-selection.
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
    I_FIELD_SEPERATOR =
    I_LINE_HEADER = 'X'
    i_tab_raw_data = it_type
    i_filename = p_file
    tables
    i_tab_converted_data = itab[]
    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.
    loop at itab into wa.
    write : wa-col1,
            wa-col2,
            wa-col3.
    endloop.
    rgds,
    anver
    <i>if hlped pls mark points</i>

  • How to upload data from excel to SAP and options to be used

    How to upload data from excel to SAP and options to be used
    thank you,
    Regards,
    Jagrut Bharatkumar shukla

    Hi Jagrut,
        You can use gui_upload.
    chk the sample program mentioned below.
    REPORT ZFTP .
    DATA: BEGIN OF I_FILE OCCURS 0,
    DATA(2000) TYPE C,
    END OF I_FILE.
    DATA: BEGIN OF I_FILE2 OCCURS 0,
    DATA(2000) TYPE C,
    END OF I_FILE2.
    DATA: W_COUNT TYPE I.
    PARAMETERS: P_FILEN TYPE STRING,
    P_FILE2 TYPE STRING,
    P_NUM(4) TYPE N..
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILEN.
    PERFORM F_FILE_GET USING P_FILEN TEXT-G01.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE2.
    PERFORM F_FILE_GET USING P_FILE2 TEXT-G01.
    START-OF-SELECTION.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = P_FILEN
    FILETYPE = 'ASC'
    HAS_FIELD_SEPARATOR = 'X'
    HEADER_LENGTH = 0
    READ_BY_LINE = 'X'
    DAT_MODE = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    CHECK_BOM = ' '
    VIRUS_SCAN_PROFILE =
    NO_AUTH_CHECK = ' '
    IMPORTING
    FILELENGTH =
    HEADER =
    tables
    data_tab = I_FILE
    IF SY-SUBRC <> 0.
    MESSAGE E024(Z1).
    ENDIF.
    LOOP AT I_FILE.
    W_COUNT = W_COUNT + 1.
    IF NOT W_COUNT > P_NUM.
    MOVE I_FILE TO I_FILE2.
    APPEND I_FILE2.
    ENDIF.
    ENDLOOP.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE =
    filename = P_FILE2
    FILETYPE = 'ASC'
    APPEND = ' '
    WRITE_FIELD_SEPARATOR = 'X'
    HEADER = '00'
    TRUNC_TRAILING_BLANKS = ' '
    WRITE_LF = 'X'
    COL_SELECT = ' '
    COL_SELECT_MASK = ' '
    DAT_MODE = ' '
    CONFIRM_OVERWRITE = ' '
    NO_AUTH_CHECK = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    WRITE_BOM = ' '
    TRUNC_TRAILING_BLANKS_EOL = 'X'
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    IMPORTING
    FILELENGTH =
    tables
    data_tab = I_FILE2
    FIELDNAMES =
    *& Form F_FILE_GET
    text
    -->P_P_FILEN text
    -->P_TEXT_G01 text
    FORM F_FILE_GET USING L_FILENA L_TEXT.
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
    DEF_FILENAME = ' '
    DEF_PATH = ' '
    MASK = ',.,*.TXT.'
    MODE = 'O'
    TITLE = L_TEXT
    IMPORTING
    FILENAME = L_FILENA
    rc =
    EXCEPTIONS
    INV_WINSYS = 1
    NO_BATCH = 2
    SELECTION_CANCEL = 3
    SELECTION_ERROR = 4
    OTHERS = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Reward if helpful.
    Regards,
    Harini.S

  • How to introduce data in a database oracle

    how to introduce data in a database oracle from a text fields using jsp pages.
    supposing :
    my text field is nombreText
    my database fields is nombre_cliente
    �how guards-how saves!
    please.....

    http://developer.java.sun.com/developer/onlineTraining/Database/JDBC20Intro/

Maybe you are looking for