According to the chairman's instruction, the IT department of TW corporation last week restricted billing if the internal order number in the miscellaneous purchase orders does not have a development execution ticket. So tw it performed user Export Development in ME51N on the System screen. If the system detects that there is no development execution order in the internal order, IT prompts that IT does not continue. Because the text instructions on the card control over TW are traditional, OA will return this error message after calling the RFC application to open a requisition, And it is garbled, such:
I thought it was an exception when I saw this garbled code, because the system throws an exception class: RfcCommunicationException. I found the cause everywhere and made it full of the header package. Later I had to go to the official environment and try to open a purchase order with OA data. As a result, the system prompts that the development execution order does not exist, so I knew the reason. Therefore, I felt very hard to solve this garbled code.
We can specify the encoding in the configuration information before RFC is called, as shown in the red letter below:
public class MyBackendConfig : IDestinationConfiguration
{
public RfcConfigParameters GetParameters(String destinationName)
{
if ("PRD_000".Equals(destinationName))
{
RfcConfigParameters parms = new RfcConfigParameters();
parms.Add(RfcConfigParameters.AppServerHost, "192.168.1.3");
parms.Add(RfcConfigParameters.SystemNumber, "00");
parms.Add(RfcConfigParameters.User, "MENGXIN");
parms.Add(RfcConfigParameters.Password, "×××");
parms.Add(RfcConfigParameters.Client, "888");
parms.Add(RfcConfigParameters.Language, "ZH");
parms.Add(RfcConfigParameters.PoolSize, "5");
parms.Add(RfcConfigParameters.MaxPoolSize, "10");
parms.Add(RfcConfigParameters.IdleTimeout, "60");
parms.Add(RfcConfigParameters.Codepage, "8300");
return parms;
}
else return null;
}
public bool ChangeEventsSupported()
{
return false;
}
public event RfcDestinationManager.ConfigurationChangeHandler ConfigurationChanged;
}
This code is set to 8300 (traditional), so the system correctly prompts the information:
The Code meanings of this Codepage are as follows:
So far, the garbled problem has been completely solved ~
PS:. NET connection to the SAP system is now over. Thank you for your comments...