cancel
Showing results for 
Search instead for 
Did you mean: 

bad character with file adapter when i use append mode

former_member745782
Active Participant
0 Kudos

hello Guru's

i'm working with a easy interface idoc to file (XI 3.0).

I write the file in FTP and in append mode.

For each append i found a bad character (on the end of message ) like this:

How to clean this?

I tried to use trim function inside the mapping, but seem the problem is on adapter.

Any suggestion?

thanks

Alex

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Please provide the FCC parameter as it seems to be a end separator coming after each run (Before appending it in the next run).

former_member745782
Active Participant
0 Kudos

of course.

Here the FCC paramenter. In advanced tab nothing is selected.

former_member184681
Active Contributor
0 Kudos

Hi Alessandro,

The error could be caused by the fact that you are using this fieldSeparator attribute twice for each structure. Are you sure you did not want to use endSeparator instead?

Moreover, based on the content it seems that you are using a comma and a semicolon as a field separator (or am I wrong and you are building the whole file line in the mapping, in a single field?).

Hope this helps,
Greg

former_member745782
Active Participant
0 Kudos

Hi Greg,

I deleted 2 entry and now situation is:

T0.fieldSeparator = 'nl'

R101.fieldSeparator = 'nl'

My structure have 2 field, header and position and i set a new line for each field. Everything is in a single field.

The bad character appear for every append (new message).

former_member184681
Active Contributor
0 Kudos

Dear Alessandro,

I checked this "FEFF" combination in Wikipedia here:
http://en.wikipedia.org/wiki/UTF-16
http://en.wikipedia.org/wiki/Byte_Order_Mark

It looks like it is a combination of characters called Byte Order Mark, that is used in Unicode at the beginning of every characters string. And it seems funny that none of us noticed it in our integration scenarios... The only idea for solving it I have is to switch the File Type in Processing tab from Binary to Text or the opposite, depending on what is your current configuration. Give it a try and let me know the result.

Regards,
Greg

Former Member
0 Kudos

Try using hex value 0x0a instead of nl.

former_member745782
Active Participant
0 Kudos

Hi Greg,

i changed file type from Text to Binary but with same result.

former_member745782
Active Participant
0 Kudos

thanks to everybody!

seems the problem is in UTF-16

I tried to change in UTF-8 and now the problem seems solved.

Thanks again to everybody

Former Member
0 Kudos

how does this character look in the idoc ?

Former Member
0 Kudos

Hi Alex,

Does the bad character also appear if you only append one message to the file? I.e. only one message processed in SAP PI?

Which editor do you use to view the file? I would recommend you to use Notepad++ and install the plugin Hex editor. That way you can see exactly which character is at the end of your string. This is not possible in regular notepad or wordpad.

If you could take a screenshot of the Hex editor with the character marked it would be easier to help you identify the root cause.

Best regards,

Jacob

former_member745782
Active Participant
0 Kudos

hi Jacob!

thanks for anwer.

here the screen maded with Notepad++

former_member745782
Active Participant
0 Kudos

i forget:

I have this problem only in the points where i have append

GabrielSagaya
Active Contributor
0 Kudos

Can I have a look at your FCC parameters provided in CC Advanced mode.

Former Member
0 Kudos

Hi Alex,

Could I maybe ask you to open the file in Notepad++ and switch to Hex editor from the Plugin menu? That way I will be able to see the actual hex-values of the characters. Alternatively, if the data does not contain sensitive data you are more than welcome to send the file to my e-mail - jacob (at) firesquad (dot) dk

Best regards,

Jacob

former_member745782
Active Participant
0 Kudos

Hi Jacob!

so i converted my "bad" character in exadecimal.

the value is: 'FEFF'