cancel
Showing results for 
Search instead for 
Did you mean: 

Journal Voucher with Foreign currency

costas_ioannou2
Active Participant
0 Kudos

Hi,

I'm trying to use the SDK to add a journal voucher in a foreign currency. I set

oJournal.JournalEntries.Lines.FCCurrency = "USD";

but it doesn't seem to work. Is there anything else I need to do?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Costas,

Basically yes, but take care: The G/L account should set to all currency (multi currency) to be able to post in FC. Go into sap, and try to add values on Vouchers.

Here is a sample code for issuing in FC a voucher.

Dim oJV As SAPbobsCOM.JournalVouchers = oCompany.GetBusinessObject(BoObjectTypes.oJournalVouchers)
        oJV.JournalEntries.SetCurrentLine(0)
        oJV.JournalEntries.VatDate = Today
        oJV.JournalEntries.TaxDate = Today
        oJV.JournalEntries.DueDate = Today
        oJV.JournalEntries.ReferenceDate = Today
        oJV.JournalEntries.Reference = "REF"
        oJV.JournalEntries.Reference2 = "REF2"
        oJV.JournalEntries.Memo = "MEMO"
        oJV.JournalEntries.Lines.SetCurrentLine(0)
        oJV.JournalEntries.Lines.AccountCode = "38610100"
        oJV.JournalEntries.Lines.FCDebit = 0
        oJV.JournalEntries.Lines.FCCredit = 100
        oJV.JournalEntries.Lines.FCCurrency = "EUR"
        oJV.JournalEntries.Lines.Add()
        oJV.JournalEntries.Lines.SetCurrentLine(1)
        oJV.JournalEntries.Lines.AccountCode = "38610100"
        oJV.JournalEntries.Lines.FCDebit = 100
        oJV.JournalEntries.Lines.FCCredit = 0
        oJV.JournalEntries.Lines.FCCurrency = "EUR"
        If oJV.Add <> 0 Then
            sbo_application.MessageBox(oCompany.GetLastErrorDescription)
        End If

Regards,

J.

costas_ioannou2
Active Participant
0 Kudos

Thanks that worked

Answers (1)

Answers (1)

Former Member
0 Kudos

Try oJournalVouchers.JournalEntries.Lines.FCCurrency

Thanks,

Gordon