Search Results update_formula




Overview

CN_CALC_FORMULAS_PVT_W is a private PL/SQL package in the APPS schema that supports formula management within the Oracle E-Business Suite Contracts (CN) module, specifically the pricing and calculation engine. The package encapsulates the server-side logic used to create and maintain calculation formulas, which determine how contract line prices, discounts, surcharges, and other computed values are derived. In release 12.1.1 and 12.2.2 the package is classified under the ETRM metadata with an API classification of OTHER, and its documented surface consists of ten procedures. Unlike public APIs such as CN_CALC_FORMULAS_PUB, this package is a private worker that is normally invoked through the Oracle Forms interface and internal engine calls rather than being called directly from external customizations.

The "_W" suffix conventionally identifies the object as a Forms-oriented interface wrapper. The header comment ($Header: cnwforms.pls 120.3 2006/01/05) confirms the source file is cnwforms.pls, a wrapper specification generated to expose private PL/SQL tables to Oracle Forms through array bindings.

Key Procedures and Functions

The package exposes only CREATE_FORMULA and UPDATE_FORMULA as functional entry points; the remaining procedures are plumbing that translate between the Forms array types and the PL/SQL table types defined in the companion private package CN_CALC_FORMULAS_PVT.

  • CREATE_FORMULA — Creates a new calculation formula record, persisting the formula definition and its associated attributes.
  • UPDATE_FORMULA — Modifies an existing formula definition. This is the procedure most likely to be reached during formula maintenance screens, and is the object associated with the "update_formula" search term.
  • ROSETTA_TABLE_COPY_IN_P3 / ROSETTA_TABLE_COPY_OUT_P3 — Convert the input_tbl_type structure between scalar JTF tables and the nested PL/SQL table, mapping numeric, varchar2(100), and similar columns used by formula input lines.
  • ROSETTA_TABLE_COPY_IN_P4 / ROSETTA_TABLE_COPY_OUT_P4 — Perform the same translation for the rt_assign_tbl_type, which includes date columns, supporting rounding and assignment rule rows.
  • ROSETTA_TABLE_COPY_IN_P5 / ROSETTA_TABLE_COPY_OUT_P5 — Translate the single-column parent_expression_tbl_type, used to carry parent expression strings.
  • ROSETTA_TABLE_COPY_IN_P6 / ROSETTA_TABLE_COPY_OUT_P6 — Additional bidirectional conversion for a further PL/SQL table type used by the formula engine.

The Rosetta procedures are generated boilerplate and carry no business rules; they exist solely to marshal data across the Forms/PL/SQL boundary.

Tables Accessed

ETRM documents one referenced table, PLITBLM, accessed through an APPS synonym. PLITBLM is a standard EBS temporary/work table pattern used by the pricing engine to stage line-level calculation data during formula evaluation. Formula definitions created or updated by this package are ultimately consumed by the calculation engine, which reads from these staging structures to resolve expressions and computed values.

Usage Notes

CN_CALC_FORMULAS_PVT_W is referenced by zero other documented packages, reinforcing its role as a leaf-level wrapper. It is invoked primarily from the Contracts formula maintenance Forms, where the "_W" procedures bind Forms record arrays into the corresponding private PL/SQL table types before invoking the CREATE_FORMULA and UPDATE_FORMULA logic. In 12.1.1 and 12.2.2 the same source file (120.3) is retained. Custom code should prefer the public CN_CALC_FORMULAS_PUB API, as the private package is subject to change without notice.