Skip to Content
0
Former Member
Jun 26, 2009 at 03:04 PM

Genrating Journal Entries

33 Views

Not able to add journal entries by foll. code can anybody suggest

Public Sub addocat()

Dim oJE As SAPbobsCOM.JournalEntries

Dim strerror As String

Dim docdate As Date

'Dim strtax As String

Set oJE = Soft_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)

'MsgBox Soft_Company.companyname

oJE.Reference2 = "Gross Rental"

oJE.TransactionCode = 29 My next transaction no on OJDT

oJE.Memo = "Petrol Entry 12345"

oJE.VatDate = Now

oJE.Lines.AccountCode = "1320000001"

oJE.Lines.ShortName = "C1"

oJE.Lines.Credit = 500

oJE.Lines.LineMemo = "rental amt"

oJE.VatDate = Now

Call oJE.Lines.add

oJE.Lines.AccountCode = "2231000001M1"

oJE.Lines.Debit = 500

oJE.Lines.LineMemo = "Deposit Bank"

oJE.VatDate = Now

Call oJE.Lines.add

ret = oJE.add

End Sub