cancel
Showing results for 
Search instead for 
Did you mean: 

System.NullReferenceException

Former Member
0 Kudos

Hello,

I tried to call a simple RFC-function using the .Net-Connector. The Wizard generates "SAPProxyDll1.sapwsdll" which contains the following void:

public void Z_Vb_Test_Fg_Called_By_Vb (

)

{

object[]results = null;

results = this.SAPInvoke("Z_Vb_Test_Fg_Called_By_Vb",new object[] {

});

return;

}

When I call this void by clicking a button in my Windows-Form (whithout making any changes at the rest of the coding) the following Error appears:

"An unhandled exception of type 'System.NullReferenceException' occurred in sap.connector.dll

Additional information: Object reference not set to an instance of an object."

Do I have to make any changes at the automatically generated coding, or what is the problem?

Thanks a lot.

Jochen

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

thanks for your answer. The problem was that my connection didn't work properly, but now it works.

Best regards

Jochen

reiner_hille-doering
Active Contributor
0 Kudos

This can have many reasons. You should at least post the detailed call-stack (including "Non-user code").

Of cause you need to make sure that you use the proxy correctly, e.g. create and open a connection before doing the call.