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

Error in creating JE using SDK

I am using B1 2004 B and trying to create JE using SDk(vb6).I am getting the following error:

[OJDT.BtfStatus][line: 2] , 'Row in Transaction with Account No.'

Following is my code:

Dim vJE As SAPbobsCOM.JournalEntries

Set vJE = oCmp.GetBusinessObject(oJournalEntries)

vJE.Lines.AccountCode = "500005"

vJE.Lines.ContraAccount = "131000"

vJE.Lines.Credit = 0

vJE.Lines.Debit = dblAmount

Call vJE.Lines.Add

vJE.Lines.AccountCode = "C003"

vJE.Lines.ContraAccount = "400000"

vJE.Lines.Credit = 0

vJE.Lines.Debit = (dblAmount * 105) / 100


B1 gurus please help.


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on May 06, 2005 at 01:04 PM

    When you encounter a problem when working with DI API, please remember that you should try to do the same in the SAP Business One application!

    In your case the first thing which is wrong is that at least one of the account codes in the second line is wrong (AccountCode or ContraAccount); unfortunately the error message does not really tell you that, but this happens quite often in software development.

    Secondly the principle of journal entries is to have a "balanced transaction", i.e. <total of Debit(s)> = <total of Credit(s)>... (this will be the next error you will be running into).

    I recommend that you check-out the material in the Developer Area on this site ( + check-out the SAP Business One-related material in the Education area in the SMB Portal on SAP Service Marketplace (



    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.