cancel
Showing results for 
Search instead for 
Did you mean: 

Getting information about rejection of RFC logon

michael_haehnel
Explorer
0 Kudos

Dear community,

we use a Visual Basic program to connect to SAP for doing funny things.

The connection is opened via RFC in this style:

(like published here and found at many other places in the SAPnet and internet)

If oBAPICtrl.Connection.Logon(frmStart.hWnd, False) = False Then
  MsgBox "R/3 connection failed"
  End
End If
The call of .Connection.Logon returns True/False only. But - in professional programming - I need to tell the reason WHY the connection was refused. There are so many possibilities (from wrong password to system not reached).

So, can anyone tell me how to retrieve any sort of further information? Can't believe it is not possible...

Thank you for the help.

Michael

Accepted Solutions (1)

Accepted Solutions (1)

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Michael,

you are referring to a pretty old approach for connecting from a VB environment to an ABAP system. I*'d recommend to have a look at the SAP Connector for Microsoft .NET 3.0 aka SAP .NET Connector 3.0 aka NCo 3.0. It offers all you need and is more powerful in the usage. Have a look at the blog . it provides a good introduction and is also pointing to the download section. The downloadable SDK includes also examples for VB. If a connection cannot be established, an exception will be thrown containing a message why.

Best regards,

Markus

michael_haehnel
Explorer
0 Kudos

Hi Markus,

thanks for your hint. I understand I need to change to the NCo 3.0 as this is the current technology.

Best regards.

Michael

Answers (0)