on 07-02-2012 5:12 PM
Hi
When i install Add-on it gives message Object reference not set to an instance of the object . I am using Sap B1 2007 . PL10
I am following this tutorial
Thanks
Hi Sunny,
It means you are using the object but you didn't declare it. Debug it line by line. Put some breakpoint in your source code.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sunny,
Sounds that you are not connected to Di Api.
I give you what I use to connect to SAP in my add-on:
#Region "Initialisation"
Public Sub New()
MyBase.New()
Try
SetApplication()
Catch ex As Exception
End Try
End Sub
Private Sub SetApplication()
Try
Dim SBOUI As New SAPbouiCOM.SboGuiApi
Dim sConnect As String = "0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056"
If Environment.GetCommandLineArgs.Length > 1 Then
SBOUI.Connect(Environment.GetCommandLineArgs.GetValue(1))
Else
SBOUI.Connect(sConnect)
End If
SBO = SBOUI.GetApplication
Try
oC = SBO.Company.GetDICompany
Catch ex As Exception
GC.Collect()
End Try
'Vérification de la connection
If oC.Connected = True Then
Message.Err_Me("Connexion UI/DI OK", SBO, BoStatusBarMessageType.smt_Success)
else
Message.Err_Me("Connexion UI/DI NOT OK", SBO, BoStatusBarMessageType.smt_Error)
End If
Catch ex As Exception
Try
Message.Err_Me("SetApplication-UI/DI", SBO, BoStatusBarMessageType.smt_Error, ex.Message)
Catch ex1 As Exception
End Try
End Try
End Sub
Regards
Christophe
User | Count |
---|---|
100 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
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.