cancel
Showing results for 
Search instead for 
Did you mean: 

.Net Connector 2.0: Problem in Chinese values retrieved from SAP

Former Member
0 Kudos

We tried to use .Net Connector 2.0 to retrieve chinese values from SAP 46c, configured to be able to store Chinese characters (as well as HKSCS).

We have no problem in using SAP JCo 2.1 to save/retrieve chinese values.

However, we get gabbage when we want to retrieve Chinese values using .Net connector 2.0.

Is there any special handlings of the retrieved data or any set up required to save/retrieve chinese values?

Regards,

Devin

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Are you using ASP.NET to display the data? If so, you probably need to save the page in which you try to display the values with the right chinese encoding for the characters to show up right.

Regards,

Ofer

Former Member
0 Kudos

Yes, I'm using ASP.NET. The page's contentType is set to "text/html; charset=UTF-8" and when it is viewed under IE, the encoding UTF-8 is selected. However, we have no luck on this.

The chinese characters should be displayed correctly under UTF-8 encoding, as this is in the case when we use JCo.

Any other idea?

Former Member
0 Kudos

Did you try Windows Form?

Might you can implement all interface related function in Windows Forms Application at first. After that you can migtate into ASP.NET.

This is just a suggestion. You can have a try.

Former Member
0 Kudos

I think this is not related to using Windows Form or ASP.Net...

In C#, all string should use Unicode and so I should get the correct Chinese data when examing the value of the string through the debugger. However, the value shows wrong text.

I will try to use Windows Form as suggested first.

Former Member
0 Kudos

Have tried Windows Form and still no luck.

Anyone can help please?

Former Member
0 Kudos

What language does your R/3 system configured in?

Former Member
0 Kudos

Settings in R3:

Code page: 8340

Country code: HK

We are using JCo 2.1 which supports the code page 8340. We have no problem in retreiving and saving Chinese characters to/from R3 using JCo.

What code pages are supported by NCo. Where can I find more information about i18n using NCo?

Does NCo support code page 8340?

Former Member
0 Kudos

Hi Devin,

It is a known issue of the .NET Connector with the code page 8340. Can you please send your e-mail address so that I can send you a patch for test?

Regards,

Guangwei

Former Member
0 Kudos

Thanks Guangwei. Please send the patch to @

Message was edited by: Devin Ho

Former Member
0 Kudos

Hi Devin,

Failed to send the patch to devin.ho@gmail.com because

"The message could not be delivered because the recipient's mailbox is full."

Regards,

Guangwei

Former Member
0 Kudos

I'm very sorry. Just think gmail should be large enough to receive the patch... Sorry for the inconvenience caused.

Message was edited by: Devin Ho

Former Member
0 Kudos

I've got the patch finally. Thanks Guangwei.

However, it still doesn't work after I replaced the new dll in the folder "C:\Program Files\SAP\SAP .NET Connector 2.0".

My code looks like this:

SAPProxy proxy = new SAPProxy();

proxy.Connection = Connection.GetConnection(aDestination.ConnectionString);

SAPConnection conn = (SAPConnection)proxy.Connection;

conn.OwnCodepage = "8344";

// have tried "8340" or not set, same result

try

{

proxy.aBAPI(...);

// This should return chinese characters, but I've no luck on this...

TextBox1.Text = aReturnValueWithChineseCharacters;

}

catch (SAP.Connector.BapiException ex)

{

Console.WriteLine("Exception caught: {0}", ex);

}

Any more advice? Have I done something wrong?

Former Member
0 Kudos

Did you also install the new DLL into the GAC by executing command

gacutil /i SAP.Connector.Rfc.dll ?

If it still doesn't work after putting it in GAC, please send open a SAP SSO message.

Regards,

Former Member
0 Kudos

I mean a SAP OSS message...

Former Member
0 Kudos

Hi Guangwei,

Thanks very much. I have removed the dll from gac manually. gacutil cannot remove it as I think it's because it is installed through installer.

The updated SAP.Connector.Mfc.dll solves the problem. Thanks.

Former Member
0 Kudos

Hi Devin,

I am working as .net developer.

I know that this is very old thread, still i am looking forward to solve my issue.

I am having issue with accepting Chinese character while calling BAPI.

Where can I download this patch, and please tell me how can I proceed with this patch.

Please share if you have any work around this issue.

Thanks,

Vijesh

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Vijesh,

the latest patch for NCo 2.0 is still available from https://service.sap.com/connectors -> SAP Connector for Microsoft .NET inthe download section of 2.0.

However, I strongly recommend to migrate your application to a NCo 3.0 based one, as NCo 2.0 is out of support since March 31.

Best regards,

Markus