cancel
Showing results for 
Search instead for 
Did you mean: 

file adapter: one special character appears at first in file

former_member440449
Participant
0 Kudos

Hi,

I have a file to file scenario where I am only pulling a file from an external FTP and posting it in SAP unix file system.

When I see the file posted in SAP, I can see a special character as the first character of the file in every file I am sending.

This special character is "?" if I use US-ASCII file encoding (for text file type) and a "square" character if I use other encoding such as ISO.

I assume that this issue is at receiver side and not at sender piece.

I tried different combinations for both but I am always getting this.

Has anyone faced the same in the past? Can you let me know how can I solve this issue?

Thanks in advanced!

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Make sure you set the FTP and file channel to binary mode. If that is the case, and you have no mapping configured, then the error must be outside of PI. Because PI does not behave wrong when it transfers a binary file.

CSY

Former Member
0 Kudos

Compare the with the Code page that is being used at the Receiver side for transformation. Probably problem should be at the  receiver end.

Thanks,    

anupam_ghosh2
Active Contributor
0 Kudos

Hi Claudio,

                  I believe the character is present in file from sender side itself. Did you check the file content in external FTP location? In case this is true, its better that you request the sender to get rid of the character  before sending the file itself else you need to remove it using message mapping. In case you are not using any mapping in your scenario then you need adapter module in file receiver adapter to remove first character in file.

Regards

Anupam

former_member184681
Active Contributor
0 Kudos

Hi Claudio,

One more check that seems worth trying: try moving one of the files from FTP to the Unix directory manually, without using PI. This will help you determine if your problem is related to your PI development (personally I believe not) or rather with other reasons like the file itself, incorrect encodings, the way your editor displays the file and so on.

Regards,

Greg

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Open your file using different editor and see how that behaves. Plus as you know xml file startswith <?, Just check whether you miss the first character?

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

Are you dumping file from FTP and placing in to SAP NFS ?

It looks problem with editor, if you think problem with pi then use binary mode in File receiver channel and try.

I did simalr scenarios but never had this kind of issue.

Regards,

Raj