cancel
Showing results for 
Search instead for 
Did you mean: 

Update Journal Voucher

Former Member
0 Kudos

Hi All,

I'm try to update a line in Journal Voucher, but the method Browser.RecordSet was with this error: "The object does not support this method, or method not implemented yet."

This is the Code:

Dim oJournalVoucher As SAPbobsCOM.JournalVouchers

Dim oRecordSet As SAPbobsCOM.Recordset

Dim nDebit As Double

Set oJournalVoucher = oCompany.GetBusinessObject(oJournalVouchers)

Set oRecordSet = oCompany.GetBusinessObject(BoRecordset)

oRecordSet.DoQuery ("Select * From OBTF")

oJournalVoucher.JournalEntries.Browser.Recordset = oRecordSet

oJournalVoucher.JournalEntries.GetByKey ("1")

oJournalVoucher.JournalEntries.SetCurrentLine (0)

oJournalVoucher.JournalEntries.Lines.Debit = nDebit

Anybody help me?

Thank´

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

you have to do that in this way,

oJournalVoucher = (SAPbobsCOM.Items)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalVouchers);

if (oJournalVoucher.GetByKey("1") == true)

{

oJournalVoucher.JournalEntries.SetCurrentLine (0)

oJournalVoucher.JournalEntries.Lines.Debit = nDebit

int iRetCode = oJournalVoucher.Update();

}

hope it will work.