Results for “get_period_id”

38 results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

APPS.CN_GENERAL_UTILS is a general-purpose PL/SQL utility package body in the Oracle E-Business Suite (EBS) Commissions (CN) application module. Its documented responsibility is to supply common reference lookups and helper routines that are shared across the Commission compensation engine rather than being tied to any single business process. The package was created in September 1994 by removing non-generation-specific logic from the earlier CN_UTILS package, and its header history shows continued maintenance through later 12.x source control revisions. In a 12.1.1 or 12.2.2 environment it is owned by APPS and classified in the ETRM repository as API classification OTHER, meaning it is an internal helper rather than a formally published public API. Because many Commission programs, forms, and concurrent processes need the same foundational values — the operating set of books, the ledger currency, the current accounting period, and the current application user — the package centralizes these lookups so that each caller does not have to repeat them.

Key Procedures and Functions

ETRM documents ten callable units in the package. Each returns a narrowly scoped piece of reference data:

  • GET_SET_OF_BOOKS_ID — returns the set of books identifier for the current Commission instance, assuming a single row in the repository configuration table.
  • GET_CURRENCY — returns the currency code associated with the current set of books for a given organization context, raising a NO_DATA_FOUND exception and issuing an FND message when instance information is missing.
  • GET_CURRENCY_CODE — returns the ledger currency code in a read-only manner guaranteed not to update the database.
  • GET_PERIOD_INFO — supplies period-related reference information used by the Commission engine.
  • GET_MEANING — resolves a lookup or code value into its descriptive meaning for display or reporting.
  • GET_PERIOD_ID — returns the internal period identifier for a period.
  • GET_PERIOD_NAME — returns the human-readable period name.
  • GET_SALESREP_INFO — retrieves salesperson reference information for Commission calculations.
  • GET_USERNAME — returns the application user name, the routine users most commonly search for and the one most often reused by custom code that needs to stamp or filter data by the logged-in user.
  • GET_ACC_FROMPERIOD_ID — returns the accounting period associated with a given period identifier.

Tables Accessed

The package reads three documented objects through APPS synonyms. CN_REPOSITORIES and CN_REPOSITORIES_ALL hold the Commission instance configuration, including the set of books and organization mapping used to derive ledger and currency context; the original code notes that the repositories table is expected to contain exactly one row. FND_USER supplies the application user record that backs GET_USERNAME. All access is read-oriented lookup and does not perform transactional updates.

Usage Notes

CN_GENERAL_UTILS is an internal dependency, referenced by three other packages in the Commission module. It is typically invoked from Commission forms, concurrent programs, and package-level initialization code that needs consistent ledger, period, salesperson, or user context. GET_CURRENCY_CODE is specifically documented as safe for lightweight, read-only contexts such as a SELECT from DUAL, whereas GET_CURRENCY performs the fuller repository-joined lookup and raises an application exception when configuration is incomplete. Customizations or extensions within the Commissions module should call these utilities rather than re-implement the underlying queries, preserving a single source of truth for instance and user metadata.