DecimalTriggerGetByMCUAndCurrenc

Decimal Trigger Get By MCU And Currency

Major Business Rule

Object Name: B1100012

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

The purpose of this business function is to assign the domestic currency decimals to the domestic 
amounts and the foreign currency decimals to the foreign amounts.  


For the domestic amounts 

• the company is retrieved  for the Business Unit (Branch/Plant) provided in the data structure, 
• the domestic currency of that company is retrieved, 
• and then  the decimal for that currency is retrieved.
This is assigned to the decimals of all the Domestic Amounts in the data structure.


For the foreign amounts

• the decimal is retrieved for the transaction currency code.
This is assigned to the decimals of all the Foreign Amounts in the data structure.


This is used mainly at the data base trigger level where it is run automatically when currency 

processing is on.




Technical Specification


If BusinessUnit  is equal to blanks/NULL then end processing.

If TransactionCurrency is blank/NULL then end processing.


Domestic Amounts

Using the business function GetCompanyFromBusUnit retrieve the company number.

Using company, run the JDB API JDB_RetrieveF0010RowUsingCompanyNumber retrieve the currency code from 

the company record cached.


Using the currency code from the company, run the JDB API JDB_RetrieveF0013RowUsingCurrencyCode to 

retrieve the decimals for the currency from the cache.  This currency code gets used in the 

jdeMathSetCurrCode as a parameter for the domestic amounts.


Run the API's jdeMathSetDecimals and jdeMathSetCurrCode to set the currency decimals and currency 

code for each of the 15 DOMESTIC Math Numeric amounts in the data structure.


Foreign Amounts


Using the transaction currency code from the data structure, run the JDB API 

JDB_RetrieveF0013RowUsingCurrencyCode to retrieve the decimals for the currency from the cache. This currency code gets used 

in the jdeMathSetCurrCode as a parameter for the foreign amounts


Run the API's jdeMathSetDecimals and jdeMathSetCurrCode to set the currency decimals and currency 

code for each of the 15 FOREIGN Math Numeric amounts in the data structure.



NOTE: There is a template created by Roger Chan that can be used to assist in writing this business 

function.





^

Data Structure

D1100012 - Decimal Trigger Get By MCU And Currency

Parameter NameData ItemData TypeReq/OptI/O/Both
szBranchPlantMCUcharNONENONE

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

szTransactionCurrencyCRCDcharNONENONE

A code that identifies the currency of a transaction. 

mnDomesticAmount01AN01MATH_NUMERICNONENONE

A number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants table (F0010). The net amount posted is the total of all debits and credits, beginning with the first day of the period through the last 
day of the period.

mnDomesticAmount02AN02MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010).  The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnDomesticAmount03AN03MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnDomesticAmount04AN04MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnDomesticAmount05AN05MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnDomesticAmount06AN06MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnDomesticAmount07AN07MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnDomesticAmount08AN08MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnDomesticAmount09AN09MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnDomesticAmount10AN10MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnDomesticAmount11AN11MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnDomesticAmount12AN12MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnDomesticAmount13AN13MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnDomesticAmount14AN14MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnDomesticAmount15AN15MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnForeignAmount01AN01MATH_NUMERICNONENONE

A number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants table (F0010). The net amount posted is the total of all debits and credits, beginning with the first day of the period through the last 
day of the period.

mnForeignAmount02AN02MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010).  The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnForeignAmount03AN03MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnForeignAmount04AN04MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnForeignAmount05AN05MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnForeignAmount06AN06MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnForeignAmount07AN07MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnForeignAmount08AN08MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnForeignAmount09AN09MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnForeignAmount10AN10MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnForeignAmount11AN11MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnForeignAmount12AN12MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnForeignAmount13AN13MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnForeignAmount14AN14MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

mnForeignAmount15AN15MATH_NUMERICNONENONE

Number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company 
Constants file (F0010). The net amount posted is the total of all debits and credits beginning with the first day of the period through the last day 
of the period.

Related Functions

B0000130 Retrieve Company From Business Unit

Related Tables

F0010 Company Constants
F0013 Currency Codes