Search Results cn_comp_plans_pkg




Overview

CN_COMP_PLANS_PKG is a PL/SQL package body owned by the APPS schema in Oracle E-Business Suite, validated and present in both the 12.1.1 and 12.2.2 releases. It resides in the Oracle Trade Management (formerly Compensation and Incentive Management) module, where it supports the definition and lifecycle management of compensation plans. Compensation plans in EBS govern how quota, commissions, bonuses, and other incentive components are structured and assigned to sales roles and resources. The package is classified as OTHER in the ETRM API registry rather than as a public interface API, which indicates that it primarily provides internal programmatic services for plan validation, status transitions, and referential integrity checks rather than an externally documented integration surface. It is referenced by twelve other database objects, confirming its role as a foundational utility layer within the compensation and channel management stack. The package body is marked VALID, meaning no compilation errors are present in the current instance.

Key Procedures and Functions

The package body exposes eight documented procedures and functions:

  • BEGIN_RECORD — Opens a logical processing record, typically initializing context or attribute state before a plan operation.
  • END_RECORD — Closes the corresponding record, finalizing any pending state associated with BEGIN_RECORD.
  • CHECK_UNIQUE — Validates that a compensation plan definition does not duplicate an existing record, enforcing uniqueness constraints.
  • CHECK_UNIQUE_REV_CLASS — Performs a uniqueness check scoped to revenue classification, preventing conflicting plan definitions within the same class.
  • SET_STATUS — Applies a status transition to a compensation plan, supporting workflow-driven activation, deactivation, or similar state changes.
  • GET_STATUS — Retrieves the current status of a compensation plan for use by calling processes.
  • CHECK_ASSIGNED — Determines whether a plan has been assigned to roles, quotas, or resources, guarding against deletion or modification of in-use records.
  • CHECK_PERIOD_RANGE — Verifies that a plan's effective date range is internally consistent and does not conflict with existing period definitions.

Tables Accessed

The package interacts with a defined set of APPS synonyms, reflecting its plan-centric scope. CN_COMP_PLANS and CN_COMP_PLANS_S store the base and translated (or secure) plan definition records, serving as the primary read and write targets. CN_QUOTA_ASSIGNS, CN_QUOTA_RULES, CN_RT_QUOTA_ASGNS, CN_SRP_PLAN_ASSIGNS, and CN_ROLE_PLANS support assignment and quota logic, enabling CHECK_ASSIGNED and related validations. CN_DIM_EXPLOSION and CN_DIM_HIERARCHIES supply dimensional rollup and hierarchy information used in eligibility or attribution calculations. CN_LOOKUPS provides reference codes, while CN_QUOTAS_V offers a read-only view of quota data. Much of the actual validation logic is delegated to peer packages, including CN_API, CN_QUOTA_ASSIGNS_PKG, and CN_PLAN_ELEMENT_PVT, alongside the standard FND_API, FND_MESSAGE, and FND_MSG_PUB error-handling framework.

Usage Notes

CN_COMP_PLANS_PKG is not referenced by any database object, so it is invoked exclusively by external callers: Oracle Forms, concurrent programs, and custom code that manage compensation plans. Its error-handling dependencies on FND_MSG_PUB and APP_EXCEPTION indicate that it follows the standard EBS API error-stack convention, allowing callers to retrieve messages after exceptions. Because it is classified as OTHER rather than a public API, direct custom invocation should be approached cautiously, and modifications should be validated against the plan administration forms that constitute its primary consumer. Administrators troubleshooting plan validation failures should inspect the messages raised by CHECK_UNIQUE, CHECK_ASSIGNED, and CHECK_PERIOD_RANGE first, as these enforce the most common business constraints.