on 09-01-2006 3:39 AM
i have the Flat File format example as below:
Leo
456~123
string1+string2
Nick
478~124
string3+string4
and the target xml should be:
<person>
<name>Leo</name>
<ID>
<SocialID>456</SocialID>
<EmployeeID>123</EmployeeID>
</ID>
<Description>
<JobTitle>String1</JobTitle>
<Address>String2</Address>
</Description>
</person>
<person>
<name>Nick</name>
<ID>
<SocialID>478</SocialID>
<EmployeeID>124</EmployeeID>
</ID>
<Description>
<JobTitle>String3</JobTitle>
<Address>String4</Address>
</Description>
</person>
I have chosen the File Content Conversion File Adapter
but how to set the fieldSeparactor
Thank you for your advice
Hi,
the strcuture that you are trying to achieve will not be possible using the standrad file adapters content conversion!
The File adapters content conversion can be used to create a strcuture like,
<root>
<record>
<element1>
<xx1> </xx1>
<xx2> </xx2>
</element1>
<element2>
<yy1> </yy1>
<yy2> </yy2>
</element2>
</record>
</root>
Try pushing the name into the <ID> and this can be achieved.Also, you would need to change the source file as follows,
<b>Leo,456,123,string1,string2
Nick,478,124,string3string4</b>
The content Conversion parameters on sender file adapter will then look as follows,
DocumentName : give the message type name
DocumentNamespace : give the namepace
RecordsetName : PERSON
RecordsetStrucutre : ID,1,DESCRIPTION,1
The Table will contain entruies,
ID.fieldNames : NAME, SOCIALID, EMPLOYEEID
ID.fieldSeparator : ,
ID.endSeparator : 'nl'
DESCRIPTION:fieldNames: JOBTITLE,ADDRESS
DESCRIPTION.fieldSeparator : ,
DESCRIPTION.endSeparator: 'nl'
<person>
<ID>
<name>Leo</name>
<SocialID>456</SocialID>
<EmployeeID>123</EmployeeID>
</ID>
<Description>
<JobTitle>String1</JobTitle>
<Address>String2</Address>
</Description>
</person>
<person>
<ID>
<name>Nick</name>
<SocialID>478</SocialID>
<EmployeeID>124</EmployeeID>
</ID>
<Description>
<JobTitle>String3</JobTitle>
<Address>String4</Address>
</Description>
</person>
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is a content conversion module for XI, where you can specify the parameters for converting from a flat file to a XML structure.
That PDF helped me a lot when I was first doing it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Leo,
Check this weblog which will help you:
/people/harrison.holland5/blog/2006/12/08/mapping-context-changes-in-xi
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Below link will provide you more help......
http://help.sap.com/saphelp_nw2004s/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Regards,
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Leo,
See this..
http://help.sap.com/saphelp_nw2004s/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
cheers,
Prashanth
P.S Please mark helpful answers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
you may try field separator as 'nl'
i hope it may work..
Ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.