Skip to Content
author's profile photo Former Member
Former Member

Updating JournalEntries object with more than one currency fails

I'm using SBO 6.50 (exactly CEE version 7.60.014 SP:01 EF:08).

I'm trying to update memo field of existing journal entries. Most of them works OK, but if I try to update entry with more than one currency, update fails with an error code -5002 and message:

Transaction includes more than one currency [OCRN].

Code (in C++) is quite simple:

SAPbobsCOM::ICompanyPtr m_company = SAPbobsCOM::ICompanyPtr("SAPbobsCOM.Company");
SAPbobsCOM::IJournalEntriesPtr pEntry = m_company->GetBusinessObject(SAPbobsCOM::oJournalEntries);
long m_nId = 1;	// TransId field, any valid value

try
{
	if (pEntry->GetByKey(m_nId) != -1)
		return;

	pEntry->Memo = _bstr_t("Memo");;
	if (pEntry->Update() < S_OK)
		throw(0);
}
catch(...)
{
	long lError; BSTR bstrError;
	m_company->GetLastError(&lError, &bstrError);
}

What's wrong? Using multiple currencies in journal entry is correct, it is possible to add them manually so it should be possible to update such an "safe" field as Memo is.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 24, 2005 at 03:02 PM

    Hi,

    I have the same problem, but if you go to Administration->System Initialization ->Document Settings, select "Per Document", and in Document, choose "Journal Entry", by default, the options are clicked, or "Blocked", this is why in DI yoy get this message.

    Try to unchecked and it will work.

    HTH,

    Ribeiro Santos

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.