Skip to Content
author's profile photo Former Member
Former Member

Set BankKey in OCRB

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?

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 03, 2008 at 12:13 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Nov 03, 2008 at 11:07 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 03, 2008 at 01:06 PM

    Thank you.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.