Skip to Content
0
Former Member
Mar 22, 2004 at 11:52 AM

JournalEntries - error with lines

32 Views

Hi,

Is there a Business object expert who can help me?

My problem is, when i am trying to add a journalentry, I get a line error, as if i was writing into the same line, with this code:

Dim vJE As SAPbobsCOM.JournalEntries

vJE = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)

vJE.TaxDate = Now

vJE.Lines.AccountCode = "3000"

vJE.Lines.ContraAccount = "6010"

vJE.Lines.Credit = 0

vJE.Lines.Debit = 150

vJE.Lines.DueDate = Now

'vJE.Lines.Line_ID = 0

vJE.Lines.ReferenceDate1 = Now

vJE.Lines.ShortName = "3000"

vJE.Lines.TaxDate = Now

Call vJE.Lines.Add()

Call vJE.Lines.SetCurrentLine(1)

vJE.Lines.AccountCode = "6010"

vJE.Lines.ContraAccount = "3000"

vJE.Lines.Credit = 150

vJE.Lines.Debit = 0

vJE.Lines.DueDate = Now

'vJE.Lines.Line_ID = 1

vJE.Lines.ReferenceDate1 = Now

vJE.Lines.ShortName = "6010"

vJE.Lines.TaxDate = Now

Call vJE.Lines.Add()

vJe.add()