IDOC encoding problem going from SAP 4.7 to 5.0

Hi everyone,I am having a problem with BC and I hope you can help. I use the wm.PartnerMgr.gateway.transport.ALE:OutboundProcess service to create IDOCs and it works perfectly in 4.7. However when I try to create IDOCs in 5.0 the TID comes back as garbage characters and my IDOCs don’t load properly. One thing I have noticed is that the $encoding variable is set to ISO-8859-1 when I use this service in 4.7 and it gets set to UTF-16 in 5.0.Do you think this could be my problem and if so how do I correct it?Thanks,Doug

Hello Doug,
this looks like your 5.0 is a Unicode system. In early versions of the RFC library there have still been problems with tRFC to a Unicode backend. You should upgrade your SAP BC to the latest “Service Release”, which comes with a new 6.40 RFC library. See SAP note 657129.

Regards, Lanzelot