Skip to Content
Former Member
Jun 08, 2008 at 10:21 AM

Single Sign On on SAP BO


Hi there !

I am having some problems using single sign on in SAP BO .I have programmed it based on SAPBO samples so this is what I have :

Dim sConnectionString As String

SboGuiApi = New SAPbouiCOM.SboGuiApi()

sConnectionString = Command

'// connect to a running SBO Application


'// get an initialized application object

SBO_Application = SboGuiApi.GetApplication()

' Step 1

' Initialize the Company Object

vCmp = SBO_Application.Company

cookie = vCmp.GetContextCookie()

conStr = SBO_Application.Company.GetConnectionContext(cookie)

If vCmp.Connected = True Then


End If

ret = vCmp.SetSboLoginContext(conStr)

If Not ret = 0 Then

Exit Sub 'the operation has failed.

End If


On line "

vCmp = SBO_Application.Company" it gives me a NullPointerException . The question is , how do I initialise the vCmp value wich I have declared as SAPBobsCOM.Company .

Sorry for my lack of experience, I am begginer so ...

Best regards,

Ivan Frias

Edited by: Ivan Frias on Jun 8, 2008 1:47 PM

I forgot to istanciate company vCmp object . Now I have another doubt . When I make vCmp.Connect I get the error with code -222 indicating that there is "No current period"...

I would appreciate if anyone could help me here , telling how it is done , at least the things I need to research in order to accomplish my task .


Ivan Frias