on 10-22-2007 4:45 PM
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:
<ns0:mt_OrderFile xmlns:ns0="urn: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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Still u can check the spelling.
Other than that no idea.
I faced the problem
Yuga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nisar,
Hereby the 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 I have to get the following XML structure:
<ns0:mt_OrderFile xmlns:ns0="urn: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>
Hereby the FCC parameters I defined in the CC:
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
General.keyFieldValue: Ordertype
Partner.fieldNames: Partnerrole,Partnernumber
Partner.fieldSeparator ;
Partner.endSeparator nl
Partner.keyFieldValue: Partnerrole
Position.fieldNames: Positionnumber,Item_number
Position.fieldSeparator ;
Position.endSeparator nl
Position.keyFieldValue: Positionnumber
Text.fieldNames: Positionnumber,Textid,Lang
Text.fieldSeparator ;
Text.endSeparator nl
Text.keyFieldValue: Positionnumber
I get an output but its not the output I have to get. I think that my problem is the key Field Value.
Kamran
the problem is you have not mentioned the key field names...you have just mentioed the key field value
General.fieldNames: Ordertype,SalesOrganisation,Distribution,Productgroup,Currency
General.fieldSeparator ;
General.endSeparator nl
General.keyFieldValue: Ordertype
<b>General.KeyFieldName</b> "fieldanme"
make sure you do for all the recordset strucutres that's the problem
Hi Nisar,
Thank you for your replay.
My
<b>General.keyFieldValue: ZWL</b>
and my would be then
<b>General.KeyFieldName Ordertype</b>
I've ajusted that for all of the record sets and I get now this message from the adapter:
<b>Warning: Empty document found. Proceed without sending message</b>
But my document is not empty!!!!
Any other suggestion?
Kamran
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>
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mike,
Thanks for your reply,
But I have to have a following structure:
<ns0:mt_OrderFile xmlns:ns0="urn: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
What is the error?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.