on 09-25-2017 10:37 AM
hi. i am getting error "-1116" while creating Business Partner. so anybody please give solution.
hi Niranjan my complete error is
"Failed to add business partner. (5) check payment consolidation in the accounting Tab or you are not authorized to perform this action"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have solved the Issue. Payment consolidation error was coming because i Didn't add field under payment consolidation in Accounting Tab. So after adding following line of code Business Partner got successfully added.
bp.BusinessType = SAPbobsCOM.BoBusinessPartnerTypes.garCompany
bp.FatherType = SAPbobsCOM.BoFatherCardTypes.cPayments_sum
bp.AccountRecivablePayables.AccountCode = "12107001"
bp.AccountRecivablePayables.AccountType = SAPbobsCOM.BoBpAccountTypes.bpat_DownPayment
bp.VatLiable = SAPbobsCOM.BoVatStatus.vLiable
When i right click on bp.add() and select Quick watch i am now getting -5002 error.can anyone please give solution .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
here is my code to add into business partner
Public Class AddBP_cls
Private WithEvents SBO_Application As SAPbouiCOM.Application
Private ocompany As SAPbobsCOM.Company
Private Sub SetApplication()
Dim SboGuiApi As SAPbouiCOM.SboGuiApi
Dim sConnectionString As String
SboGuiApi = New SAPbouiCOM.SboGuiApi
sConnectionString = Environment.GetCommandLineArgs.GetValue(1)
SboGuiApi.Connect(sConnectionString)
SBO_Application = SboGuiApi.GetApplication()
End Sub
Public Sub New()
MyBase.New()
Class_initialize_Renamed()
AddBPF()
End Sub
Private Function SetConnectioncontext() As Integer
Dim scookies As String
Dim sconnectioncontext As String
ocompany = New SAPbobsCOM.Company
scookies = ocompany.GetContextCookie
sconnectioncontext = SBO_Application.Company.GetConnectionContext(scookies)
If ocompany.Connected = True Then ocompany.Disconnect()
End If
SetConnectioncontext = ocompany.SetSboLoginContext(sconnectioncontext)
End Function
Private Function ConnectToCompany() As Integer
ConnectToCompany = ocompany.Connect
End Function
Private Sub Class_initialize_Renamed()
SetApplication()
If Not ConnectToCompany() = 0 Then
SBO_Application.MessageBox("failed to connect to company's DB")
End If
If Not SetConnectioncontext() = 0 Then
SBO_Application.MessageBox("Failed to connect to DI API")
End If
End Sub
Private Sub AddBPF()
Dim bp As SAPbobsCOM.BusinessPartners
Dim ocompany As SAPbobsCOM.Company
ocompany = SBO_Application.Company.GetDICompany
bp = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners)
Try
bp.CardName = "C014"
bp.CardCode = "C014"
bp.CardForeignName = "Mane"
bp.GroupCode = "100"
bp.CardType = SAPbobsCOM.BoCardTypes.cCustomer
bp.Addresses.AddressName = "Address1"
bp.Addresses.Block = "2"
bp.Addresses.Street = "Hawelinagar"
bp.Addresses.City = "kolhapur"
bp.Addresses.State = "MH"
bp.Addresses.Country = "ID"
bp.Addresses.AddressType = SAPbobsCOM.BoAddressType.
bo_ShipTo
bp.Addresses.Add()
bp.Addresses.AddressName = "Address1"
bp.Addresses.Block = "1"
bp.Addresses.Street = "street 1"
bp.Addresses.City = "City 1"
bp.Addresses.State = "AL"
bp.Addresses.Country = "US"
bp.Addresses.AddressType = SAPbobsCOM.BoAddressType.bo_BillTo
bp.Addresses.Add()
bp.Add()
Catch ex As Exception MessageBox.Show(ex.Message)
End Try
End Sub
End Class
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please share complete error message here.
Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
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.