on 06-08-2007 4:53 PM
Hi everybody,
Is it possible to get a SAPbobsCOM.Company object (DI API) from the Application object (UI API) witch is got using the single sign on.
Help appreciated
Thx
Mongi HAMMAMI
Of course.
Example :
'SBOapp = SboGuiApi.GetApplication()
SBOcomp = New SAPbobsCOM.Company
sCookie = SBOcomp.GetContextCookie
sConnectionContext = SBOapp.Company.GetConnectionContext(sCookie)
If SBOcomp.Connected Then SBOcomp.Disconnect()
If SBOcomp.SetSboLoginContext(sConnectionContext) = 0 Then
If SBOcomp.Connect Then
'connection is ok
Else
'connection failed
End If
Else
'failed to get context...
End If
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thx for help
It works using the single sign on
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mongi,
If you used single sign on you already declared a company variable and should just be able to use it from there on. There is no need to get the company object from the application object. If you only connected using the UI (Application object), you will not be able to use the company interface (DI) and should connect seperately to a company object. Best is to use single sign on if you're using both DI and UI.
Hope it helps,
Adele
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
102 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.