cancel
Showing results for 
Search instead for 
Did you mean: 

.Net Connector and .Net Framework 2.0 + issue

Former Member
0 Kudos

Hi there,

I am using the .Net Connector with the framwork 3.5 (or 2.0 sometimes), in any case I am receiving an error when calling some BAPIs.

Such error doesn't happen all the time (it is in regards to a conversion from string to double, but the error itself is not important), but it does happen in the connector (I tracked it down to the Connector.Rfc dll), and it never happens when running the framework version 1.1.

The problem is that such dll makes heavy use of Reflection, in particular the Type.GetProperties function to retrieve the list of properties for a certain proxy type, and then it iterates over a second array with the properties it expect the type to have and the code expects both arrays to have the same propertyes in the same indexes.

The problem is that by desing starting in Framework 2.0 the return of the GetProperties is no longer in a fixed order, therefore sometimes both arrays of properties are not in the same order and the rfc dll raises an error because it tryes to conver a the type of a property to the type of another property.

I guess this will not be fixed, so my question is, is there a way to get the sources of the two connector relevant dlls in order to fix the issue and recompile?

Thanks

Regards

Mauricio

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Looks like SAP Note 0001413789 fixes the issue.

Regards

Mauricio

Former Member
0 Kudos

Thank you so much Mauricio!

Filippo Bottega.

Former Member
0 Kudos

Hi Mauricio,

Though I have not worked with ver 3.5 and have not faced this issue but I remeber this issue raised some time back in this forum.

See if it helps you:

Reiner Hille-Do...

2. The problem of NCo runtime with conversion, but with the behavior change of the function Type.GetProperties(): The order of the returned PropertyInfos is changed in 2.0 which could lead to the fact that the NCo runtime tries to store a String value to a Double property.

A workarround is simply calling <mySAPStructure>.GetProperties() from you code on all affected SAP structures before doing anything with NCo.

Regards.

Former Member
0 Kudos

Hi

Actually i am popping another qustion and need your help in this. I have downloaded this file SAP.Net.Setup_2.0.msi but i am not able to install it on my machine. I have .Net Framework 3.5 and Visual Studio 2005 installed on my machine. But as soon as i tried to install this SAP.Net.Setup file , it asked for .Net Framework Version 1.1.4322. So please help me that how did you configure this for .Net Framework 3.5 .

I Downloaded .Net Framework 1.1.4322 and installed it on my machine but now it gives me another error that i should have Visual Studio.NET 7.1 Integrated Development Environment (IDE ) installed on my machine .

Can you please help me in this ? How could i install it on my machine ?

Regards / Prashant

Former Member
0 Kudos

Hello,

I have downloaded this file SAP.Net.Setup_2.0.msi 
but i am not able to install it on my machine.
I have .Net Framework 3.5 and Visual Studio 2005 installed on my machine. 
But as soon as i tried to install this SAP.Net.Setup file ,
it asked for .Net Framework Version 1.1.4322. So please help me that
how did you configure this for .Net Framework 3.5 .

I have same configuration and issue .

Did you got any solution please share

Thanks ...

Sonal....

Edited by: Sonal Patel on Jun 11, 2010 12:03 PM

Former Member
0 Kudos

"SAP Announcement: SAP plans a new Release of the SAP .NET Connector :

We are pleased to announce release 3.0 of the SAP .NET Connector. It will support current Windows releases (Windows XP 32 Bit, Windows 2003 32/64 Bit (x64), Windows Vista 32/64 Bit (x64), Windows 2008 64 Bit (x64) and later Windows 7) as well as up-to-date Microsoft .NET Runtime versions (2.0, 3.0 and 3.5).

If you are interested, please check out the details on the Connectors SMP Hompage, SAP .NET Connector section."

If you can not wait, you should take a look on ERP Connect from Theobald Software:

http://www.theobald-software.com/en/products/erpconnect.htm

Greetings from Germany,

Andreas

Former Member
0 Kudos

We have also seen this issue. The error we get is a RfcMarshalException when the connector is trying to convert a value to a wrong type. This is due to mismacth between the propertylist that is cached by the connector, and the current instance of an object.

So, we have also seen that this happens due to the fact that the GetProperties returns a random order in dotnet >= 2.0, compared to 1.1 where it was the same order every time.

If we could just get the SAP devs to open up the Connector project and change one tiny line of code....

(access the properties by name instead of index)

Does anyone have a clue of wheather this would be possible?

I read somewhere that the connector has support until March 2013, so I guess a hotfix/service pack should not be out of the question, right?

Best regards / Jon Jarnsäter, ReadSoft

Former Member
0 Kudos

Hi SAP,

I too am having this problem. Intermittently the data is returned in the wrong columns back from the RFC.

Does calling the GetProperties method before making the RFC call solve the issue as mentioned in some other posts?

i.e.

Dim myTable As New YG00004Table

myTable.GetType.GetProperties()

Former Member
0 Kudos

Hi SAP,

we have the problem too. If we use the SAP.Connector.dll in .NET 2.0 environment to call methods of BAPI USER (such as GetDetail or Change) we can monitor some reorder of data fields during its transfer to the SAP system or back. Fields of structures like BAPILOGOND were unspecified reordered and SAP system rejects data.

We belive, that errors are based on handling of System.Reflection.Type.GetMember() which delivers fields of structures in unspecified order since .NET Framework 2.0.

Is there any hope to get a fixed version of SAP.Connector.dll and SAP.Connector.RFC.dll to run RFC connections in .NET 2.0 environments too?

Thanks for any answer.

Best regards

Tino Lindner