cancel
Showing results for 
Search instead for 
Did you mean: 

-1116 error while creating business partner

0 Kudos

hi. i am getting error "-1116" while creating Business Partner. so anybody please give solution.

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

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"

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Megha,

Can you attach the screenshot of the error message?

Kind regards,

ANKIT CHAUHAN

SAP SME Support

0 Kudos
ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Megha,

Comment out the customized code written under SBO_SP_TransactionNotification and SBO_SP_PostTransactionNotice and check the issue again.

It seems that the error is not coming from SAP Business One.

Kind regards,

ANKIT CHAUHAN

SAP SME Support

0 Kudos

Ok .Thank you sir.

Regards Megha

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Megha,

Please close this thread by marking the correct answer if it resolves the issue.

Kind regards,

ANKIT CHAUHAN

SAP SME Support

0 Kudos

Hi sir. its not working same error is occuring

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Megha,

Send us the screenshots of SBO_SP_TransactionNotification and SBO_SP_PostTransactionNotice.

Kind regards,

ANKIT CHAUHAN

SAP SME Support

0 Kudos

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

0 Kudos

When i right click on bp.add() and select Quick watch i am now getting -5002 error.can anyone please give solution .

0 Kudos

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

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Please share complete error message here.

Regards,

Nagarajan