📚 SAP Business One SDK Help

Application Object
See Also  Members  Example

Description

This is the root object for the UI API, reflecting the current SAP Business One application on which the connection is made.

Access the object via the SboGuiApi.GetApplication method.

Object Model











Example

Establishing a connecting and getting Application object (Visual Basic)Copy Code
Option Explicit
'//*****************************************************************
'// At the begining of every UI API project we should first
'// establish connection with a running SBO application.
'*******************************************************************

Private WithEvents SBO_Application As SAPbouiCOM.Application
Private oForm As SAPbouiCOM.Form

Private Sub SetApplication()

'*******************************************************************
'// Use an SboGuiApi object to establish the connection
'// with the application and return an initialized appliction object
'*******************************************************************

    Dim SboGuiApi As SAPbouiCOM.SboGuiApi
    Dim sConnectionString As String

    Set SboGuiApi = New SAPbouiCOM.SboGuiApi

    '// by following the steps specified above, the following
    '// statment should be suficient for either development or run mode

    sConnectionString = Command

    '// connect to a running SBO Application

    SboGuiApi.Connect sConnectionString

    '// get an initialized application object

    Set SBO_Application = SboGuiApi.GetApplication()

End Sub









See Also