cancel
Showing results for 
Search instead for 
Did you mean: 

Using SAP .Net Connector for App Code Update

Former Member
0 Kudos

I have a windows forms application which connects to SAP using SAP functions.

The connection part currently still works but there is no longer a supported way to connect to SAP.

The rest of the code used to run the SAP transaction is no longer suppported.

App is written in vba code (Runs in Excel)

I need to update my code so that it will work wih the new SAP.Net connector.

Any help would be great.

Below is the section of my code:

' Request OLE to provide logon control object

Set LogonControl = CreateObject("SAP.LogonControl.1")

LogonControl = CreateStructure("SAP.LogonControl.1")

' Get a new connection

Set Conn = LogonControl.NewConnection

' Catch errors to prevent exit from application when no connection

On Error Resume Next

' Logon to SAP R/3 system and inform user about logon result

<irrelevant code ommited>

' Request OLE to provide transaction collection object

'Set TxnCollection = CreateObject("SAP.Transactions.1")

'Set TxnCollection.connection = Conn

TxnCollection = CreateTransactionID("SAP.Transactions.1")

TxnCollection.connection = Conn

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

so basically you want example code using the .net connector....

Former Member
0 Kudos

yes