Search Results get_salesrep_info
Overview
CN_GENERAL_UTILS is a general-purpose PL/SQL utility package owned by the APPS schema within Oracle E-Business Suite. It exists to serve the Oracle Incentive Compensation (Commissions) product family, providing reusable lookup, conversion, and reference-data retrieval routines consumed across the Commissions modules. The package was created in September 1994 by extracting non-generation-specific logic out of the earlier CN_UTILS package, and it has been maintained continuously since. Its header identifies the source file as cnsyguts.pls and the package is declared AUTHID CURRENT_USER, meaning its unqualified object references resolve against the privileges of the calling user rather than the defining schema.
The package functions as a thin abstraction layer over common EBS reference data. Rather than forcing every Commissions form, concurrent program, or report to embed its own queries against FND lookups, accounting periods, or set-of-books configuration, developers call these centralized functions. This promotes consistency of results and simplifies maintenance when underlying reference schemas change.
Key Procedures and Functions
The ETRM metadata documents ten public program units within this package:
- GET_SET_OF_BOOKS_ID — Returns the identifier of the set of books in effect for the current Commissions operating context.
- GET_CURRENCY — Returns the currency associated with a given organization identifier.
- GET_CURRENCY_CODE — Returns the functional currency code applicable to the current session or operating unit context. This is the routine most frequently targeted by developers searching for currency resolution logic in Commissions.
- GET_PERIOD_INFO — Populates period identification, period name, status, start date, and end date for a supplied transaction date, allowing callers to derive full accounting period context in a single invocation.
- GET_MEANING — Resolves a lookup code within a lookup type to its translated meaning, standardizing how Commissions code interprets FND lookup values.
- GET_PERIOD_ID — Returns the accounting period identifier corresponding to a supplied date.
- GET_PERIOD_NAME — Returns an accounting period name for a supplied period identifier.
- GET_SALESREP_INFO — Retrieves sales representative details; this function evolved from an earlier GET_SALESREP_NAME routine that was expanded in December 1994 to return a broader set of attributes.
- GET_USERNAME — Returns the user name for a given user identifier, typically resolving through FND_USER.
- GET_ACC_FROMPERIOD_ID — Derives an accounting period attribute from a supplied period identifier.
Several functions, including GET_SET_OF_BOOKS_ID and GET_CURRENCY_CODE, carry PRAGMA RESTRICT_REFERENCES declarations (WNDS, WNPS, RNPS), certifying that they do not write database state, package state, or read package state respectively. This makes them safe for use inside SQL statements.
Tables Accessed
Because the package is declared AUTHID CURRENT_USER and executes against APPS synonyms, the documented base tables it reaches are CN_REPOSITORIES, CN_REPOSITORIES_ALL, and FND_USER. CN_REPOSITORIES and its _ALL variant store Commissions repository and setup information and support the package's context and organization-related resolution routines. FND_USER is the standard EBS application user table, consulted by GET_USERNAME and related identity lookups. Period and lookup functions rely on the standard EBS period and lookup facilities exposed through APPS synonyms. All access is read-oriented; the RESTRICT_REFERENCES pragmas confirm that the certified functions are query-only.
Usage Notes
CN_GENERAL_UTILS is invoked from three known dependent packages and is available to any Commissions form, concurrent program, or custom extension running under the APPS schema. Typical call sites include Oracle Forms personalizations and custom library code that must display or validate a currency, resolve a period from a date, translate a lookup code, or identify the current user. GET_CURRENCY_CODE in particular is commonly called when a transaction screen needs to default or verify the currency without hard-coding operating unit logic. Because the pragma-certified functions are pure, they may be embedded directly in SELECT statements and views. The package has no user-facing entry point of its own; it is a supporting utility layer, and its behavior depends on the session's operating context (set of books, organization, and user), so callers must ensure that context is initialized before invocation.
-
PACKAGE: APPS.CN_GENERAL_UTILS
12.1.1
-
PACKAGE: APPS.CN_GENERAL_UTILS
12.2.2
-
PACKAGE BODY: APPS.CN_GENERAL_UTILS
12.1.1
-
PACKAGE BODY: APPS.CN_GENERAL_UTILS
12.2.2
-
PACKAGE: APPS.CN_GET_COMM_SUMM_DATA_PVT
12.2.2
-
PACKAGE: APPS.CN_GET_COMM_SUMM_DATA_PVT
12.1.1
-
PACKAGE BODY: APPS.CN_GET_COMM_SUMM_DATA_PVT
12.1.1
-
PACKAGE BODY: APPS.CN_GET_COMM_SUMM_DATA_PVT
12.2.2