cancel
Showing results for 
Search instead for 
Did you mean: 

C++ Runtime error on Rfc_Read_Table

Former Member
0 Kudos

Hi,

I got C++ Runtime Error on RFC_Read_Table. The following is the error message:

"Program:

This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information."

The connection was opened fine but I got this error when I am trying to read the table. I would appreciate if anyone can tell me how I can solve this problem.

Thank you in advance,

Sunny

Accepted Solutions (1)

Accepted Solutions (1)

reiner_hille-doering
Active Contributor
0 Kudos

This kind of error happens e.g. if you try to do a call with unsuffient metadata. E.g. if you try to do a Unicode call with SAP .NET Connector, but you don't have the needed offsets and lenght for Unicode, the LIBRFC32 does an "exit()", which causes this error message.

Former Member
0 Kudos

Hi Reiner,

Thank you for your help. However, I would appreciate it if you could help me understand how to fix the problem. The SAP .NET connector generates the code for Rfc_Read_Table. I have been using the same code for connecting to many SAP systems. When I try to connect to the new mySAP ERP 2004 system, I am running into this problem.

Do you think regenerating the code for Rfc_Read_Table using the new system will solve this problem? If so, will I still stay compatible with other systems? We are an ISV and our product is used by many customers.

Thank you in advance for your help.

Sunny

reiner_hille-doering
Active Contributor
0 Kudos

>Do you think regenerating the code for Rfc_Read_Table using the new system will solve this problem?

Yes. Most likely you generated the proxy on a non-Unicode system and the ERP 2004 that causes the crash is Unicode.

You can easily see this when you open the generated proxy code and look into the RfcParameter and RfcField custom attributes. If they don't contain Length2 and Offeset2 parameters, but only Length and Offset, this error will happen on Unicode system.

Regenerating the proxy with the new system makes the proxy work with both Unicode and non-Unicode system and should work the same with older system. If you want to be sure, Windiff the new proxies with the old ones. They should be identical except the Lenght2 and Offset2 parameters.

Answers (0)