How can we load a flat file with very, very long lines into a table?

Hello:
We have to load a flat file with OWB. The problem is that each of the lines in the file might be up to 30.000 characters long (up to 1.000 units of information in each line, 30 characters long each)
Of course, our mapping should insert these units of information as independent rows in a table (1.000 rows, in our example).
We do not know how to go about it. We usually load flat files using table functions, but we am not sure that they will be able to cope with these huge lines. And how should we pivot those lines? Will the Pivot operator do the trick? Or maybe we should pivot those lines outside the database before loading them?
We are a bit lost. Any suggestion would be appreciated.
Regards
Edited by: [email protected] on Oct 29, 2008 8:43 AM
Edited by: [email protected] on Oct 29, 2008 8:44 AM

Yes, well, we could define a 1.000 column external table, and then map those 1.000 columns to the Pivot operator… perhaps it would work. But we have been investigating a little bit, and we think that we have found a better solution: there is a unix utility called “fold”. This utility can split our 30.000 character lines in 1.000 lines, 30 characters long each: just what we needed. Then we can load the resulting file using an external table.
We think this is a much better solution that handling 1.000 columns in the external table and in the Pivot operator.
Thanks for your help.
Regards
Edited by: [email protected] on Oct 29, 2008 10:35 AM

Similar Messages

  • How can I load a flat file using a different Work Station

    Hi Gurus,
    I'm having problems with loading Flat file in our Production Server when it comes to loading a file from another work station. The scenario is all the Info Packages needed are created in oour Dev Server. So the location of the flatfile is already define which is the developer's workstation. Now when the package is transported to the production server any changes to the package is not allowed inlcuding the location of the flatfile needed to be uploaded. Now my question is. is there a way that the location be changed in the production server without adding the package Z_BI because that will mean we can do changes in the production server. Thanks in Advance
    - Kit

    Directly you can not change the info package settings. You need do   change the status of Info package to changeable mode and then do necessary changes.
    RSA1 => Click on truck symbol (Object changeability) => select info package => right click => click on Switch changeability.
    Now do the changes to your Info Package.
    With Regards,
    Kishore.

  • How can I load a flat file into a ZTABLE dynamically

    I need to create a program which can Load a ZTABLE from a flat file structure (delimited and fixed options required).  We have many ZTables where this will be required so I was hoping to do it dynamically somehow.  Otherwise I will have to create one ABAP for every ZTable we have to load.
    My Inputs should be
    PARAMETERS:  p_ztable TYPE ddobjname,         "Z Table Name
                 p_infile(132) LOWER CASE,        "File Name
                 p_delim(1).                      "Delimiter
      I know that I can read the file by using gui_upload
        CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = c_infile
          has_field_separator     = p_delim
        TABLES
          data_tab                = indata
        EXCEPTIONS
          file_open_error         = 1
          file_read_error         = 2
            OTHERS                  = 9.
    I know that  I can split the contents of this file (if a delimiter is used).  However I will not know the actual field names of the table until runtime as to what to fields to split it into.  In the example below I have the actual table (t_rec) and each of the fields (pernr, lgart, etc) in the code but each table I
    need to load will be different – it will have a different # of fields as well.
    FORM read_data_pc.
      LOOP AT indata.
        PERFORM splitdata USING indata.
        APPEND t_rec.
        CLEAR t_rec.
      ENDLOOP.
    ENDFORM.
    FORM splitdata USING p_infile.
       SPLIT p_infile AT p_delim INTO
            t_rec-pernr                 "Employee #
            t_rec-lgart                 "Wage Type
            t_rec-begda                 "Effective date
            t_rec-endda.                 "End date
      ENDFORM.                       
    Once I split the data into the fields then I can just look and insert the record.
    Does anyone have any ideas?  Specific code examples would be great if you do.  Thx!!

    Hi janice,,
    Try this sample code where you can upload data from a flat file into the internal table.
    REPORT  z_test.
    TABLES: mara.
    FIELD-SYMBOLS : <fs> .
    DATA : fldname(50) TYPE c.
    DATA : col TYPE i.
    DATA : cmp LIKE TABLE OF rstrucinfo WITH HEADER LINE.
    DATA: progname LIKE sy-repid,
    dynnum LIKE sy-dynnr.
    DATA itab TYPE TABLE OF alsmex_tabline WITH HEADER LINE.
    DATA: BEGIN OF ZUPLOAD1_T OCCURS 0 ,
             matnr like mara-matnr,
             ersda like mara-ersda,
             ernam like mara-ernam,
             laeda like mara-laeda,
          END OF ZUPLOAD1_T.
    *DATA: ZUPLOAD1_T LIKE mara OCCURS 0 WITH HEADER LINE.
    DATA: wa_data LIKE TABLE OF  ZUPLOAD1_T WITH HEADER LINE.
    selection-screen
    SELECTION-SCREEN: BEGIN OF BLOCK blk WITH FRAME TITLE text-001.SELECTION-SCREEN : SKIP 1. PARAMETERS : p_file LIKE rlgrap-filename.SELECTION-SCREEN : SKIP 1.SELECTION-SCREEN : END OF BLOCK blk
    . AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    F4 Value for File
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'   EXPORTING
                          PROGRAM_NAME        = SYST-REPID
                          DYNPRO_NUMBER       = SYST-DYNNR
                          FIELD_NAME          = ' '
         static              = 'X'
                          MASK                = ' '
        CHANGING      file_name           = p_file   EXCEPTIONS     mask_too_long       = 1     OTHERS              = 2 
              .  IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    START-OF-SELECTION.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE' 
    EXPORTING    filename                      = P_FILE   
    i_begin_col                   = 1   
    i_begin_row                   = 1   
    i_end_col                     = 5   
    i_end_row                     = 12507 
         tables   
       intern                        = ITAB
    EXCEPTIONS  
            INCONSISTENT_PARAMETERS       = 1  
            UPLOAD_OLE                    = 2  
           OTHERS                        = 3.          .
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'GET_COMPONENT_LIST' 
    EXPORTING  
        program          = SY-REPID   
        fieldname        = 'ZMARA' 
           tables   
           components       = CMP.
    LOOP AT itab.    AT NEW row.     
    IF sy-tabix = 1.        APPEND ZUPLOAD1_T.     
    ENDIF.   
    ENDAT.   
    col = itab-col.   
    READ TABLE cmp INDEX col.  
    CONCATENATE 'ZUPLOAD1_T-' cmp-compname INTO fldname.  
    ASSIGN (fldname) TO <fs>.  
    <fs> = itab-COL.  
      APPEND ZUPLOAD1_T.  ENDLOOP.
    DELETE ZUPLOAD1_T where matnr eq space.
    LOOP AT ZUPLOAD1_T INTO wa_data.
    insert mara from  wa_data .
        WRITE: / ZUPLOAD1_T-matnr, 20 ZUPLOAD1_T-ersda , 45 ZUPLOAD1_T-ernam, 55 ZUPLOAD1_T-laeda.
    *HERE IAM JUST CHECKING I NEED TO UPDATE A ZTABLE
      ENDLOOP.
    insert ZMARA FROM table itab ACCEPTING DUPLICATE KEYS.
    I have tried it for mara.Please let me know whether it was helful.
    Regards,
    Kannan

  • How to load a flat file with utf8 format in odi as source file?

    Hi All,
    Anybody knows how we can load a flat file with utf8 format in odi as source file.Please everybody knows to guide me.
    Regards,
    Sahar

    Could you explain which problem are you facing?
    Francesco

  • How to load a flat file with lot of records

    Hi,
    I am trying to load a flat file with hundreds of records into an apps table. when i create the process and deploy it onto the console it asks for an input in an html form. why does it ask for an input when i have specified the input file directory in my process? is there any way around tis where in it just reads all the records from the flat file directly??is custom queues anyway related to what I am about to do?any documents on this process will be greatly appreciated.If any one can help me on this it will be great. thank you guys....

    After deploying it, do you see if it is active and the status is on from the BPEL console BPEL Process tab? It should not come up to ask for input unless you are clicking it from the Dashboard tab. Do not click it from the Dashboard. Instead you should put some files into the input driectory. Wait few seconds you should see the instances of the BPEL process is created and start to process the files asynchrously.

  • How can I open a cpr- file with snow leopard ?

    How can I open a " cpr " file with my Mac OS X 10.6.8. ?

    Thank you for your fast reply ! The recommended software referes to video data. I received the cpr file from the ALDI fotobook software, if a want to secure a footobook layout. Therefor cpr must be a foto file.

  • How can I automatically create the files with serie-name?

    Hello, Everyone,
    I have a question again.
    How can I automatically create the file with a serie-filename?
    e.g. I have a program, it will repeat 5 times, and every time it will create a bmp-file, and I want to let this program automatically save these 5 files with a Serie-filename like File001.bmp, File002.bmp, .... File005.bmp.
    How can I do it?`
    Thanks a lot.
    Regarts,
    Johnny

    Hi Deepu,
    one more comment
    The format code should be "%04d" to get leading zeros and have filenames with same length...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to load the .xml file list from 'C:\Drag_list\Modif into xmltype table?

    Hi all experts,
    I am in Oracle Enterprise Manager 11g 11.2.0.1.0.
    SQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 22 11:40:23 2011
    is there anyone know why
    SQL> create or replace directory XMLDIR as '/xdb/faq/testdata'
    2 /
    SQL> set long 10000 pages 200 lines 150
    SQL> --
    SQL> select xmltype(bfilename('XMLDIR','2003.xml'),nls_charset_id('AL32UTF8'))
    2 from dual
    worked. but
    SQL> create or replace directory XMLDIR as 'C:\Drag_list\Modified';
    SQL> select xmltype(bfilename('XMLDIR','2011.xml'),nls_charset_id('AL32UTF8'))
    from dual
    did not work?
    IS there any way I can load the .xml file list from 'C:\Drag_list\Modified' into xmltype table?
    Thanks.
    Edited by: Cow on Apr 13, 2011 12:58 AM

    This is a question better suited for the sql and pl/sql support forum, since it is NOT an APEX based question..: PL/SQL
    Thank you,
    Tony Miller
    Webster, TX
    On the road of life...There are 'windshields', and there are 'bugs'
    (splat!)
    "Squeegees Wanted"
    If this question is answered, please mark the thread as closed and assign points where earned..

  • How can I load a .pst file to an instrument in logic express 9?

    I have some instruments plug-in settings from my old computer that I used with logic, and I want to load them into logic so I can use them on the computer I moved them to. On any instrument I try (ES1, ES2, EXS24 and the rest) it won't allow me to load the files (.pst files) and I know I should be able to. Am I just going about it wrong or using the wrong instrument? How can I load these files so that I can use the instruments again?

    Pages is not in a format compatible for what you want to do.
    After you save a a Pages document, go to File > Export > and choose either Word or Pdf format. You can also choose RTF or PlainText too. Then you can email to yourself or others.
    Good Luck.
    Adam

  • How can (parse) i use XML file with missing EndTag

    hi,
    i have an application which writes an "XML file".
    another application should read that XML file, build an DOM and
    access the nodes with xpath.
    my problem. if the first application is not finished there are tags
    missing. e.g. </xml>. but the seconds application cannot wait until the first application finishes it task.
    if i now read the XML file the parser cannot load it because the end tags are missing.
    my question:
    how can i deactivate the check or how can i read the XML file and access it via XPath (my application is using at the moment XPath to access the nodes and i dont want to change that)
    as parser i am using XERCES
    alex

    As far as I know, you can't do this - xml must be well formed (this is sort of a bedrock of xml). There may be some work around's, but I'm not aware of any - and they would most likely be hacks.

  • I can not load a flat file

    I'm from chile, sorry for my English writing
    could be supported with the following error please.
    Error
    RPE-01013: SQL Loader reported error condition, number 1.
    LRM-00112: multiple values not allowed for parameter 'control'
    SQL*Loader: Release 10.2.0.3.0 - Production on Thu Oct 14 12:02:55 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL*Loader-100: Syntax error on command-line
    This happens when I try to load a flat file (CSV)
    thank you very much for your help

    This seems to be an error coming from Oracle SQL*Loader "SQL Loader reported error condition, number 1.".
    How do you access your csv - file? Is the error occurring within OWB deployment?

  • How can I create a exe file with a tab control on it that work´s ?

    I have a VI with many controls and indicators,these are spread on a tab control.This tab control works with out any problems but if i create a exe file then the tab control is fixed. How can I create a exe file so that the tab control on it work´s ?

    I have made a new Posting with the same question but this time I added a screenshot of the VI.
    Attachments:
    project7.1.jpg ‏129 KB

  • How can i compare two excel files with different no. of records.

    Hi
    I am on to a small project that involves us to compare two excel files. i am able to do it but am struck up at a point. When i compare 2 different .csv files with different no. of lines i am only able to compare upto a point till when the number of lines is same in both the files.
    Eg. if source file has 8 lines and target file has 12 lines. The difference is displayed only till 8 lines and the remaining 4 lines in source lines are not shown.
    Can you help me in displaying those extra 4 lines in source file. I am attaching my code snippet below..
    while (((strLine = br.readLine()) != null) && ((strLine1 = br1.readLine())) != null)
                     String delims = "[;,\t,,,|]";
                    String[] tokens = strLine.split(delims);
                    String[] tokens1 = strLine1.split(delims);
                   if (tokens.length > tokens1.length)
                    for (int i = 0; i < tokens.length; i++) {
                        try {
                            if (!tokens.equals(tokens1[i])) {
    System.out.println(tokens[i] + "<----->" + tokens1[i]);
    out.write(sno + " \t" + lineNo1 + " \t\t" + tokens[i] + "\t\t\t\t" + tokens1[i]);
    out.println();
    sno++;
    } catch (Exception exception)
    out.write(sno + " \t" + lineNo1 + " \t\t" + tokens[i] + "\t\t\t\t" + "");
    out.println();
    Thanks & Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    A CSV file is not an Excel file.
    But apart from that your logic makes no sense.
    If the 2 files are of different sizes the files are different by definition, so further comparison isn't needed, you're done.
    If you want to compare individual records, you need to compare all records from one file with all records from the other, unless the order of records is important in which case your current system might work.
    That system however is overly complicated for comparing CSV files.
    As you assume a single record per line, and if one can assume those records to have identical layout (so no leading or trailing whitespace in or between columns in one file that's not in the other) comparing records is simply a matter of comparing the entire lines.

  • How can i write a XML file with oracle data ?

    How can i write a XML file using PL/SQL.
    Can i do as follows.
    1.Open a file using UTL_FILE.FOPEN(LC_DIR_LOC,'abc.xml','W')     ;
    2.write all the required tag and value using UTL.put_line
    that is enough. Is not, please guide me to write.
    gk

    Having Oracle 9i.
    One more doubt. In the speck, some constand values are there, When i write the same into file, How can i write ?.
    1. l_str := ' "E27" '
    or
    2. l_str := ' E27 '
    UTL_FILE.PUT_LINE(L_FILE_POI,l_str,TRUE);          
    1 case : in XML file : "E27"
    In 2 case : E27
    When we write a XML file through editors , we have to define the constant within quote . is it?      
    Which one can i use ? Or any other way is there ..
    Thanks and Regards
    gopi

  • IMac 10.5.8 is stuck on Apple logo loading screen , how can I back up my files with an external hard drive ?

    so my iMac (10.5.8 its pretty old ) got stuck on the apple logo loading screen (as I call it lol) and it will not go beyond that .I've already made and appointment for the genius bar but now would I back up my files with an external hard drive ? No unfortunately I don't have any other laptop or computer just the external hard drive. how would I back it up? Does it have something to do with "target disc mode"?

    Hi,
    Thank you for great advice re SuperDuper.
    You wasnt to know we didnt live in  USA.  We will try to get the full retail version of Leopard off the net.  We will also phone round the apple resellers.
    In the meantime, we are happy running Tiger with the knowledge that SuperDuper has cloned our hard drive in case of a disaster.
    SuperDuper recommended backing up the hard drive with a new user account if we were using filevault on the master account.  We backed up our hard drive without creating a new user with filevault as we could not read the pdf `Instuctions as preview was not responding.
    Is this copy safe to use as a bootable drive or should we copy our entire HD again using a new user account without filevault?
    Keith & Shem  

