cancel
Showing results for 
Search instead for 
Did you mean: 

Converting UTF-8 to ANSI in Receiver SFTP adapter in PI 7.4.

Former Member
0 Kudos

Hello Experts,

I am working on an SAP Proxy to SFTP file receiver scenario in SAP PI 7.4.End user is complaining about the file Encoding error.

The files are getting written in UTF-8 format but the user wants them in ANSI format.User is facing problem with the formatted characters in German texts.

The receiver was running on FTP all these days, but now we have switched to SFTP after which the problem has started.

Receiver is a Windows server.

.

Thanks,

Swetha.

Accepted Solutions (0)

Answers (11)

Answers (11)

stefan_grube
Active Contributor

The value of the parameter Transform.ContentType should be: text/plain;charset=cp1252

Former Member
0 Kudos

are you sure that your sender service send the character right?

maybe, your are not getting right request message and the problem  is not in receiver channela and it is in sender side.

former_member203764
Participant
0 Kudos

good suggestion!

could you show us the payload?

former_member184293
Participant
0 Kudos

hi Sara,

but sender is SAP.

please find the screen shot from mapping.

stefan_grube
Active Contributor
0 Kudos

Obviously your message in PI is wrong. So the issue is on sender side. I suppose that the sending system sends an UTF-8 message, but the PI system interprets it as ANSI.

Check the settings of your system connection between sending system and PI.

Former Member
0 Kudos

check in SAP Sender side, execute SXMB_MONI transaction in SAP. If you see the character wrong, check real data in SAP throught business transacción.

I think, your data is wrong in SAP.

former_member184293
Participant
0 Kudos

hi alberto,

i have even tried with cp1250 .

hi stefan, please find the log below.

former_member203764
Participant
0 Kudos

It works!

the configuration looks as below:

former_member184293
Participant
0 Kudos

hi,

but this does not solve the problem with the German special characters (ä,ö,ü,ß,° aso.).

i am still receiving them.


as you said i have changed my configuration . please find the screen shot.


former_member203764
Participant
0 Kudos

Hi Kavya,

your configuration looks good.

What do you mean with "i am still receiving them."?

You mean the german characters (ä,ü,ö,ß...) in the created flatfile could not be shown correctly?

In my case the german characters are in order in the target file.

Please give me a screenshot of your target file.

Regards

Sara

former_member184293
Participant
0 Kudos

hi sara,

for example the below one are correct but we are receiving strange characters.

FüR = FÜR , KüHLKöRPER = Kühlkörper , GEHäUSEFRONT = Gehäusefront

our file is very big it can come any where not in order.

PLATINE CEAC4B GEPRüFTNR. 04315036AC UDETZIN

Thanks

kavya.

former_member203764
Participant
0 Kudos

Hi Kavya,

2 tipps from me:

- test you configuration with FTP adapter. If it works with normal file-adapter, it should also work with sftp.

- test it with a smal file.

Regards

Sara

Former Member
0 Kudos

try with cp1250 in Conversion.charset parameter

windows-1250 Cp1250 Eastern European (Albanian, Croatian, Czech, English, German, Hungarian, Latin, Polish, Romanian, Slovak, Slovenian, Serbian) Windows encoding

windows-1252 Cp1252 Western European (Albanian, Basque, Breton, Catalan, Danish, Dutch, English, Faeroese, Finnish, French, German, Greenlandic, Icelandic, Irish Gaelic, Italian, Latin, Luxemburgish, Norwegian, Portuguese, Rhaeto-Romanic, Scottish Gaelic, Spanish, Swedish) Windows encoding

stefan_grube
Active Contributor
0 Kudos

Could you post the log of the message processing in adapter engine?

It would be interesting to know, what the modules write in the log.

The configuration looks fine so far, so it could be as well an issue with adapter chache are any other issue.

Former Member
0 Kudos

Hi Kavya,

I see that u r using the XML2Plain module key for transform as well..You need to use the Encode key

Regards

Sriram

former_member203764
Participant
0 Kudos

Hi Sriram,

it seems not to work for me.

Here is the generated file:

The special german characters would be shown correctly, abut the format is UTF-8.

Actually I need ANSI.

Could find which parameter I gave is wrong?

Thanks and regards

Sara

Former Member
0 Kudos

Hi Sara,

As per keys defined by you, the key against Parameter name transform.contenttyep should be 1..

"s" seems missing in the first parameter

Regards,

Sriram

former_member203764
Participant
0 Kudos

It still does not work.

could you give me the screenshot of your configuration?

thanks

Former Member
0 Kudos

Hi Saram

Unfortunately i dont have access to that system anymore..Neither do i have a sandbox where i can configure and let you know:(

Regards,

Sriram

Former Member
0 Kudos

try with this parameters:

Module Key: conversion               Transform.ContentType      value: text/plain; charse="UTF-8"

Module Key: 1                              Conversion.charset             value: ISO-8859-1

Former Member
0 Kudos

Hi Sara and Kavya,

you may try parameter Transform.ContentType should be: text/plain;charset=ISO-8859-1

It worked for us

Regards,

Sriram

former_member184293
Participant
0 Kudos

hi Sriram,

thank you for your response. i tried using text/plain;charset=ISO-8859-1 but it didn't work.



our scenario is Proxy - PI - SFTP adapter


in message monitoring  i have observed that characters are getting truncated at sender side only.

so should have to encode at sender side also??


if so can i use the AF module in soap proxy channel?



Former Member
0 Kudos

Hello,

I see in your configuration and Parameter Value: Conversion.charset has wrong Module Key, It has to be encoding.

is that right?

Alberto

former_member203764
Participant
0 Kudos

Hi Shweta,

did the issue get solved?

I have the same problem since a couple of weeks.

any updates would be appreaciated!

Regards

Sara

former_member184293
Participant
0 Kudos

hi swetha

Is the issue solved? even we are facing the similar issue.

If the issue is solved can you please say me the solution.

Thanks

kavya.

Former Member
0 Kudos

HI Shweta,

Did the issue get resolved?

Regards,

Sriram

Former Member
0 Kudos

Hi Shweta,

The below worked in our case.

parameter Transform.ContentType should be: text/plain;charset=ISO-8859-1

Regards,

Sriram

Former Member
0 Kudos

Hi Swetha,

i found this link helpful for solving encoding problems.

Maybe also this SCN thread could help you. I think it sounds very promising as it focuses on the SFTP topic.

Also be sure to check the final file with a HEX Editor (No Text Editor, they somtimes show you incorrect HEX Data) to be sure that the file is really in the wrong format.

Although as this interface already worked once, I guess the claim of your end user is valid.

What I wonder is why you are setting "Transform.ContentType" to UTF-8, shouldn't you set this parameter to ANSI format?