Skip to Content
author's profile photo Former Member
Former Member

Getting SAPbobsCOM.Company object

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Jun 08, 2007 at 05:29 PM

    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
    

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 10, 2007 at 11:03 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2007 at 06:11 AM

    Hi,

    Thx for help

    It works using the single sign on

    Add a comment
    10|10000 characters needed characters exceeded

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.