Search Results g_precision




Overview

APPS.CN_WEBSERVICE_PUB is a public PL/SQL package body within the Oracle E-Business Suite Incentive Compensation (CN) module. Its primary purpose is to expose commission-related data to external web service consumers, returning aggregated and transactional information for sales representatives through a controlled, packaged interface. The package is classified as PUBLIC (API classification PUB), meaning its procedures are intended to be invoked by external clients, web service wrappers, or custom integrations rather than being restricted to internal module use.

The package body declares several global variables, including g_pkg_name, g_format_mask, g_currency_code, g_currency_symb, g_precision, g_ext_precision, and g_min_acct_unit. The variable g_precision holds the currency precision value retrieved at runtime through FND_CURRENCY.get_info. It directly controls the construction of the number format mask (g_format_mask), which is dynamically extended with '9' placeholders to match the reporting currency's decimal precision. This ensures that monetary values returned via the web service are formatted consistently with the ledger's currency definition.

Key Procedures and Functions

The package exposes five documented procedures that together provide a web service-facing view of sales representative performance and commission activity:

Collectively, these procedures rely on a common currency-information initialization step (get_currency_info), which populates g_precision and related globals so that monetary formatting is consistent across all returned results.

Tables Accessed

The package reads from the following documented tables (via APPS synonyms):

  • CN_COMMISSION_LINES and CN_COMMISSION_HEADERS — source of commission transaction and header data used for customer and product ranking.
  • CN_REPOSITORIES — used to resolve the current period and set of books for the Incentive Compensation repository.
  • FND_CURRENCIES — provides the currency symbol, while FND_CURRENCY.get_info supplies g_precision, extended precision, and minimum accounting unit.
  • FND_USER — resolves the sales representative's user_id from the login/user name supplied by the caller.
  • JTF_RS_SALESREPS — maps the resource to the sales representative and operating unit.
  • HZ_CUST_ACCOUNTS, HZ_PARTIES, HZ_PARTY_SITES, and HZ_LOCATIONS — provide customer and address detail for customer-facing results.
  • JTF_TASKS_B, JTF_TASK_ASSIGNMENTS, and JTF_TASK_REFERENCES_B — provide escalated task information.

No direct DML is implied by the documented metadata; the package is predominantly a read-only reporting interface.

Usage Notes

CN_WEBSERVICE_PUB is invoked by web service consumers and integration layers requiring sales representative commission summaries. It is not referenced by any other documented package in the ETRM metadata (referenced by 0 other packages), indicating that it is a top-level API entry point. Typical invocations occur from web service wrappers, custom PL/SQL integrations, or middleware that calls the procedures and consumes the returned collections. Because the procedures depend on runtime currency initialization, callers should ensure the Incentive Compensation repository and set of books are properly configured so that g_precision and g_format_mask are populated before monetary values are formatted or returned.