Skip to Content

Connect via RFC from VB with SSO

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 01, 2012 at 04:32 AM

    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: visitSAP Single Sign-On 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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.