Schema for File with Multiple Fixed Records using Native Schema builder

Hi All:
The below is the sample file format which i need to read through file adapter
HeaderReacord
FailureOrderRecord
ChildFailureRecord
ChildFailureRecord
SuccessOrderRecord
SuccessOrderRecord
HeaderReacord
FailureOrderRecord
ChildFailureRecord
In the above file, totally three records are repeatedly present with fixed length eg. HeaderReacord length is 50, SuccessOrderRecord and FailureOrderRecord length is 100, ChildFailureRecord length is 25. The file may have more than one header group i.e. A single header group contain one HeaderReacord, more than one SuccessOrderRecord, more than one FailureOrderRecord and more than one ChildFailureRecord after each FailureOrderRecord.
I have created the below xsd for this scenario and get the below output. Kindly tell how to do this in Native builder using fixed length type for different fixed records options
<xsd:element name="BatchOrder">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="OrderGroupCollection" type="OrderGroup" minOccurs="1" maxOccurs="unbounded"
nillable="false"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="OrderGroup">
<xsd:sequence>
<xsd:element name="HeaderRecord" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="false"/>
<xsd:element name="RecordList" type="RecordList" minOccurs="1" maxOccurs="unbounded"
nillable="false"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="RecordList">
<xsd:sequence>
<xsd:element name="OrderRecord" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="false"/>
<xsd:element name="ChildErrorRecord" type="xsd:string" minOccurs="0"
maxOccurs="unbounded" nillable="true"/>
</xsd:sequence>
</xsd:complexType>
Output:
=======
<BatchOrder>
<OrderGroupCollection>
<OrderGroup>
<HeaderRecord>HeaderReacord</HeaderRecord>
<RecordList>
<OrderRecord>FailureOrderRecord</OrderRecord>
<ChildErrorRecord>ChildFailureRecord</ChildErrorRecord>
<ChildErrorRecord>ChildFailureRecord</ChildErrorRecord>
<ChildErrorRecord>SuccessOrderRecord</ChildErrorRecord>
<ChildErrorRecord>SuccessOrderRecord</ChildErrorRecord>
<ChildErrorRecord></ChildErrorRecord>
<ChildErrorRecord>HeaderReacord</ChildErrorRecord>
<ChildErrorRecord>FailureOrderRecord</ChildErrorRecord>
<ChildErrorRecord>ChildFailureRecord</ChildErrorRecord>
</RecordList>
</OrderGroup>
</OrderGroupCollection>
</BatchOrder>

you cant acheive this heirarchy using the file adapters cont. conv, cos it supports only to a single level.
Maybe you can have a module or use the conversion agent !!
Some good reads on the Conv. agent!!!
/people/william.li/blog/2006/03/17/how-to-get-started-using-conversion-agent-from-itemfield
/people/paul.medaille/blog/2005/11/18/conversion-agent-a-free-lunch
/people/alexander.bundschuh/blog/2006/03/14/integrate-sap-conversion-agent-by-itemfield-with-sap-xi
/people/paul.medaille/blog/2005/11/17/more-on-the-sap-conversion-agent-by-itemfield

