Uploading a flat file into Oracle

Hello guys
Can somebody please help me. I've got a flat file that i want to read into oracle via UTL Package. I can read the file successfully if I manually replace the dots with underscores. But when I receive the file, before I upload it into Oracle, it comes in with dots on the file name. eg. The file looks like this: 'IS.DIM16.EFTS.GG24.INTAUD.TEST_20090219105728' then I have to manually replace the dots with underscores to make the file look like this: 'IS_DIM16_EFTS_GG24_INTAUD.TEST_20090219105728'.
I don't want to change it manually. Is there a way to replace the dots with underscores before I read the file? Or is the a way to make Oracle read the dots? I've tried uploading the file with the dots but it gives me this error:
ORA-29283: invalid file operation.
Your help would be greatly appreciated.
Thanks

When i try this, i don't get any error. Can you be more specific ? Code , Expample , OS, version ....
DECLARE
v_handle utl_file.file_type;
BEGIN
v_handle:= utl_file.fopen ('/enspac03/output/ao/in','IS.DIM16.EFTS.GG24.INTAUD.TEST_20090219105728','r');
dbms_output.put_line ('Open');
utl_file.fclose(v_handle);
END;

Similar Messages

  • To upload a flat file into BW using a variable entry in web application

    hi guys,
    how to upload a flat file into the web browser using a
    a variable entry in the wad application.
    Thanks,
    your help will be duly appreciated
    Message was edited by:
            Vj.R T

    thanks arun
    but is it not possible to load the flat file at bex level which
    might be the same at wad level
    and also what do you mean the load package
    triggered from the backend and how do i
    manipulate the data is it at bex level or wad level
    please elaborate.
    thanks
    your help will be rightly acknowledged.

  • How to upload a Flat file into sap database if the file is in Appl'n Server

    Hello Sap Experts , Can you tel me
    " How to upload a Flat file into sap database if the file is in Application Server.
    what is Path for that ?
    Plz Tel Me its Urgent
    Thanks for all

    Hi,
    ABAP code for uploading a TAB delimited file into an internal table. See code below for structures.
    *& Report  ZUPLOADTAB                                                  *
    *& Example of Uploading tab delimited file                             *
    REPORT  zuploadtab                    .
    PARAMETERS: p_infile  LIKE rlgrap-filename
                            OBLIGATORY DEFAULT  '/usr/sap/'..
    DATA: ld_file LIKE rlgrap-filename.
    *Internal tabe to store upload data
    TYPES: BEGIN OF t_record,
        name1 like pa0002-VORNA,
        name2 like pa0002-name2,
        age   type i,
        END OF t_record.
    DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
          wa_record TYPE t_record.
    *Text version of data table
    TYPES: begin of t_uploadtxt,
      name1(10) type c,
      name2(15) type c,
      age(5)  type c,
    end of t_uploadtxt.
    DATA: wa_uploadtxt TYPE t_uploadtxt.
    *String value to data in initially.
    DATA: wa_string(255) type c.
    constants: con_tab TYPE x VALUE '09'.
    *If you have Unicode check active in program attributes then you will
    *need to declare constants as follows:
    *class cl_abap_char_utilities definition load.
    *constants:
    *    con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB.
    *START-OF-SELECTION
    START-OF-SELECTION.
    ld_file = p_infile.
    OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    ELSE.
      DO.
        CLEAR: wa_string, wa_uploadtxt.
        READ DATASET ld_file INTO wa_string.
        IF sy-subrc NE 0.
          EXIT.
        ELSE.
          SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
                                          wa_uploadtxt-name2
                                          wa_uploadtxt-age.
          MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.
          APPEND wa_upload TO it_record.
        ENDIF.
      ENDDO.
      CLOSE DATASET ld_file.
    ENDIF.
    *END-OF-SELECTION
    END-OF-SELECTION.
    *!! Text data is now contained within the internal table IT_RECORD
    * Display report data for illustration purposes
      loop at it_record into wa_record.
        write:/     sy-vline,
               (10) wa_record-name1, sy-vline,
               (10) wa_record-name2, sy-vline,
               (10) wa_record-age, sy-vline.
      endloop.

  • Load flat file into oracle with SQL Loader

    Hi All,
    Oracle 9i
    I want to load flat file into oracle with the help of sqlloader but I want to skip some columns from flat file.
    Can anyone tell me how can we skip column from flat file , I can’t open flat file into excel as CSV due to large volume
    Does anyone has any solution for the same.
    Umesh Goel

    Filler can be use when we want to skip database table column or we want to put null in database table column
    but if we have 10 column in flat file and we want to load 1,2,5,7 number column from flat file
    then I think filler will not work
    If yes then plz let me know.
    thx
    UG

  • How to upload a flat file into a Z DB table

    Hi All,
    For a planning application I would like to permit our users to upload a flat file to a internal table to be persisted on to any given database Z Table. From here we would use it in a planning application.
    Please kindly share the code and approach to implement this in BSP.
    Thanks
    Karen

    Hi Karen,
    Check the links mentioned below.
    [Excel to internal table|Excel to Internal table in BSP;
    [upload excel into BSP|upload excel sheet into BSP application;
    The two links show how to convert an excel file data to internal table in BSP application.Similarly you can convert the flat file data to internal table and then modify the Z DB table to store the data from internal table.
    Regards,
    Anubhav

  • Reading a flat file into Oracle

    Can someone tell me the best way to read a flat file into Oracle8i?

    You can use SQL*Loader
    or programmatically with UTL_FILE package.
    (Please see documentation of SQL*Loader
    and using predefine package UTL_FILE)

  • Uploading Data from a Flat file into Oracle Database

    Hi,
    I am a novice to Java . SO, please bear with me. I have a reqiurement where I have a flat file or excel file from which I need to read the data and insert into Oracle Database. The falt file will exist on the client machine. I have been reading and I see this can be done through I/O Streams. Correct me if I am wrong. I am looking for a sample code to get started. Any Java expert has an answer for it, I will appreciate it.
    Thanks

    Try UploadBean. It allows to upload files (from a browser) in Oracle.
    http://www.javazoom.net/jzservlets/uploadbean/uploadbean.html
    You will find JSP and servlet samples.

  • How to allow users to upload a flat file to BW

    Hi All,
    For a planning application I would like to permit our users to upload a flat file on their local desktop to the infopackage and execute the load.
    We would like to empower the users to prepare and upload their flat files into BW from their desktop without asking for BW support.
    Please let me know if any of you have followed this approach.
    Thanks
    Karen

    Hi,
    The possible steps..
    1. Create a small program and then give
    Selection Screen:
    FIle name : -
    Note: Ask users give always same file name i.e. xyz.csv
    Once user will give file name and execute it then file will save in Application Server (You fix the path like  /usr/sap/BI1/DVEBMGS00/work, you create seperate folder in Application server)
    2. Create a small Program with is using Events..
    REPORT  ZTEST_EV.
    DATA: EVENTID LIKE TBTCJOB-EVENTID.
    DATA: EVENTPARM LIKE TBTCJOB-EVENTPARM.
          EVENTID = 'ZEVENT1'.
          EVENTPARM = 'ZEVENTPARAM'.
    CALL FUNCTION 'RSSM_EVENT_RAISE'
              EXPORTING
                I_EVENTID                         = EVENTID
                I_EVENTPARM                  = EVENTPARM
              EXCEPTIONS
               BAD_EVENTID                            = 1
               EVENTID_DOES_NOT_EXIST       = 2
               EVENTID_MISSING                     = 3
               RAISE_FAILED                           = 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.
    3. Once user will upload the file in Step 1, then he need to run this Program,.
    4. You craetea Process Chain using this Event, then once User will run this program then the Data Loads will happen through Process Chain.
    Note: Eventhough this is lengthy process, it is protected 100%, because we are not giving any access to User, we just given reports/programs to execute.
    Thanks
    Reddy
    Thanks
    Reddy

  • How to read and upload microsoft word file into database using forms9i

    Hi,
    How to read and upload microsoft word file into oracle database using forms9i. I appretiate if anyone can send me example or atleast a sujjetion.
    Thanks in advance
    Mahesh Ragineni

    The webutil package includes the ability up upload from the client to the database. See otn.oracle.com/products/forms and click on webutil for more details.
    Regards
    Grant Ronald
    Forms Product Management

  • Trouble Loading a flat file into BPS using a Web Browser, Please help ?

    Hi Gurus,
    I'm in BW 3.5.
    I did everything and also followed the How to .. paper to upload a flat file into BPS tran cube via a Web browser.
    I created a Web Browser and generated a BSP application. When I run the BSP application I get the following error:
    "The generated data is not contained in the selection condition" UPC204
    The error message also says:
    "The error message can appear when you use a planning function to generate data that is outside the data range specified by the selection conditions of the planning package"
    When I save the variables that I select in the web interface they are getting saved in a table(UPC_VAR_CHA_ACT), but somehow the BSP application cannot look into those values, which I think is the cause of above issue.
    Please help.
    Venkat

    Hi,
    This type of error is quite common in BPS operations. This generally happens due to some missing values in the restriction of the planning levels and the packages.
    The error message is "The generated data is not contained in the selection condition" UPC204
    Check in the planning level and the package, all the restrictions that have been defined and verify whether the values which are getting uploaded through the flat file are present in the election condition of the level or in the package.
    Please award points if helpful.

  • How to load 2 fields out of 3 from flat file to Oracle in one interface?

    Hi,
    Is there any way to selectively load flat file into oracle within one interface. For example if my flat file has this structure:
    test_cid
    test_ind
    test_data
    and my table is:
    test_code ( correspond to test_cid above)
    test_data (correspond to test_data above)
    That can be done with two interfaces ( first to load the file into oracle staging and second to load the target oracle table from staging oracle table). Is there a way to make it in one interface?
    Edited by: vzaslav on Oct 21, 2009 1:26 PM

    That works for small tables. For big tables you need to accomodate for extra space as you will need to have at least twice as much space for working/integration tables and that is what we are trying to avoid.
    In fact I was able to modify the LKM to load the file into oracle, however my integration step fails and I cannot make it work. To make lkm work one need to change getColList in create working table/generate ctl file steps to getSrcColList. That will create the working table based on source file structure and not on target table structure.
    That doesn't work for IKM however. Any ideas would be appreciated.
    Thank You.

  • Uploading the data from a flat file into ztable

    Hi,
    I have a requirement where I have to upload the data from 2 flat files into 2 z tables(ZRB_HDR,ZRB_ITM).From the 1st flat file only data for few fields have to be uploaded into ztable(ZRB_HRD) .Fromthe 2nd flat file data for all the fields have to me uploaded into ztable(ZRB_ITM). How can I do this?
    Regards,
    Hema

    hi,
    declare two internal table with structur of your tables.
    your flat files should be .txt files.
    now make use of GUI_UPLOAD function module to upload your flatfile into internal tables.
    CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = 'c:\file1.txt'
          has_field_separator = 'X'
        TABLES
          data_tab            = itab1
        EXCEPTIONS
          OTHERS              = 1.
    use this function twice for two tables.
    then loop them individually and make use of insert command.

  • Help Required:How Upload Excel file Into Oracle Table Using PLSQL Procedure

    Please Help , Urgent Help Needed.
    Requirement is to Upload Excel file Into Oracle Table Using PLSQL Procedure/Package.
    Case's are :
    1. Excel File is On Users/ Client PC.
    2. Application is on Remote Server(Oracle Forms D2k).
    3. User Is Using Application Using Terminal Server LogIn.
    4. So If User Will Use to GET_FILE_NAME() function of D2K to Get Excel File , D2k Will Try to pick File from That Remote Server(Bcs User Logind from Terminal Server Option).
    5. Cannot Use Util_File Package Or Oracle Directory to Place That File on Server.
    6. we are Using Oracle 8.7
    So Need Some PL/SQL Package or Fuction/ Procedure to Upload Excel file on User's Pc to Oracle Table.
    Please Guide me wd some Code. or with Some Pl/SQL Package, or With SOme Hint. Or any Link ....
    Jus help to Sort This Issue ........
    you can also write me on :
    [email protected], [email protected]

    TEXT_IO is a PL/SQL package available only in Forms (you'll want to post in the Forms forum for more information). It is not available in a stored procedure in the database (where the equivalent package is UTL_FILE).
    If the Terminal Server machine and the database machine do not have access to the file system on the client machine, no application running on either machine will have access to the file. Barring exceptional setups (like the FTP server on the client machine), your applications are not going to have more access to the client machine than the operating system does.
    If you map the client drives from the Terminal Server box, there is the potential for your Forms application to access those files. If you want the files to be accessible to a stored procedure in the database, you'll need to move the files somewhere the database can access them.
    Justin

  • 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

  • Problem in upload flat file into BW-BPS

    Hi All,
    I have created created to function modules, planning function, parameter group created new web interface using transaction BpS_WC and added new BSP page to the web interface in SE80. Everything seems to be fine but its not working, when try to run the genarated URl, its showing nothing just showing blank page.
    Please help me to how to make it work to upload a flat file through webinterface. Thanks in advance.
    Regards,
    Vishal

    Hi Vishal,
    i hope you are using following How to paper
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7f6dd590-0201-0010-bca8-b1bb91f6951b
    We have implemented the same solution using above How to Paper and it is working fine for us.
    Hope it will help you.
    Regards
    Tarun

Maybe you are looking for

  • Huey Pro calibrator- error message  display measurement Error

    i am using this huey pro calibration.. it had been a year without problem... but now i am trying to calibrate my apple cinema display LCD 30 inch it keep saying error message- display measurement error.. and huey support never answer my e-mail. any i

  • Why did apple remove the superdrive from the current mac mini model?

    Also why does the standalone superdrive (USD $79) ONLY work with server version of the current Mac Mini?  Does not make sense.  Was just thinking of buying a mac mini when they changed the line about 2 months ago.  I still use DVD's and CD's as I am

  • Inserting Timestamp INTO messages.

    I know how to view the timestamp on Messages on the iPhone. I know I can swipe and see that. I want to have a timestamp INCLUDED in my messages - so that people receiving messages from me see the time stamp of when I wrote the message, not when they

  • How to Document a FieldPoint Configuration File (*.iak)

    Hello there, Is there a quick and easy way to generate a human readable FieldPoint Configuration File? I'm documenting an existing system from scratch and I can't see an easy way to do this, apart from captured screen shots from MAX - which is tediou

  • Finding out my BT number while on virgin

    Hello I have recently moved address and, in the new house, i am without an aerial on my roof - so i was forced to pick an ISP that offered TV & broadband packages. I went for virgin media at the time and i can safely say it was a bad option. I'm look