Utiliza un bloque try-catch para ver si se genera algun error y de que tipo.
Dim vCmp As New SAPbobsCOM.Company
‘// Set Company object properties
vCmp.UseTrusted = True
vCmp.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2008
vCmp.Server = “xxxxxx“
vCmp.LicenseServer = “xxxxxx:30000″
vCmp.CompanyDB = “xxxxxx“
vCmp.UserName = “xxxxxx“
vCmp.Password = “xxxxxx“
Try
‘// Connects to the SAP Business One company database.
vCmp.Connect()
‘// Call Documents obj
Dim oJE As SAPbobsCOM.Documents
‘// BoObjectTypes Enumeration specifies the object types.
oJE = vCmp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
‘// Browses XML formatted data and enables to update the data.
‘
‘// Parameters
‘// XmlFileStr: Specifies the XML file name or the XML content string
‘// depending on the value of the XMLAsString property.
‘// Index : Specifies the number of the object that you want
‘// to read from the XML data (starts from 0, default 0).
oJE.Browser.ReadXml(“C:\temp.xml”, 0)
‘// The Add function adds a record to the object table
‘// in SAP B1 company database.
‘// If there is no errors while importing, the Add function returns 0
If oJE.Add() = 0 Then MsgBox(“OK!”)
Catch ex As Exception
MsgBox(ex.Message)
Finally
‘// Disconnects an active connection with the company database.
vCmp.Disconnect()
vCmp = Nothing
End Try
¿Puedes subir o mostrar un XML de prueba para verificar que esta bien estructurado?