Data Service Data Aggregation - Currency Decimals Support (API 1.3.3 and EnterpriseOne Tools 9.2.0.3)

The AggregationInfo.CurrencyProcessing class provides the capability to account for currency when performing data aggregation. This class enables you to specify the proper currency trigger for the data, which is originally defined in the table event rules in EnterpriseOne.

Currency data aggregation applies the correct number of decimal places to aggregated data based on the currency of the data. Use this class only if the table you are aggregating over has a currency table trigger in EnterpriseOne, and the columns you are aggregating are the currency columns processed in the table trigger. If you do not define currency processing in your request, numeric aggregated fields are given the number of display decimals defined in the data dictionary for that field. For more information about how currency is configured in EnterpriseOne, see "Using Currency" in the JD Edwards EnterpriseOne Tools Development Guidelines for Application Design Guide.

The following information is required for decimal processing in currency data aggregation:

  • Processing type. You can choose from the following seven different processing modes, which are defined as constants in the AggregationInfo.CurrencyProcessing class:

    • COMPANY. Applies the currency code that is defined for the company in the key values.

    • CURRENCYCODE. Applies the currency code defined in the key values.

    • MCU. Applies the currency code of the business unit defined in the key values.

    • AID. Applies the currency code of the account ID defined in the key values.

    • LEDGERTYPE_COMPANY_CURRENCYCODE. Applies the currency of either the ledger type, company, or currency code (in this order) defined in the key values.

    • LEDGERTYPE_CURRENCYCODE. Applies the currency of either the ledger type or currency code (in this order) defined in the key values.

    • STATIC. Applies a single currency code set as a string in the currency code field.

  • Key columns. Depending on the specified processing type, add key field columns from the table in the expected order.

  • Currency columns. These are the columns that decimal processing will be applied to. You only need to add a column here once, even if you have several aggregations over that column. Identify each distinct column to which the currency processing should apply. If you do not identify currency columns here, then currency processing will be applied to all columns identified as currency columns in the data dictionary. A currency column is defined in the data dictionary with class CURRENCY.

  • Currency code. This field is used only for STATIC currency processing. Use it to set a string value (for example "USD") for the currency code to be used for all of the currency columns.

  • As If Currency. (API 1.4.2 and EnterpriseOne Tools 9.2.1) This field is used to indicate a single currency for all of the response values. The exchange rate table value for the date specified (or today's date if not specified) will be used to calculate the values for the specified currency. In the response, results will be grouped only by defined "group by" fields because only one currency is present.

  • As If Currency Date. (API 1.4.2 and EnterpriseOne Tools 9.2.1) Specify a date to determine which exchange rate is used for currency conversions to the 'as if' currency. If not specified, the current date is used.

When the proper currency processing is defined, it effects the result set received. At minimum, the data will always be grouped by the key columns defined in the currency processing. This is in addition to any other "group by" columns you have requested, if any.