Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Connect via RFC from VB with SSO

0 Kudos

Hi

I am using VB6 to connect to ECC 6.0 using RFC. The code works fine but only using non single sign on. I can't work out how to use it with SSO.

Has anyone ever managed to create a silent connection with SSO in VB?

This is the code that I am using for non-SSO logon:

Dim R3 As Object

Set R3 = CreateObject("SAP.Functions")
R3.Connection.User = "XXXX"
R3.Connection.Password = "XXXXX"
R3.Connection.Client = "900"
R3.Connection.ApplicationServer = "10.68.48.80"
R3.Connection.Language = "EN"

If R3.Connection.logon(0, True) <> True Then
    Msgbox "ERROR - logon to SAP Failed"
    Exit Function
End If

Thanks

Tom

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Tom,

I would say this is not possible from the SAP.Functions object without using a SNC software.

I also have a Single Sign on model and the closest I have got without using any certifcates is a Popup containing the User name, Password etc with OK and System button. I dont need to enter the password, I just have to press Ok.

Now if you want to include SNC, you will have to use a partner product like Microsoft Kerberos or Microsoft Windows NTLM.

You need to use transaction STRUST and import the client certificate into SAP.

Go to table VSNCSYSACL and you can see all the Internal and External SNC Entries.

Please check these following links.

[This FAQ content was deleted: visit for help]

Also, you can see a link in which an IBM product has been connected to SAP.

http://www.ibm.com/developerworks/websphere/library/techarticles/1205_agarwal/1205_agarwal.html

You would need to do something similar.

Thanks,

Shambu

Message was edited by: Jason Lax

2 REPLIES 2

Former Member
0 Kudos

Hi Tom,

I would say this is not possible from the SAP.Functions object without using a SNC software.

I also have a Single Sign on model and the closest I have got without using any certifcates is a Popup containing the User name, Password etc with OK and System button. I dont need to enter the password, I just have to press Ok.

Now if you want to include SNC, you will have to use a partner product like Microsoft Kerberos or Microsoft Windows NTLM.

You need to use transaction STRUST and import the client certificate into SAP.

Go to table VSNCSYSACL and you can see all the Internal and External SNC Entries.

Please check these following links.

[This FAQ content was deleted: visit for help]

Also, you can see a link in which an IBM product has been connected to SAP.

http://www.ibm.com/developerworks/websphere/library/techarticles/1205_agarwal/1205_agarwal.html

You would need to do something similar.

Thanks,

Shambu

Message was edited by: Jason Lax

0 Kudos

Hi

I have managed to get a solution to this by using the SAP.LogonControl.1 object to connect using SNC:

Dim R3 As Object

Dim LogonControl As Object

Dim conn As Object

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

Set R3 = CreateObject("SAP.Functions")

Set conn = LogonControl.NewConnection

conn.SystemNumber = 0
conn.ApplicationServer = "10.10.10.10"   'PRD
conn.Client = "900"
conn.User = "XXXXX"
conn.Language = "EN"
conn.SNC = True
conn.SNCName = "p:SAPServicePRD@corp.XXX.com"
conn.SNCQuality = 3

If conn.logon(0, True) <> True Then
   msgbox "ERROR - logon to SAP Failed"
    Exit Function
End If

R3.Connection = conn

Thanks

Tom