cancel
Showing results for 
Search instead for 
Did you mean: 

Creating JE problem

former_member209699
Contributor
0 Kudos

Hi,

I am posting JE through SDK.

While adding it is showing error as Unbalanced transactions.

If I pass single debit and credit entries it is creating but in my case i have to pass 2 credit and 2 debit entries.

Dim vJE As SAPbobsCOM.JournalEntries

If objMain.objCompany.InTransaction = False Then

objMain.objCompany.StartTransaction()

End If

vJE = objMain.objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)

'vJE.UserFields.Fields.Item("U_Branch").Value = Branch

vJE.TaxDate = Now

vJE.DueDate = Now

vJE.Series = Series

vJE.ProjectCode = PrjCode.Trim

vJE.Memo = Remarks

vJE.Lines.AccountCode = DebitorAct.Trim

vJE.Lines.Credit = 0

vJE.Lines.Debit = Amount

vJE.Lines.ProjectCode = PrjCode.Trim

vJE.Lines.CostingCode = Branch.Trim

Call vJE.Lines.Add()

Call vJE.Lines.SetCurrentLine(1)

vJE.Lines.AccountCode = CreditorAct.Trim

vJE.Lines.Credit = Amount

vJE.Lines.Debit = 0

vJE.Lines.ProjectCode = PrjCode.Trim

vJE.Lines.CostingCode = Branch.Trim

Call vJE.Lines.Add()

Call vJE.Lines.SetCurrentLine(1)

vJE.Lines.AccountCode = ServiceAct1.Trim

vJE.Lines.Credit = 0

vJE.Lines.Debit = SvrAmount

vJE.Lines.ProjectCode = PrjCode.Trim

vJE.Lines.CostingCode = Branch.Trim

Call vJE.Lines.Add()

Call vJE.Lines.SetCurrentLine(1)

vJE.Lines.AccountCode = ServiceAct2.Trim

vJE.Lines.Credit = SvrAmount

vJE.Lines.Debit = 0

vJE.Lines.ProjectCode = PrjCode.Trim

vJE.Lines.CostingCode = Branch.Trim

Dim IRetCodeHeader As Integer = vJE.Add()

regards:

SANDY

Edited by: Sandeep Saini | Roorkee | India on Jun 12, 2009 2:25 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Just go through the tables of journal entries i.e. OJDT,JDT1.When a particular account is credited then other account is debited.Every header entry i.e OJDT has two footer entries i.e JDT1.

In u r coding,u are having one header entry and four footer entries.So it gives error.If u give two header entries then u can give four footer entries i.e 2 credit and 2 debit entries.

former_member209699
Contributor
0 Kudos

Hi Dilip,

I need to pass a single entry for 2 credit and 2 debit amount via SDK.

And we can pass this type of entry manually. Using single header entry.

It depends on you how many entries you want to post, it is not restricted to 2 two footer entries i.e JDT1.

You can pass as many as you can But balanced should be matched.

regards:

SANDY

former_member209699
Contributor
0 Kudos

The problem was resolved by myself......