cancel
Showing results for 
Search instead for 
Did you mean: 

Unhandled exception using .NET Connector 2.0 and VB.NET

Former Member
0 Kudos

I'm having difficulties getting a call to SAP to work. It worked in .NET Connector 1.0. I tried the same code with .NET 2.0 with a few variable declaration modifications and I get an "Unhandled Exception" error. The error reads "Unhandled exception of the type SAP.Connector.RfcException. See RFC Trace File or SAP system log for more details" This actually occurs in the Proxy component that is automatically generated.

My Code:

' Create Variables

Dim CustomerBO As New ZDISPLAY

Dim CustTable As New ZBAPICUSDISTable

Dim CustReturn As New SAP.Connector.BAPIRET1

Dim SAPDest As New SAP.Connector.Destination

Dim rsItems As New System.Data.DataTable

' Setup Connection Information for our call into SAP BAPI Object

SAPDest.AppServerHost = strSession

SAPDest.Username = strUser

SAPDest.Password = strPass

SAPDest.Language = strLang

SAPDest.Client = strClient

SAPDest.SystemNumber = "0"

CustomerBO.Connection = New SAP.Connector.SAPConnection(SAPDest)

'Call the SAP BAPI

CustomerBO.ZCustomerDisplay1(strSoldTo, strShipTo, strSalesOrg, strDistch, strDivision, strOrdType, CustReturn, CustTable)

The statement above passes control to the SAPProxy Object

Code breaks on this statement in the SAPProxy Object

results = SAPInvoke("ZCustomerDisplay1", new Object() { _

Soldto,Shipto,Salesorg,Distch,Division,Ordertype,Items })

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I posted an OSS Note to address this issue. Note number is 352687.