Skip to Content
avatar image
Former Member

Sender File content Conversion

Hello People,

I have the following CSV file:

Ordertype;ZWL

SalesOrganisation;00Z0

Distribution;8

Productgroup;1

Currency;EUR

Partnerrole;AG

Partnernumber;8000000001

Positionnumber;10

Item_number;1

Positionnumber;10

TextId;20

Lang;EN

And with FCC I have to get this structure:

Test.com">

<Order>

<General>

<Ordertype>ZWL</Ordertype>

<SalesOrganisation>00G0</SalesOrganisation>

<Distribution>8</Distribution>

<Productgroup>1</Productgroup>

<Currency>EUR</Currency>

</General>

<Partner>

<Partnerrole>AG</Partnerrole>

<Partnernumber>8000000001</Partnernumber>

</Partner>

<Position>

<Positionnumber>10</Positionnumber>

<Item_number>1</Item_number>

</Position>

<Text>

<Positionnumber>20</Positionnumber>

<TextId>001</TextId>

<Lang>EN</Lang>

</Text>

</Order>

</ns0:mt_OrderFile>

I've made a File Content Conversion in the sender CC but I get an error. Can anyone help me along?

Kind regards,

Kamran

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

8 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 24, 2007 at 03:38 AM

    Kahman,

    My indenting was not represented in the last response

    dt_OrderFile

    Order (0..unbounded)

    General (subelement group 1)

    Ordertype

    SalesOrganisation

    Distribution

    Productgroup

    Currency

    Partner (subelement group 2)

    Partnerrole

    Partnernumber

    Position (subelement group 3)

    Positionnumber

    Item_number

    Text (subelement group 4)

    Positionnumber

    TextId

    Lang

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 22, 2007 at 03:50 PM

    What is the error?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 23, 2007 at 12:22 AM

    Kamran,

    You want to convert your flat structure (CSV file) into mt_OrderFile

    In the Sender Adapter set the content conversion parameters to include

    <b>Document Name</b> mt_order

    <b>Recordset Name</b> ORDER

    <b>Recordset Structure</b> item,*

    <b>Recordset Sequence</b> Ascending

    <b>Key Field Type</b> string

    <b>item.fieldSeparator</b> ,

    <b>item.endSeparator</b> ’nl’

    <b>item.fieldNames</b> Ordertype,SalesOrganisation,Distribution,Productgroup,Currency,Partnerrole,Partnernumber,Positionnumber,Item_number,Positionnumber,TextId,Lang

    Then define your flat structure for content conversion, eg

    Create data type, eg dt_order

    dt_order

    ORDER (1)

    item (0..unbounded)

    Ordertype (string)

    SalesOrganisation (string)

    Distribution (string)

    Productgroup (string)

    Currency (string)

    Partnerrole (string)

    Partnernumber (string)

    Positionnumber (string)

    Item_number (string)

    Positionnumber (string)

    TextId (string)

    Lang (string)

    Create message type, eg mt_order using dt_order

    Create an abstract message interface, eg mi_order using mt_order

    A receiver step can then read the csv file (using a BPM) into a container with the message defined as mi_order

    A transformation step with graphical mapping will map the mt_order to the mt_OrderFile (which you have already defined)

    Regards,

    Mike

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Mike,

      Thanks for your reply,

      But I have to have a following structure:

      Test.com">

      <Order>

      <General>

      <Ordertype>ZWL</Ordertype>

      <SalesOrganisation>00G0</SalesOrganisation>

      <Distribution>8</Distribution>

      <Productgroup>1</Productgroup>

      <Currency>EUR</Currency>

      </General>

      <Partner>

      <Partnerrole>AG</Partnerrole>

      <Partnernumber>8000000001</Partnernumber>

      </Partner>

      <Position>

      <Positionnumber>10</Positionnumber>

      <Item_number>1</Item_number>

      </Position>

      <Text>

      <Positionnumber>20</Positionnumber>

      <TextId>001</TextId>

      <Lang>EN</Lang>

      </Text>

      </Order>

      </ns0:mt_OrderFile>

      So what I have done is this:

      Document Name: mt_order

      Recordset Name: ORDER

      Recordset Structure: General,1,Partner,,Position,,Text,*

      Recordset Sequence: Ascending

      Key Field Type: string

      General.fieldNames: Ordertype,SalesOrganisation,Distribution,Productgroup,Currency

      General.fieldSeparator ;

      General.endSeparator ’nl’

      and so on for every Recordset.

      Can you help me along to get above structure?

      Kind Regards,

      Kamran

  • avatar image
    Former Member
    Oct 23, 2007 at 09:50 AM

    Hi

    Here the problem might be there in Content conversion parameters

    Check whether there is any space after that

    For eg: Details.fieldSeparator after this any blank space

    Because if u copy this and paste u will get extra space due to this u may get errors like that.Check that

    I think this might help u........

    Regards

    Yuga

    Add comment
    10|10000 characters needed characters exceeded

    • you have to check all the FCC paramters once more time.......

      is the message entering into the SXMB_MONI ( i belive Yes) then check the inbound message Payload? any XML you c if you dnt then whats the error in File adatper?

      your FCC paramters are fine now ( i hope you have included the KeyfieldaNmae and Key FieldValue properly)

      check are these the values you have mentioned:

      General.keyFieldValue: ZWL

      General.KeyFieldName Ordertype

      Partner.keyFieldValue: AG

      Partner.KeyFieldName:Partnerrole

      Position.keyFieldValue: 10

      Position.KeyFieldName:Positionnumber

      Text.keyFieldValue: 20

      Text..KeyFieldName:Positionnumber

      make sure you input file has the following Keyfield Values else it will not picking the any data from the file even tought you have some records in it..

      <rewards points if helpfull>

  • avatar image
    Former Member
    Oct 23, 2007 at 12:22 PM

    Hi,

    Check below links for File content convertion.

    File content conversion sites

    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1

    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter

    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1

    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

    /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter

    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns

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

    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter

    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

    Regards,

    Phani

    Reward points if Helpful 😊

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 23, 2007 at 12:38 PM

    Hi

    Still u can check the spelling.

    Other than that no idea.

    I faced the problem

    Yuga

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 24, 2007 at 03:32 AM

    Kamran,

    To clarify, the content conversion is to simply read your CSV file into an xml equivalent structure mi_order. I have used the same method to successfully read the contents of a CSV file into an Integration Process (with the Sender Adapter set up as per my previous reply)

    You said that you have already created the mt_Order file

    Does it look similar to dt_OrderFile below?

    dt_OrderFile

    Order (0..unbounded)

    General

    Ordertype

    SalesOrganisation

    Distribution

    Productgroup

    Currency

    Partner

    Partnerrole

    Partnernumber

    Position

    Positionnumber

    Item_number

    Text

    Positionnumber

    TextId

    Lang

    Create message type, eg mt_OrderFile using dt_OrderFile

    Create an abstract message interface, eg mi_OrderFile using mt_OrderFile

    Then use the <b>transformation step with graphical mapping</b> to map the mt_order to the mt_OrderFile to present the data in the format that you require

    Please award points if the response is helpful

    Regards,

    Mike

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 25, 2007 at 10:09 AM

    Hi Kamran,

    Did u check the length which u have specified for the keyfield?

    Suppose ur keyfield value is 'Ordertype' and the length which u have specified for it is 15 then u need to put spaces and make it a 15 length string as 'Ordertype '.

    then ur keyFieldValue will be 'Ordertype ' .(leave out the quotes).

    Also check what u have selected for key field type - String(case-sensitive) or String(case-insensitive).

    Hope this resolves ur issue.

    Add comment
    10|10000 characters needed characters exceeded