Currency decimal triggers

wojcik

Active Member
Hello list

I am about to create a new file with domestic and foreign amount fields on it. My question:

How does JDE decide what the default currency triggers for amounts fields should be as I would like to ensure that my amount fields are displayed correctly without having to add additional trigger processing into subsequent applications.

I have been looking at various standard JDE tables and it looks like there is some logic that goes on behind the scenes to format these amount fields.

Example:

Using UTB I am viewing F0411. For a particular record the domestic amount (RPAG) is displayed as 1162.67 (to two decimal places) whereas the corresponding foreign amount (RPFAP) is displayed with no decimal places. The decimal formatting is correct, but how does UTB know which triggers to employ for each amount field.
 
Hi Rob,
The currency decimal logic can be used on the basis of many fields: Currency Code itself, Company, Account ID, Ledger Type, etc.
The actual assignment is implemented in the Currency Conversion is On event of Table ER. You find a Business Function there - in case of F0411 it is Decimal trigger get by Company CRCD.
There are two types of functions, one can use only one currency code - here you have a specific field by which the currency is determined and many amount fields. The logic will apply to the fields mapped into this function.
In the other case you can have domestic and foreign amounts (like F0411). You enter a company (or something else...) and a currency. You have domestic and foreign amounts in the data structure and you have to map all amounts to one of the appropriate domestic or foreign fields.
Usually if I have to write a program handling currency I check the original OneWorld table to which my logic is connected and use the same table ER logic. Note that you must have the company or currency or etc. fields in your table and you have to populate them from your programs.
Also note that the table triggers have to be built and included in the packages (both client and server).
Hope this helps.
Regards:
Gergely Pongrácz
e-Best
Hungary
 
Thank you for your response. I seems to make sense and I shall use the technique in my new table. I shall let you know how I get on.
 
Hi Gergely

Thanks again for the reply, it has now all amde sense to me after looking at a number of JDE tables that format the amount fields in UTB.

I have now created the custom tables together with the required triggers and that works fine in UTB.

Do I need to bear anything in mind when the development is deployed to the server? Do worry about replying if there's not any further information to add.
 
Hi Rob,
The crucial point is that the objects (table specs with the trigger ER) are deployed to all locations where the tables are accessed from (including the server if reports run there are using the table). Naturally the dll changes have to be deployed to this locations as well.
Regards:
Gergely Pongrácz
e-Best, Hungary
 
Back
Top