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

Problem with Tax account has not been defined for the selected tax code

Dear guys..

I have a problem with creating journal entry with DI API and message says "Tax account has not been defined for the selected tax code"

1. Set oJnl = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)

2. oJnl.TaxDate = Now

3. oJnl.Memo = "Tax Invoice"

4. oJnl.Lines.ShortName = sBpAccCode ' BP Code

5. oJnl.Lines.Credit = sAngka ' Amount

6. oJnl.Lines.Add

7. oJnl.Lines.AccountCode = sBpAccCode ' Bp Code

8. oJnl.Lines.Debit = sTax ' Amount

9. oJnl.Lines.Add

10. oJnl.Lines.AccountCode = sTaxGLAcct ' Tax Acct Code

11. oJnl.Lines.Debit = DPP ' Amount

12. oJnl.Lines.Add

I supposed that i can't entry sBpAccCode in Line 7. I try to change in line 7 with sTaxGLAcct and so running well. But if i try entry via screen SBO with same posting, it's successfully saved.

What happen maybe in my above code??

Thanks

Rgds

Toro -


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 07:33 AM

    Hi Toro,

    I had the same problem and solved it by removing the reference date, tax date and due date properties. Herewith the link I'm referring to.

    [JDT1.Account][line: 1] , 'Tax account has not been defined...'

    Hope it helps,

    Adele

    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.