cancel
Showing results for 
Search instead for 
Did you mean: 

Set BankKey in OCRB

Former Member
0 Kudos

Hello,

i want to set bank accounts with DI-API.


Dim bp As SAPbobsCOM.BusinessPartners
bp = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners)

bp.BPBankAccounts.InternalKey = 1234 'BankKey ?
bp.BPBankAccounts.AccountNo = "123456789"
bp.BPBankAccounts.BankCode = "12345678"
bp.BPBankAccounts.Country = "DE"

All informations are set correctly. Only the BankKey-Field is empty in SBO.

Is the InternalKey-Field the correct place to set the BankKey?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks, but it doesn't works.

My value "1234" means a correct AbsEntry.

I try your example with the same result.

Everything except the BankKey is saved.

Former Member
0 Kudos

Hi Marcel,

If you are running Business One 2007 version, there is an issue with this where the bank key remains blank. Please see SAP note 1043758 for more information.

This fix is due to be included shortly in the 2007 version. Please check the info.txt file accompanying the patch for note number 1043758 when the new patch is released to verify if the fix has been included.

Regards,

Niall

SAP business One Forums

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you.

Former Member
0 Kudos

hi,

Dim RS As SAPbobsCOM.Recordset = Nothing

RS = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

RS.DoQuery("select AbsEntry from ODSC where BankCode='12345678'")

Dim bp As SAPbobsCOM.BusinessPartners

bp = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners)

bp.BPBankAccounts.InternalKey = RS.Fields.Item("AbsEntry").Value

bp.BPBankAccounts.AccountNo = "123456789"

bp.BPBankAccounts.BankCode = "12345678"

bp.BPBankAccounts.Country = "DE"

Sets or returns the foreign key of the bank as defined in the Banks object (ODSC).

regards,

varma