cancel
Showing results for 
Search instead for 
Did you mean: 

Encoding issue in SFTP Receiver Adapter

Former Member
0 Kudos

Hello All,

Requirement :It is an outbound interface ,no mapping (pass through) where ECC is sending a .dat file with ? (Question mark ) for a blank space they are asking us to replace ? with blank space before we send to third party system.

I have configured the channels to do the same by looking at this blog https://scn.sap.com/thread/3557250 and message log says convertion is successfull but no chnage in the output file.

Please find the attached sender and receiver channel configuration. I tried with ISO-8859-1, CP852, ISO-8859-2 but nothing worked .Am I doing anything wrong in configurations or in module tab pls check and let me know how this can be achieved.

Thanks & Regards,

Akhila.A

Accepted Solutions (0)

Answers (1)

Answers (1)

vicky20691
Active Contributor
0 Kudos

Hi Akhila,

Can you try this without using MessageTransformBean and only with TextcodeConversion bean.

Regards,

Vikas

Former Member
0 Kudos

Hi Vikas,

Thanks for your response.

I am really not sure why I should try without using MTB.The message log says conversion is successfull from UTF-8 to ISO-8859-1/ ISO-8859-2/CP852 but their is no change in the output file.

I have few more doubts can you please clarify ?

  1. Suppose If the Source side has some special character (^e ) which are required in target system and if you open the file in PI there also it is coming correctly but once the file reaches target system if it is getting converted into some other characters like “?”, “#” etc.. then it can be a potential encoding issue from PI system[ in that case we need to add at receiver side].Am I correct ?
  2. if the Source side has special character (^e ) which are required in target system and in PI the special character not showing correctly then it can be encoding issue from source to SAP PI system this may get resolve if we add some encoding in sender channel


     3.if  the source file has wrong characters like “?” and in PI also it is showing as "?" once it reaches target system theire also it is showing as a "?"  .Can we conside this as an encoding issue and remove "?" character using encoding in receiver side for a passthrough scenario in PI ?.

Thnaks &Regards,

Akhila.A

.

nitindeshpande
Active Contributor
0 Kudos

Hello Akhila,

Sometimes the problem is at the receiver end too. The encoding of the folder will be an issue. Can you drop the file onto the local folder in SAP PI system and check what is the output you are getting?

Regards,

Nitin

vicky20691
Active Contributor
0 Kudos

Hi Akhila,

Character Encoding is a Superset which includes lot of characters within it.

ECC is sending it to PI and no error at sender side so it means ECC sent it as UTF-8 and PI is also UTF-8.

Now after you mapping you have used textcodeconversion bean which is showing in logs conversion successful.

Now you are not using FCC anywhere, so your data is still text/xml but you have made contentType text/plain , UTF-8. Point to be noted data is already text/xml, UTF-8 so I suggested no use of MTB.

Apart from these encoding thing, why are you even changing the encoding?

Your requirement is to replace ? with Blank  so u can do that in mapping itself.

Regards,

Vikas

Former Member
0 Kudos

Hi Vikas,

Mine is a passthorugh scenario no mapping involved .I am getting .dat file so I added MTB with text/Plain according to this thread.

https://scn.sap.com/thread/3557250

Thanks &Regards,

Akhila.A

vicky20691
Active Contributor
0 Kudos

Got the point.. But if you change the encoding how ? will get replaced with Blank........

I am sorry if I have not understood the requirement, but if you just want to replace the ? to Blank in your file then

you can use the Java Map where you will read the payload then replace ? with blank (replaceAll function)

then copy the payload to output payload . thats all it is done..

Dynamic file name for pass-through scenario - Process Integration - SCN Wiki

The above link shows how to copy payload (this will ensure your scenario remains passthrough).

Regards,

Vikas

manoj_khavatkopp
Active Contributor
0 Kudos

Adding to the Vikas's comment,

Please check first of all why is PI getting ? from ECC is it the actual data or is it any special character that is getting converted to ? , if its special characters then cross check the RFC destination that is being used in ECC to connect to PI if Unicode is enabled in that or not.

Br,

Manoj

Former Member
0 Kudos

Hi Vikas,

Even I am not sure how the encoding with change ? to blank space.I am just giving a try

This is an existing interface so I can not change the design now.

problem is not just with ? .functonal team are telling even other special characters may also come which need to be replaced with blank space.

We have special character problem for almost 10 outbound tunneling interfaces.I am not sure if we can fix it in PI if the special charcter is coming from ECC side (source side).

Pls help me out how this can be done.

Thanks&Regards,

Akhila.A

turmoll
Active Contributor
0 Kudos

How can you expect (by changing encoding from A to B) the character "?" will be change to " "?

This does not make much sense ...

If the target system requires UTF-8 than "the fastest" solution is to write adapter module with "one" line that replace "?" with " ". if you don't know how, (in case file structure is not very complex) you might use mapping ... or have a chat with ECC guys to send " " instead of "?"

All and all, this seems to be problem on ECC not in your interface ... check last ABAP transport before the error occurred

/k

nitindeshpande
Active Contributor
0 Kudos

Hi Akhila,

As other experts have suggested, this issue cannot be resolved using the encoding. You need to an adapter module or java mapping for this.

I would suggest you to go with adapter module provided in the below blog. Code is readily available, you need to just create the EJBs and deploy it in your SAP PI system -

Regards,

Nitin