Search Results g_allocated




Overview

CN_SCA_WF_PKG is an APPS-owned PL/SQL package body in Oracle EBS Release 12.1.1 and 12.2.2 that supports the revenue allocation and distribution processing performed by Oracle's Contracts/Projects revenue recognition functionality. The package is classified as OTHER in the ETRM metadata, meaning it is not exposed as a public application programming interface but instead operates as an internal engine driven by concurrent programs and workflow processes. Its central purpose is to load revenue-relevant transaction data into staging interface tables, select the correct revenue distribution basis, and compute revenue allocations across contract lines before those allocations are committed to the revenue interface.

The package name prefix "CN" associates it with the Contracts family of applications, and the "_WF" suffix indicates integration with Oracle Workflow. The header comment "$Header: cnpscawb.pls 120.2 2005/09/23" identifies the source file version, confirming the package has been stable across the 12.1.1 and 12.2.2 code lines.

Key Procedures and Functions

The documented interface exposes nine procedures and functions that together form the processing pipeline:

  • START_PROCESS — The entry point that initiates the overall revenue distribution workflow for a given range of interface headers.
  • SELECTOR — Determines which distribution method applies to each eligible header, routing processing to the even or weighted revenue distribution routine.
  • REV_DIST_SELECT — Selects the revenue distribution records that qualify for allocation processing.
  • TRX_LOAD_SELECT — Identifies and loads the transaction records required for revenue distribution.
  • EVEN_REV_DIST — Applies even (straight-line) revenue distribution logic across the qualifying lines.
  • WTD_REV_DIST — Applies weighted revenue distribution logic, typically driven by line-level weighting factors.
  • CN_TRX_LOAD — Loads contract transaction data into the interface and output tables used by the distribution routines.
  • BATCH_POST_DIST_UPDATE — A private procedure documented in the source header. It corrects revenue allocation when rounding causes the allocation percentages to not total exactly 100. It updates records whose header process_status equals G_REV_NOT_100.

The constant G_REV_NOT_100 — the term the user searched for — is the process status flag indicating that a header's revenue allocation percentages do not total 100 percent, which is why the rounding correction procedure acts on precisely those rows.

Tables Accessed

The package reads and writes the following documented tables through APPS synonyms:

  • CN_SCA_HEADERS_INTERFACE — Holds header-level interface records and their process status, including records flagged G_REV_NOT_100.
  • CN_SCA_HEADERS_INTERFACE_GTT — A global temporary table used to stage header data during a processing run.
  • CN_SCA_LINES_OUTPUT — Stores the computed allocation percentages and revenue amounts for each line; this is the primary table updated by BATCH_POST_DIST_UPDATE.
  • CN_SCA_LINES_OUTPUT_GTT — A global temporary table used to stage line-level output during distribution calculations.
  • FND_APPLICATION — The Oracle Application Object Library table used to resolve application identifiers and context.

The pairing of permanent interface tables with GTT staging tables reflects a set-based processing pattern that minimizes contention on the base tables.

Usage Notes

CN_SCA_WF_PKG is invoked indirectly rather than called by end users. It is typically launched from a concurrent program or through the Oracle Workflow engine, which explains the "_WF" suffix and the presence of START_PROCESS as the orchestration entry point. Application forms do not call these routines directly. Because the package is classified OTHER, it should not be treated as a supported API; customizations that call it directly risk breakage during patching. The metadata records that three other packages reference CN_SCA_WF_PKG, confirming its role as a shared internal service within the Contracts revenue distribution flow. Administrators encountering G_REV_NOT_100 statuses should understand that BATCH_POST_DIST_UPDATE is the documented mechanism that resolves rounding-driven allocation discrepancies.