Maybe you are looking for

  • How to change number of records displayed in Web service: Query_view_data

    Hi experts I´m using webservice Query_view_data to fill a Xcelsius model with data. The Bex Query contains appr. 300 records but the webservice returns only 50 records. When I test it it says "displaying 50 of 312 records". When I tried ABAP FM RRW3_

  • Can we pass delimeted file through PI without converting it to XML ?

    Hi All, I will be getting File from Sender in Inbound Payload as delimitted file and not in XML structure using XI adapter. So can you please suggest on how I need to do mapping as file will be passed as it is and which need to transfer from Sender t

  • Issue Related to Billing Document F2 with same Invoice Number.

    Hi All, I have 3 Sales Order with 2 Sales Order belonging to Sales Org A and one belonging to Sales Org B. The Invoice generated for all the deliveries for Sales Order has the same Invoice Number. As per the standard functinality it is not possible t

  • How to use Time Capsule with USB HD attached

    I recently bought a 500 mb TC, so am somewhat a newbie to it, and am already wondering if I should have bought the 1 Terrabyte model. I am trying to figure out exactly how I can use the USB HD facility on the TC. Is the point of this that I can achie

  • Startup Error in CM repository in fsdb mode

    Hi all, I have configured CM repository in fsdb mode.I am getting the following error in the Component Monitor " Startup Error:  folder ' <server name>\<shared folder>\Root' has no canonical file " Can anybody tell me what does this error mean? Thank