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

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

Hello Adele:

Just had the same kind of problem you had! (posting on 10/16) Mine didn't go away with removal of referencedate and duedate. Matter in fact I have defaulted all my dates which I reall need to modify (SBO UI let you modify the posting date and duedate, doesn't make any sense DI-API doesn't allow it)... In any case. I still have the same error message!

Would you please help? Thank YOu here's my code..

SAPbobsCOM.JournalEntries oje;

oje = (SAPbobsCOM.JournalEntries)(global.ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries));

//oje.ReferenceDate = postdate;

//oje.TaxDate = docdate;

//oje.DueDate = duedate;

oedit = (SAPbouiCOM.EditText)(oform.Items.Item("15").Specific);

if (oedit.String != "")

oje.Memo = oedit.String;

omatrix = (SAPbouiCOM.Matrix)(oform.Items.Item("u_matrix").Specific);

for (int i = 1; i <= omatrix.RowCount; i++)

{

oedit = (SAPbouiCOM.EditText)(omatrix.Columns.Item("AC").Cells.Item(i).Specific);

oje.Lines.AccountCode = oedit.String;

oedit = (SAPbouiCOM.EditText)(omatrix.Columns.Item("PC").Cells.Item(i).Specific);

oje.Lines.CostingCode = oedit.String;

oedit = (SAPbouiCOM.EditText)(omatrix.Columns.Item("credit").Cells.Item(i).Specific);

oje.Lines.Credit = System.Convert.ToDouble(oedit.String);

oedit = (SAPbouiCOM.EditText)(omatrix.Columns.Item("debit").Cells.Item(i).Specific);

oje.Lines.Debit = System.Convert.ToDouble(oedit.String);

oje.Lines.Add();

//oje.Lines.SetCurrentLine(i);

}

if (oje.Add() != 0)

{

global.ocompany.GetLastError(out errcode, out errmsg);

global.oapplication.MessageBox("Error: " + errcode.ToString() + " : " + errmsg, 1, "OK", "", "");

return;

}

else

{

global.oapplication.StatusBar.SetText("el proceso completa", SAPbouiCOM.BoMessageTime.bmt_Short,

SAPbouiCOM.BoStatusBarMessageType.smt_Success);

}

OH... Also, I have tried all the testing stuff on SBO UI and it works. So I am more confused now!

Message was edited by: Bo Peng

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 Oct 19, 2006 at 11:09 PM

    Ah... find out the first part of the problem... error is resolved when I insert the system account# instead of the actual account#... However for some reason. I still can't modify the posting, doc, tax date.. It default to today? Anyone successful at that? Thank You!

    Man.. this error message covers so much b.S.!

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Bo,

      1. The Reference Date can not be set as this is the current date of the system for the Document.

      2. When posting a journal - the due date is not applicable (this is only for marketing documents) so this should not be set either.

      3. You should be able to set the tax date, just make sure it falls in an active posting period of the company you're posting to.

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.