Similar Messages

  • XML file, with multiple customer records - post DEBMAS over Integr.Process

    Hi all,
    is it possible to map a single XML file message that contains multiple records for customer master to multiple messages ?
    I know that it is possible to do a "multi IDOC " mapping but then the splitting of the messages is done by the IDOC adapter, not earlier.
    I have to process every single customer master record by an integration process to check if its creation or change (and get the customer number).
    When I try in the interface mapping to set the receiver to "0 to unbound" then also the message format of the sender requires two additional hierarchie levels "...message, message1" . My orginal file does not contain these tags.
    Is XI not able to handle this easy requirement without making a university study out of it?
    Thank you very much for your help
    best regards
    Hans

    You need not worry about those tags to be in your file. Those are added while mapping is being executed. All that you need to do is use file content conversion in sender adapter and put your lookup logic in Integration Process and mapping..!!
    You do not need a university degree, if you understadn the concepts..!!
    VJ

  • Processing delimited file with multiple format records

    Hi All,
    I have got file containing following records to be processed by ODI:
    1000022,0236,E,APHDQR,,264, 32.83,13-08-2010,13-08-2010,W,33,
    1000022,0236,D,APHDQR,,Z01, 47.05,13-08-2010,13-08-2010,W,33,
    1000022,0236,M,APHDQR,,159, 3.00,13-08-2010,13-08-2010,W,33,
    1000022,0236,A,APHDQR,B120,7140,026,7140, 338.80,106,33,5018676E,
    1000022,0236,B, 35.19,1,503,W,13-08-2010,13-08-2010,6 ,COR ,
    As you can see there are 5 types of records (Record type 'E','D','M - same format) and ( Record Type 'A' and 'B').
    I need to be able to process records with Record Type 'E','D','M' and IGNORE records with record type 'A','B'
    I tried placing filter at staging level (CL_RECORD IN ('D','E','M')) in the Interface definition. But it doesn't work and still tries to process records with record type 'A' and 'B'....:(
    Any ideas? and any other way I can process records ??
    Thanks.
    KS

    OK,
    then you don't have too much options...
    the problem is that before apply the filter ODI tries to upload the data into the C$ table and, as there are multiples formats, some columns is getting "wrong datatype" (or some error of this kind).
    My question about the initial character was because if they were always the same, you could use a feature from JDBC Driver to file but only works to initial characters.
    In your case, it will be necessary to create a temp table with 3 columns like:
    Filler1 - Before the record type column
    Rec_Type - the record type
    Fille2 - the other columns
    Filler1 and Filler2 columns should has the necessary lenght to get all data from record.
    Now you can filter the record type but will need a "substring" function to separate the embedded into filler1 and filler2.
    Make any sense?
    Cezar Santos
    http://odiexperts.com

  • 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

  • Create a flat file with multiple characters for enclosures

    Hello,
    we use OWB 11g2 (11.2.02).
    Now we try to create a flat file with multiple characters for enclosures. The manual wrote:
    "Enclosures (Left and Right): Some delimited files contain enclosures that denote text strings within a field. If the file contains enclosures, enter an enclosure character in the text box or select one from the list. The list displays commonenclosures. However, you may enter any character. The default for both the left and right enclosure is the double quotation mark ("). You can specify multiple characters and hexadecimal characters as field enclosures."
    But it will not work. The OWB use the first character from the left enclosure definition as left enclosure and the second one as right enclosure !?!
    Did anyone know this behavior? Is there a solution for this problem?
    Thanks and regards
    Norbert

    HI Raghu,
               Use the function module 'GUI_UPLOAD'.
               In that you have to specify the field_separator value = 'X' in export section.
    Regards,
    S.C.K

  • Creating IPA file with Multiple SWF files using ADT

    Iam successfully able to create ipa files using the ADT package but my next requirement is to create an IPA file with multiple swf files.I think it might be easy if your SWF files are regular the tough part is my swf file has lot of action script in it so the only option is to through the command prompt and using the ADT package of Adobe AIR.So now i have 10 SWF files like this and iam creating ipa file for each swf seperatly but now I want to put all of the swf files into one ipa file.Please let me know if i was not clear in my description

    I think you are trying to explain how to load two swf's one with action
    script and loading an other swf file which should be non action script.If
    you read my requirement carefully.I have all the same type of swf's and
    these swf are automatically created as a form of output for xcelsius dash
    board software.Iam capable of creating individialu ipa files from these swf
    files.So when I try to combine the same kind of swf files the first error
    its giving is the file name which I have used in the xml.in the main file
    name for the swf file its not considering the two swf file name in the
    initial window.so the adt package in the command line is not understanding
    the file name from the xml and the command prompt and giving error this swf
    file does not exist.So please consider how to combine two swf files with AS3
    into one ipa file.These swf files are not editable,Let me know if you find
    any idea to achieve this

  • Loading xml file with multiple rows

    I am loading data from xml files using xsl for transformation. I have created xsl's and loaded some of the data. In an xml file with multiple row, it's only loading one (the first) row. Any idea how I can get it to read and load all the records in the file???

    Could some please help me with the above. I desparately need to move forward.

  • Issues with multiple Files with multiple subdbs on a single environment.

    I'm having an issue with Berkeley DB 4.2 on 32-bit platforms, regarding multiple physical files with multiple subdatabases in a single database environment. Specifically, when I open a subdatabase for a physical file, Berkeley DB thinks that it is using the same subdatabase in a different physical file.
    I'm doing the following:
    1. Create and open a db enviornment.
    2. Move file1 to the common area.
    3. Open, get and close the subdatabases in file1.
    4. Move file2 to the common area.
    5. Open, get and close the subdatabases in file2.
    6. remove file2 from the common area
    7. Move file3 to the common area.
    8. Open a subdatabase from file3. About 1/2 the time, the fetches
    return data from file2, not from file3.
    It's possible that at some earlier time (i.e. before step 1 of this
    test case), file1, file2 and file3 were the same file. I noticed
    that there is something called env->fileid_reset, but that is not
    in 4.2.52.
    Any ideas?

    Looks like I've resolved the issue

  • Is QuickTime support Mp4 file with Multiple SPS(Sequence Paramter Set) ?

    Hello EveryOne.
    I am in much trouble... plz help me. Thanks
    I have a Mp4 file with Multiple SPS(Sequence Parameter Set) and PPS(Picture Parameter Set.
    When i play into latest QuickTime then only Audio come. Blank White screen come in case of Video..Means no Video..
    i want to ask :
    Is QuickTime support Multiple SPS Mp4 file ?
    Thanks
    Shakti Kapoor
      Windows 2000  

    You didn't answer probably the most important question: whether you're using hardware or software Mercury Playback Engine (MPE). However, since you've set Maximum Render Quality on, it's largely irrelevant.
    When you're using hardware MPE or have the MRQ flag set for your export, rendering is performed with linear color. Linear color processing affects how color channels and alpha channels are composited--anything less than 100% opacity is subject to linear color processing. Check out this article for more information on linear color/linear light: Linear Light - Artbeats
    Since it sounds like you're seeing the results you expect in the Program Monitor, but not export, I'll wager you're not using hardware MPE. Only by disabling the Maximum Render Quality flag on export will you be able to get results that match what you see in the Program Monitor (within reason, of course). The only way you could see the effects of linear color within Premiere would be to either use a qualified GPU that enables hardware MPE, or go into your Sequence Settings and check the "Maximum Render Quality" option and then render previews.
    Please let me know if that helps resolve the issue, or at least provide a little insight into the problem.

  • Downloading .xls file with multiple rows and Columns

    Hi ALL,
    I need to genarate .xls file with multiple rows and and Columns and sent as an email.Since our customer having Problem with .CSV files need to genarate .XLS file.
    Please do the needful.
    Thanks
    Madhu

    Hi Madhu,
    You might also consider using Excel Spreadsheet XML as the target structure (namespace is urn:schemas-microsoft-com:office:spreadsheet).  When you double-click the resulting xml on a PC it automatically opens with Excel. So, users don't see a difference.  It will open up a lot of options with formatting including creating multiple worksheets if you wanted to.  Best of all you can stick with XML.
    See my response in this thread:
    Re: Convert XML data into XLS 
    Thanks,
    -Russ

  • How to Restrict Single Delivery Date for PO with Multiple Line Items

    Dear Experts,
    How to Restrict Single Delivery Date for PO with Multiple Line Items.
    System needs to through Error Message if User Inputs Different Delivery Dates for PO with Multiple Line Items in ME21N Tcode.
    Can we achive this by Some Enhancement in SAP or Not ???
    If so how to do it.
    Any Inputs is highly appreciated.
    Thanks and Regards,
    Selvakumar. M

    Hi Selvakumar,
    we can resrict the PO to have a single delivery date in all the line items by means of giving a error message or overwiting the delivery date keyed/determined in the line item.
    You can use the BADI -> ME_PROCESS_PO_CUST. In which you need to implement the method PROCESS_SCHEDULE.
    (for technical aid - This method will be called for each and every PO line item, From the imporing parameter im_schedule we can get all the details of current PO line, even we can change the data in the current PO line. )
    Regards,
    Madhu.

  • Single step workflow with multiple approvers (without using a group)

    Hi,
    is it possible to have a single step workflow with multiple approvers without using a group? This is for a contract document.
    i want to add a number of users based on particular logic. The approvers are random and do not belong to any particular group.
    DO let me know if it is possible or if any of you have done that.
    thanks in advance.
    regards,
    rubio

    Hi Rubio,
    I believe the behavior would be, if individual users are added as approvers then the system would require each approver to approve the document. However, if you use the user group, you could set the role so that it would be either ALL or ANY.
    Regards,
    Vikram

  • How do I create a single PDF file with multiple pages?

    Hi, I occasionally need merge several jpg images into a single pdf file with multiple pages (one Jpg per page). I have tried doing this on Preview, and by selecting all the pages I want to include in my document and trying to save to Pdf through the "Print" function, but every time it only saves the first page.
    Can anyone tell me if there is a way to save multple-page pdf files without having to purchase a specific program (i to this too infrequently to justify the cost)?
    Thanks very much,

    This works for me...
    Open first image in Preview View > Sidebar. Drag the other images into Sidebar, then select all.
    From File menu > print selected images. Choose PDF > Save as PDF
    -mj

  • 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.

  • File2Idoc: File with Multiple Occurence

    Hi,
    In  File2 Idoc scenario: how to read a file with multiple structure/occurrence. I tried as per below links, it is picking only first structure i.e - (Data0).
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    http://wiki.sdn.sap.com/wiki/display/XI/FiletoMultipleIDOCSplittingwithoutBPM
    My Input file as like :-
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_SENDER xmlns:ns0="http://FileToIdoc">
    - <DATA0>
      <DOC_NUM>0017000374</DOC_NUM>
      <POSITION_NUM>10</POSITION_NUM>
      <DELVRY_ITEM>000000000000000014</DELVRY_ITEM>
      <PLANT>1010</PLANT>
      <QUANTITY>3</QUANTITY>
      <DATE>2010.08.24</DATE>
      <SERIAL>AAAA01E1123458</SERIAL>
      </DATA0>
    - <DATA1>
      <DOC_NUM>0017000374</DOC_NUM>
      <POSITION_NUM>10</POSITION_NUM>
      <DELVRY_ITEM>000000000000000014</DELVRY_ITEM>
      <PLANT>1010</PLANT>
      <QUANTITY>3</QUANTITY>
      <DATE>2010.08.24</DATE>
      <SERIAL>AAAA01G1123456</SERIAL>
      </DATA1>
    - <DATA2>
      <DOC_NUM>0017000374</DOC_NUM>
      <POSITION_NUM>10</POSITION_NUM>
      <DELVRY_ITEM>000000000000000014</DELVRY_ITEM>
      <PLANT>1010</PLANT>
      <QUANTITY>3</QUANTITY>
      <DATE>2010.08.24</DATE>
      <SERIAL>AAAA01G1123457</SERIAL>
      </DATA2>
      </ns0:MT_SENDER>
    Please suggest concept.
    Thanks.

    Hi,
    The structure what you have created wrong, create this structure and change occurrence of DATA to 1 to unbounded.if you want to read multiple records (same structure) then it is not required to create same structure multiple times.
    *<DATA>+ 1 to unbounded.*
    >   +<DOC_NUM>0017000374</DOC_NUM>+

    >   +<POSITION_NUM>10</POSITION_NUM>+

    >   +<DELVRY_ITEM>000000000000000014</DELVRY_ITEM>+

    >   +<PLANT>1010</PLANT>+

    >   +<QUANTITY>3</QUANTITY>+

    >   +<DATE>2010.08.24</DATE>+

    >   +<SERIAL>AAAA01E1123458</SERIAL>+

    >   +</DATA>
    Regards,
    Raj

Maybe you are looking for