Functional Description
Purpose
When dealing with multi-currency intercompany journal entries, the entry programs require all amounts within a
document to be of the same (base) currency. The table triggers, however, convert the amounts to the account company's
currency prior to storing in the Transaction Ledger table (F0911). This business function converts an amount from base
currency to company currency or company currency to base currency.
Setup Notes and Prerequisites
Special Logic
Technical Specification
If base currency code is the same as the company currency code or ledger type is not 'AA', copy input amount to output
amount and return.
If company currency code is blank, use the company to determine the currency code. Retrieve base and company
Currency Code Decimals.
If base currency code decimals is the same as the company currency code decimals, copy input amount to output
amount.
Change currency code of output amount to base currency code if mode is 'I'.
Change currency code of output amount to company currency code if mode is 'A' or 'U'.
If base currency code decimals is different than the company currency code decimals, copy input amount to output
amount.
If mode is 'I' and base decimals is less than denominated decimals, mult amount by 10 x number of times (where x =
decimal difference). If mode is 'I'and base decimals is greater than denominated decimals' mult amount by .1 x number of
times (where x = decimal difference). Change currency code and currency decimals of output amount to base currency
code and currency decimals if mode is 'I'.
If mode is 'A' or 'U' and base decimals is less than denominated decimals, mult amount by .1 x number of times (where
x = decimal diff). If mode is 'A' or 'U' and base decimals is greater than denominated decimals, mult amount by 10 x
number of times (where x = decimal diff.). Change currency code and currency decimals of output amount to denominated
currency code and currency decimals if mode is 'A' or 'U'.
^
D0000197 - MathNumeric Structure Conversion
This business function is used immediately after a fetch of unposted F0911 records and immediately
before add/update to the F0911 table. It's use is only required if you are dealing with journal entries
in the AA ledger that can be a multi-currency intercompany transactions. Its' use is only required
in G/L transaction (F0911) entry programs and the G/L Post. You should condition the call to this
business function with currency being turned on and multi-currency intercompany journal entries being
turned on. Both of these values are G/A constants found in F0009.
The purpose of this business function is to convert a MathNumeric amount to the correct currency.
When dealing with multi-currency intercompany transactions, you need to see the amount in the entry
programs in the base or originating currency. But when the amount is fetched or put into the database, it
is or needs to be in the transaction company currency.
You must pass in either the Currency Code Denominated (Transaction Company Currency Code) or the
Transaction Company Number. It is more effeicent if you already know the transaction company currency
code to pass this in the Currency Code Denominated.
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnAmountIn | MATH01 | MATH_NUMERIC | REQ | INPUT |
- - - Good Performance Low Value. | ||||
szCurrencyCodeBase | BCRC | char | REQ | INPUT |
A code that represents the currency of the company for a transaction. For a foreign currency transaction, this is the currency code of the
| ||||
szCurrencyCodeDenom | CRCX | char | OPT | INPUT |
A code that indicates the currency in which an amount is denominated. | ||||
szCompany | CO | char | REQ | INPUT |
A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company
| ||||
mnAmountOut | MATH02 | MATH_NUMERIC | OPT | OUTPUT |
- - - Good Performance High Value. | ||||
cMode | EV01 | char | REQ | INPUT |
Pass an 'A' for Add Mode, 'U' for Update Mode, or 'I' for Inquiry Mode. The default will be Inquiry
| ||||
szLedgerType | LT | char | REQ | INPUT |
A user defined code (09/LT) that specifies the type of ledger, such as AA (Actual Amounts), BA (Budget Amount), or AU (Actual Units). You
|
None |
F0010 Company Constants | ||||
F0013 Currency Codes |