Flat File as Target - MultiRecord Type

How do I write from Oracle into a Flat File as Target where the data in Flat file is a multirecord type. For ex. Sales Order header and Sales Order Line info.
I tried to do this by using a Joiner to the sales order header, line and items table and then mapping outgrp of joiner to the Flat file data with two record types in it. But when I generate and run this it could only create header records in out put file

Dear 396217,
As far as I am concerned you cannot really push out to a multi record structure without manual intervention.
There are a few things you can do: on the target (not sure whether that was already available in 9.0.3... but it definitely is in 9.0.4) you can set the flat file as a target to generate field names as headers. If that is what you want... then great.
The initial scenario: orders and order items in one model, is not supported. What you could do... is write a transformation to do this. Use calls to UTL_FILE to implement those and generate your own records. Primitive... but it works.
Alternatively, create 2 files and have a separate external process merge these. Not ideal; I realize that.
Mark.

Similar Messages

  • Flat File with multiple record types (OWB 10.2.0.2)

    Hi!
    I`m using OWB 10.2.0.2 and I`m trying to load a flat file with multiple record types, using SQL LOADER.
    In the flat file editor in the Record tab, I`ve set the type values and the corresponding record names like this:
    Type Value Record Name
    ======== ===========
    T TRAILER
    0 DETAILS
    1 DETAILS
    2 DETAILS
    When using this flat file in a mapping to load the data in a staging table, the generated code looks like this:
    INTO TABLE TRAILER
    TRUNCATE
    REENABLE DISABLED_CONSTRAINTS
    WHEN (1:1) = 'T'
    INTO TABLE DETAILS
    APPEND
    REENABLE DISABLED_CONSTRAINTS
    WHEN (1:1) = '0,1,2'
    The above clause (WHEN (1:1) = '0,1,2') is wrong as I expect one "INTO TABLE..." clause for each record type.
    Could this be a bug or am I doing something wrong?
    Thanks a lot for your help,
    Yorgos

    We`re using two target tables, one for the trailer record and the other for the details records.
    We are facing this problem from the moment we upgraded from OWB 10.1 to OWB 10.2.0.2, so we think it must be something with the way the sql loader code is generated in the new version.
    As our data sources are mainly flat files coming from mainframes, this is a huge problem for us. We even asked an expert in DW from Oracle to help us on this, but still haven`t found a solution.
    Is there any workaround for this or should we forget sql loader and go with an external tables + custom PL/SQL code solution?
    Your help is greatly appreciated Jean-Pierre.
    Regards,
    Yorgos

  • Flat file as targets in a mapping.

    Hi All,
    While reading on-line documentation in topic Define Mappings of oracle9i warehouse builder i came across following statement.
    "A mapping can contain up to 50 flat files as targets, and it can also contain mix of flat files, relational objects and transformations."
    Does this mean a flat file can be used as target in a mapping? I am in impression that only flat file can be used as source in a mapping.
    Thanks in Advance.
    Regards,
    Vidyanand

    Hi Igor,
    Some update on this, I managed to find steps to include flat file as target in a mapping.
    Steps followed were as follows.
    1> Created a File Module.
    2> Imported a Text File with headings and no records.
    3> Created a Warehouse Module.
    4> Imported scott.dept table into the module.
    5> Created a mapping, mapped scott.dept table to the text file.
    6> Selected Configure option in the mapping. Set parameters Thefilename = the above file name and Access Specification).
    7> Validated & Generated map, it looks fine with no errors.
    8> Deployed & run the package.Deployment didn't show any errors however while running displays error ORA-01403: no data found.
    Please note that the utl_file_dir parameter is set on oracle server and the utl_file_dir is mapped in windows NT explorer from machine.
    Does anyone knows more about this error?
    Thanks in Advance.
    Regards,
    Vidyanand

  • Flat file to target table map in 11G

    Hi,
    I am havin many problem with my 10G R1 map that have been migrated to 11G.
    all that my 10G map has is mapping from flat file to stage table. It also had one constant operator. i am getting error coz of this constant that i am setting up in the map.
    when i validate this constant variable i get error mess:
    API8534:Validation no supported for language SQLLOADER,property Expression for SAASD_MAP
    -- Generator Version : 11.1.0.7.0
    -- Created Date : Mon May 11 21:16:25 CDT 2009
    -- Modified Date : Mon May 11 21:16:25 CDT 2009
    -- Created By : OWB_WUSER
    -- Modified By : OWB_WUSER
    -- Generated Object Type : SQL*Loader Control File
    -- Generated Object Name : "SADAD_MAP"
    -- Copyright © 2000, 2007, Oracle. All rights reserved.
    OPTIONS (BINDSIZE=50000,ERRORS=50,ROWS=200,READSIZE=65536)
    LOAD DATA
    CHARACTERSET WE8MSWIN1252
    INFILE '{{ETL_FILE_LOC.RootPath}}{{}}dgp.dat'
    BADFILE '{{ETL_FILE_LOC.RootPath}}{{}}dgp.bad'
    DISCARDFILE '{{ETL_FILE_LOC.RootPath}}{{}}dgp.dis'
    CONCATENATE 1
    INTO TABLE "STAGING"."DGP_STAGG"
    APPEND
    REENABLE DISABLED_CONSTRAINTS
    WHEN (1:2) = 'EM'
    "PHONE_COUNTRY" CONSTANT ''Asia'',
    "MRI" POSITION(1:2) CHAR(2) ,
    if you note 11G some how does not allow me to have constant operator in flat file maps. and the constant for PHONE_COUNTRY column is enclosed in double quotes insted of single quotes.[should be 'Asia' and not ''Asia'']
    can any one tell me why this is heppening?...i also have problem with the READ BUFFER property. which in 10G used to be defulted to '4' but ignored which generating the .ctl but in 11G this property creates READ BUFFERS statement in .ctl....any help in this will be grt.
    Edited by: user591315 on May 12, 2009 7:39 AM

    if you note 11G some how does not allow me to have constant operator in flat file maps. and the constant for >PHONE_COUNTRY column is enclosed in double quotes insted of single quotes.Hi
    Please open the same mapping in 10g R2 its same .
    It use Double code around the column name.
    By the way execute the mapping and then check are you getting desired result.

  • Load data from flat file to target table with scheduling in loader

    Hi All,
    I have requirement as follows.
    I need to load the data to the target table on every Saturday. My source file consists of dataof several sates.For every week i have to load one particular state data to target table.
    If first week I loaded AP data, then second week on Saturday karnatak, etc.
    can u plz provide code also how can i schedule the data load with every saturday  with different state column values automatically.
    Thanks & Regards,
    Sekhar

    The best solution would be:
    get the flat file to the Database server
    define an External Table pointing to that flat file
    insert into destination table(s) as select * from external_table
    Loading only single state data each Saturday might mean troubles, but assuming there are valid reasons to do so, you could:
    create a job with a p_state parameter executing insert into destination table(s) as select * from external_table where state = p_state
    create a Scheduler chain where each member runs on next Saturday executing the same job with a different p_stateparameter
    Managing Tables
    Oracle Scheduler Concepts
    Regards
    Etbin

  • Flat Files as Targets

    I am working on Oralce Warehouse Builder(9.2). I would like to extract data from Oracle Db(8.1.7.4) and then transform to Flat Files...Could any one help me out how to set target as Flat files. or Is it possible to do that? your help would be highly appreciated.
    Thanks,
    Srikanth.

    Srikanth,
    Check out the user's guide (http://www.oracle.com/technology/documentation/warehouse.html):
    - http://download-west.oracle.com/docs/html/B12146_01/defsource.htm#sthref836
    - http://download-west.oracle.com/docs/html/B12146_01/mappings.htm#sthref1327
    - http://download-west.oracle.com/docs/html/B12146_01/mapoperators.htm#sthref1599
    - http://download-west.oracle.com/docs/html/B12146_01/configetl.htm#sthref2302
    Thanks,
    Mark.

  • FM to create a flat file in given IDOC type format

    Hi,
    I need to create a flat file having IDOC format.
    I have data in some other source file.
    Which function module can be used for the same?
    Could you pls provide some sample code?
    Appreciate the help.
    Thanks.
    -Shreyas

    My Exact requirement is:
    I have some data in a source file.
    Now I want to create a flat file while which should be in a standard IDOC format(WMMBID02) so that I can process it later using IDOC processing say EDI_DATA_INCOMING or any appropriate FM which will process IDOC later.
    I dont want IDOC to be created in the system right now. I just need to reformat my source file into a standard IDOC format flat file.

  • How to use Flat files as targets

    The root path of location LOC_FLAT_TGT must be specified as one of the file paths for the UTL_FILE_DIR parameter in the init.ora for the runtime instance. The root path of location LOC_FLAT_TGT must be a file path on the server.
    Thanks in Advance,
    Jash

    Hi,
    This is basically saying, either use the value of UTL_FILE_DIR of the runtime instance while registering your Target File Location
    OR
    ask your DBAs to change the UTL_FILE_DIR to the directory path where you want to place your files..........
    HTH
    Mahesh

  • Flat file to Target Table Mapping.

    Hi All,
    OWB Client 9.0.2.56.0
    OWB Repository 9.0.2.0
    WIN - NT 196 MB RAM.
    I created a mapping which involved a fixed width text file
    ( Size of text file is 5 MB & number of columns around 28), applied some filter criteria & performed insert operation in a target table.
    All seems to be fine, i could validate the mapping without errors & generate the mapping. I can save newly generated control file & uploaded the data into the target table using sqlldr. However it seems even after i selected Close command button in Generate Result window nothing happens, only way i can exit from this is by killing the session & this result in auto deletion of newly created mapping (Even though i commit the changes before selecting Close command button in Result Window).
    Is this happening due to memory constraint ? ( I am aware that for OWB recommended RAM is around 256 MB.).
    Just to add more i am experiencing this only for one specific mapping.
    Thanks in Advance.
    Regards,
    Vidyanand

    Hi,
    The error while I was getting earlier was solved. I have placed the schema as "target.<tablename>" in the table operator counfiguration while configuring the mapping.
    But now I am getting the error
    SQL*Loader-350: Syntax error at line 22.
    Expecting "(", found ".".
    INTO TABLE "target.custfile_target"."CUSTFILE_TARGET".
    Please suggest on how to proceed now as i am not able to find how and where i can correct such syntax error in OWB.
    Regards.

  • SQL Server Source and Flat File Target in OWB

    Hello All,
    I have a question, is it possible to have SQL Server as Source and Flat File as Target without using any intermediate Oracle table(s).
    like
    SQL Server --> ETL Operators --> Flat file?
    as i m getting errors in data type conversions here. but if i replace flat file with Oracle table it works fine. (though i have used some conversion functions for data types as well in Flat file loading but it is giving me errors)
    Thanks in advance.
    Tayyeb

    Yes this should be fine. Are you using the gateway to access SQLServer or code template mappings? You need to track which columns are throwing the data type conversion errors.
    Cheers
    David

  • Flat file as source and target in owb-error

    hi,
    I want to run an interface with source as flat file and target as rdbms table.
    The mapping got deployed with warnings.
    And when i run the mapping i get the below error.
    ORA-04063: package body "Schema.project_name" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "schema.project_name"
    ORA-06512: at line 1

    Hi
    There's nothing wrong with your theory, however you might get a DB lock depending on the locking strategy of your RDBMS and it's current configuration.
    Now, assuming that DB locking is your issue (get a DBA to check when the dataflow stalls), there are 2 solutions. 
    1, change the DB lock settings
    2, take a copy of the target table in a new dataflow and use that as the source in the orginal dataflow.
    Michael

  • Need Flat file for Message type DELINS

    Hi Experts,
      It possible to see the flat file for the Message type DELINS ,, If needed means please say how it can  view..
    Advance thanks..

    >My need is to convert the EDI format into SAP.
    As far as I know EDI can be read by SAP as Idoc directly without conversion. At least I would try this.
    I checked in WE20 /partner profiles/ for outbound parameters there is a tab called 'EDI standards' and here you can define the EDI parameters. However there is no such tab for inbound processing.
    What I would do /using transaction code SALE/
    - define logical systems
    - assign the received to the client
    - create RFC port for Idoc processing
    - create distribution model with the correct message type
    - create port as file
    - define or generate partner profiles
    Try to upload sample files via transaction WE19 or WE16.
    You can try to debug the inbound processing and write a program based on that, which could be scheduled as a background job.
    I had a program doing similar, but it was another message type and it was XML based, however the FMs I used are the following:
    'EDI_PORT_READ' - read port definition
    'EPS_GET_DIRECTORY_LISTING' - get the file names in the dir
    'EDI_DATA_INCOMING' - process idocs
    Hope it helps.
    Peter

  • Converting a flat file to IDOC

    Greetings to All,
    I have a requirement where i need to convert an IDOC (flat) file to IDOC.
    the idoc is SHPMNT04.Presently i am trying to implement it using FCC at the sender side as the flat file is fixed length type.
    Can any one suggest me a better method like using XSLT or Java mapping which could make my work smarter as i am Finding it very difficult to count and write the FCC for the IDOC which is have more than 60 segments.
    Any help will be greatly admired.
    Thnaks,
    Anika.

    Hi
    I am still having a doubt if this method will work on real time scenario.I mean i have to pick files
    from an 3rd party FTP location (polling and picking as and when i get a file starting with say
    ABC*.txt).Added to this there will be issue related to the volume of file(1000 per day),will that create
    any performance issues.
    It is now that you are sharing the complete scenario/ problem , just have a glance from your first post at the top & the replies, because its the problem statement that steers the discussion.
    Making the files available for the Report is a seperate task. You have to develop FTP-to-File XI scenario (or regular ftp process to send files across, which normally will not be allowed in XI server), I dont see any other way, if any, I 'assume' that it might complicate the situation.
    Performance - it is not something to do with your scenario alone, but the overall system load, configuration etc. (b.t.w 1000 is normal)
    Can we schedule a job for running the report periodically?
    Yes, scehdule a batch job calling this Report (with necessary variants) with required frequency or exact time (if there is any agreement with sender)
    I have started a POC
    I appreciate that, best way at this moment. you can reverse engineer from the errors to configure your scenario. for any reason,if you think it does not work, you can always stop and/or look for different solution.
    need your help
    - Definitely I will share my thoughts, if time permits
    how will i get the flat file xml(IDOC) in the source side
    do you mean the source structure, you can use the same structure as your target.
    once you are convinced with your solution approach, then it is better to close this thread & start a new one with new issues, for more views & suggestions and better readability.
    @Rajesh - I appreciate your efforts to solve the issue , but the below is not correct & possible, w.r.t this issue
    Here what you need is to do configure File Sender CC with NFS protocol.
    Regards
    Vishnu

  • Does any one know how to resolve the error while flat file upload

    Hey guys, I am so struck with this problem, please do let me know if anyone has any suggestions and ideas.
    1. I created three InfoObjects, Material Number, Name and Price,which is  a keyfigure and has data type DEC and fixed currency USD.
    Material Number is "With Master Data ", "With Text" and i added Name and Price as attributes to that.
    2.
    After that i created an Application component, and therafter a data source for Master data Attibutes.
    Now i select my flat file which is .csv file, in this data source. When I click "Load Example Data", i get all the fields from flat file, but the data type for PRICE changes to FLTP with length 16 instead of remaining DEC.
    Does anyone have any idea why on earth is this change of Data type taking place ?
    Please do me a favour by answering if you know about this problem. Thanks, appreciate it . Byee. And yeah, m just starting off in SAP so I am a total amateur unlike most of the people here.

    Am workin on BI 7.0.
    Let me put it in another way :
    Created Infoobjects:      1) Material No , 2) Material Name  3 ) Price which is the Key Figure
    Material No -
    has attributes Material Name and Price and " WIth Master Data", With ' Text"
    Price: -
    data type DEC, fixed currency - USD
    After doing things.
    Created Application Component:
    then, Right Click - Create Data Source,
    Selected -- Master Data Attributes
    After that from "EXTRACTIO' tab , selected the flat file, which is *.csv
    and then in DATA FORMAT - " SEPERATED WITH SEPERATOR"
    Then from "PROPOSAL" tab, when i click Load example data, the data from flat file shows up here, but the field PRICE now has Data Type -- " FLTP" and lenght "16"
    I hope i was clear enough. thanks

  • Flat file should have source field name and value

    Hi Friends
    I have a scenario of Idoc to Flat file , where in the target structure the field name and value should be present, generally only the value is available in a flat file.The target structure is as below:
    for e.g RECTYPE is the Field Name and A is the value.
    RECTYPE,A
    DATEH,20111101
    TIMEH,173125
    RECTYPE,B
    ORDNUM,4500054536
    ORDITM,150
    SUPDAT,20090218
    PLNQTY,000000006
    MATNR,14B300
    BATCH,5697
    PLANT,3026
    DELIVTYPE,PO
    SUPPLIER,0000023305
    SUPNAME,Deutsche BP AG
    SUPADRS,Erkelenzer Strasse 20
    SUPCITY,Monchengladbach
    SUPPOST,41179
    SUPCOUN,DE
    TRUCK_NBR,7589
    BOND_FLG,X
    STG_LOC,PLCL
    LINE_ACTION,CRE
    RECTYPE,B
    ORDNUM,4500056721
    ORDITM,10
    SUPDAT,20090218
    PLNQTY,000000013
    MATNR,116703
    BATCH,6589
    PLANT,3026
    DELIVTYPE,PO
    SUPPLIER,0000023380
    SUPNAME,DOW Belgium NV
    SUPADRS,Havenlaan 7
    SUPCITY,Tessenderlo
    SUPPOST,3980
    SUPCOUN,BE
    TRUCK_NBR,7589
    BOND_FLG,X
    STG_LOC,PLCL
    LINE_ACTION,CHG
    RECTYPE,X
    DATEH,20111101
    TIMEH,173125
    RECORDS,3

    Hi,
         NameA.addHeaderLine
    Specify whether the text file will have a header line with column names. The following values are permitted:
    ■       0 u2013 No header line
    ■       1 u2013 Header line with column names from the XML document
    ■       2 u2013 As for 1, followed by a blank line
    ■       3 u2013 Header line is stored as NameA.headerLine in the configuration and is applied
    ■       4 u2013 As for 3, followed by a blank line
    This specification is only permitted if exactly one structure is defined.
    regards,
    ganesh.

Maybe you are looking for

  • Quicktime X Exporting Audio only - No Video

    Hello, Any MOV file I brought into Quicktime X I used to able to export to 720p, 1080p or 420p to a nicely encoded, universal H.264 Quicktime file. Now, when I try and export, it makes a small audio file and no video. The codec I'm encoding from is '

  • Which is the best decode or case

    Hi, When you check performance wise which is the best one decode or case? Thanks,

  • IPad 2 battery life

    Hi, I got my iPad 2 yesterday and I love it. I'm worried about the battery though. Every 3 to 4 minutes or so it goes down one percentage point. That will leave me at about 5h, nowhere near 10h. I decreased brightness. I'm surving and sometimes downl

  • HT4235 Unable to sync iPad to iTunes

    I am unable to sync my iPad (Mini) to iTunes (Verson-11) on Windows-7. The message reads as sync failed to start, reconnect and try again. Could you please advise me on how to resolve this issue.

  • App world locked on download

    I tried to update my Twitter app today and got an error (typical on a brand new update due to traffic). Anyway, something happened and now app world is locked on "downloading" status for the Twitter update and I can't cancel it. I let it sit for abou