on 02-05-2007 4:48 PM
Hi all,
I am working on a solution to map a file with this structure (not xml):
//.comment 1
0~keyh2..hn~
0~it1it2..itn~key
0~it1it2..itn~key
..
//.comment 2
0~keyh2..hn~
0~it1it2..itn~key
0~it1it2..itn~key
0~it1it2..itn~key
..
This is my conversion setup
recordser.structure = comment,1,header,1,item,*
recordset.sequence = variable
keyFieldName = key
comment.fieldSeparator = .
comment.fieldStructure = key.comment
comment.keyFieldValue = //
header.fieldSeparator = ~~
header.beginSeparator = 0~~
header.endSeparator = ~~
header.fieldStructure = 0~keyh2..hn~
header.keyFieldValue = 0
item.fieldSeparator = ~~
item.beginSeparator = 0~~
item.fieldStructure = 0~it1it2..itn~key
item.keyFieldValue = 1
The problem now is that this file come from Chinese system and it is provide with chinese letters (looks like 2 bytes per letter). When I provide character encoding as ISO-2022 then adapter shows exception:
java.io.UnsupportedEncodingException
when I try to process it without passing any encoding then the exception is:
more elements in file csv structure than field names specified
Is there anyone who can help me with these?
br
Dawid
Hi Joslyn,
Thanks for your help. I finnally found the problem. According to Sender File conversion help page:
http://help.sap.com/saphelp_erp2005vp/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm
<segment>.filedNames should be:
Specify the names of the structure columns: The input format depends on the following:
● If you have specified a value for NameA.fieldFixedLengths, then a string is expected containing the names of the file columns as arguments separated by commas. This also applies if you have also specified a value for NameA.columnSeparator.
● If you only specify a value for NameA.fieldSeparator, the system expects a string containing the names of the file columns in the same format as the file rows. This means that the same separator and any additional strings you specify for NameA.endSeparator and/or NameA.beginSeparator are expected.
When I specify my fieldNames as described it does not work. So I changed it to comma delimited list without any beginSeparator and endSeparator and everything works perfect now.
Does someone address this issue before?
best regards
Dawid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Go through this help document.I think the File encoding of type ISO-2022 is not
supported by file adapter in XI.The following has the different types of file encoding options available.
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm">File Encoding in Sender File adapter</a>
Regards,
JE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joslyn,
thanks for quick response. The problem is that when I let say use UTF-8 it is getting this second error:
more elements in file csv structure than field names specified
It looks like file structure in this new encoding change the file structure and column number.
Any other ideas?
br
Dawid
Hi,
I think it is something wrong with the File content conversion parameters parameters.
You can avoid comment 1 and comment 2 by using the parameter Document offset.Follow this link for that:
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm</a>.
I think you didn't specify the field names in the File Content Conversion parameters.
Follow these two weblogs for the File Content Conversion parameters:
<a href="/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30:///people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
<a href="/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/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter</a>
Hope it helps.
Regards,
JE
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
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.