cancel
Showing results for 
Search instead for 
Did you mean: 

Visual Basic RFC SAP no-unicode. Latin2 Caracteres are converted in '#'

Former Member
0 Kudos

Hi,

I are inserting data in Z SAP tables from a Visual Basic Script.

I are doing a RFC call.

The problem is that the data type text aren´t iserting correct when its are Latin2 caracteres.

Example:

Text in Visual Basic: "Prevozni strou0161ki-železniu0161ki"

But when theRFC function inserts the data in SAP, SAP shows "Prevozni stro#ki-#elezni#ki".

Could somebody help me??

thanks in adavanced,

Javi

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

the problem was the rfc library librfc32.dll. The correct was the unicode library librfc32u.dll

Former Member
0 Kudos

Hi,

I has solved the problem. I indicate the text in ISO-8859-2 encoding, and then SAP knows it.

ISO-8859-2 -> Prevozni stro¹ki-¾elezni¹ki

But I have to indicate all characteres for SAP knows it. If I indicate "Prevozni strou0161ki-železn" , then SAP don´t Know it.

Now , the problem is that Visual Basic Program don´t indicate the total string, because when it parser the XML get the text ,but don´t get the total string.

But this is another history.....;P

thanks,

JAvi

Former Member
0 Kudos

Thanks for your answer.

But i din´t solve the problem.

I changed the encoding to UTF-16 and ISO-8859-5 but the caracteres are inserting bad yet :(.

I'm debugging the visual basic code and I can see that the text is correct in Visual Basic, but after it is incorrect in SAP.

Too, I'm inserting the value directly in visual basic sourcecode:

T_BAPI_P.Value(index, "TXZ01") = "Prevozni strou0161ki-železniu0161ki NOVO"

But the result is the same.

SAP shows "Prevozni stro#ki-#elezni#ki NOVO".

I have seen that in the transaction SM59 you can specify if the RFC conexion will be UNICODE.

The SAP system that i am working isn´t unicode, then it can not the tag to especificate this in SM59.

Could it be the problem that the SAP system isn´t unicode??

sorry, for my English's low level.

Thanks in advanaced for all yousr answer!

Javi

Former Member
0 Kudos

Hi,

Thanks for your soon answer.

The encoding of xml file is ISO-8859-1.

could it be the reason of the mistake?

If I change ISO-8859 to UTF-16, Internet explorer can´t to read it.

thanks,

Javi

GabrielSagaya
Active Contributor
0 Kudos

You can use the following XSLT Mapping to change the codepage of an XML document.

please use the encoding ISO-8859-5 for supporting latin spl characters.

<xsl:stylesheet version="1.0"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" encoding="ISO-8859-5"/>

<xsl:template match="/">

<xsl:copy-of select="*" />

</xsl:template>

</xsl:stylesheet>

GabrielSagaya
Active Contributor
0 Kudos

please view the article for your query.......

How Tou2026 Work with Character Encodings in Process Integration

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79...

sunil_singh13
Active Contributor
0 Kudos

Hi Javier,

Well to Support this formate you have to change UNICODE formte to UTF-16 which is UTF-8 in your request.

<?xml.......UTF-8> change to <?xml........UTF-16>

Reward points if Helpful

Thanks

Sunil Singh