Skip to Content
avatar image
Former Member

File Content Conversion - Sender Adapter

I have a situation where the Flat File has the following stucture:

H01 100 200 300

H02 400 500 600

H02 700 800 900

H03 10 20

L01 10 20 30

S01 10 20 30

H01 Occurs once. H02 1 - unbounded.

H03 0 - unbounded.

L01 1 - unbounded

S01 1 - unbounded.

Can File Content Conversion handle such data. Especially like H03 which might not exist in the file.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 07, 2006 at 02:32 PM

    Hi Michael,

    Yes it can be handled in content conversion. Specify the occurrence of H03 as * in the Record structure parameter.

    praveen

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 07, 2006 at 02:34 PM

    Hi,

    Your content conversion will look like following.

    H01,1,H02,,H03,,L01,,S01,

    Thanks,

    Prateek

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 07, 2006 at 03:21 PM

    HI,

    You can handle this with File Content Conversion of the File Adapter. Make use of Key field to identify each record. And use *, whenever you feel it is 0-unbounded.

    Also make sure that your content conversion is in sequence wrt Datat Type Sturcture.

    To more-

    /people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter

    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem

    Hope this helps,

    REgards,

    Moorthy

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks. All of you. I do not know whom to give points. I will try this out sometime next week.

      I will close this topic though.

      Regards

      Mike

  • avatar image
    Former Member
    Mar 12, 2009 at 09:40 AM

    HI,

    If your structure is like this

    <Mt_Source>

    <Record>

    <Header> --- its occurence is 1

    <Key1>

    <f1/>

    <f2/>

    <f3/>

    </Header>

    <Sub1>--- its occurence is 1..unbounded

    <Key2>

    <f1/>

    <f2/>

    <f3/>

    </Sub1>

    <Sub2>--- its occurence is 0...unbounded

    <Key3/>

    <f1/>

    <f2/>

    <f3/>

    </Sub2>

    <Sub3>--- its occurence is 1..unbounded

    <Key4/>

    <f1/>

    <f2/>

    <f3/>

    </Sub3>

    <Sub4>--- its occurence is 1..unbounded

    <Key5/>

    <f1/>

    <f2/>

    <f3/>

    </Sub4>

    </Record>

    </Mt_Source>

    The complete Content Conversion is as follows;

    Document Name=Mt_Source

    Document Namespace= here give the namespace where you have created ur message type

    Recordset Name=Record

    Recordset Structure =Header,1,Sub1, * ,Sub2, * ,Sub3, * ,Sub4, *

    Key field name= Key

    Header.fieldNames=Key1,f1,f2,f3

    Header.fieldSeparator=,

    Header.endSeparator='nl'

    Sub1.fieldNames=Key2,f1,f2,f3

    Sub1.fieldSeparator=,

    Sub1.endSeparator='nl'

    Sub2.fieldNames=Key3,f1,f2,f3

    Sub2.fieldSeparator=,

    Sub2.endSeparator='nl'

    Sub3.fieldNames=Key4,f1,f2,f3

    Sub3.fieldSeparator=,

    Sub3.endSeparator='nl'

    Sub4.fieldNames=Key5,f1,f2,f3

    Sub4.fieldSeparator=,

    Sub4.endSeparator='nl'

    Header.keyFieldValue="H01"

    Sub1.keyFieldValue="H02"

    Sub2.keyFieldValue="H03"

    Sub3.keyFieldValue="L01"

    Sub4.keyFieldValue="S01"

    Thanks and Regards

    Kubra Fatima

    Add comment
    10|10000 characters needed characters exceeded