Search Results ams_ct_rule_pvt_w




Overview

AMS_CT_RULE_PVT_W is the package body of the private API wrapper that supports the Oracle E-Business Suite Trade Management (formerly Advanced Marketing and Sales) component for compensation and trade rule processing. In the Oracle EBS 12.1.1 and 12.2.2 releases, the AMS_CT_RULE_PVT_W package resides in the APPS schema and operates in the CV (valid) state. It provides the internal implementation layer that complements the AMS_CT_RULE_PVT specification, exposing the core business logic used to create, maintain, and validate "CT Rules," which govern compensation and trade agreement conditions applied to sales, marketing, and channel transactions.

The "_W" suffix indicates a wrapper designation, reflecting the standard Oracle EBS convention of pairing a public specification package with an underlying implementation body. This package depends on the shared FND_API library for its error-handling and message-stack conventions, on PLITBLM and the JTF collection types for table-based parameter passing, and on sibling package AMS_CT_RULE_PVT. It is not referenced by any other database object, confirming its role as a leaf-level implementation module invoked directly from the application layer.

Key Procedures and Functions

The package body exposes seven documented procedures and functions:

  • CREATE_CT_RULE — Inserts a new compensation or trade rule record, applying defaulting and validation logic before persistence.
  • UPDATE_CT_RULE — Modifies an existing rule record, supporting changes to rule attributes and associated items.
  • VALIDATE_CT_RULE — Performs business-rule validation on a rule header, ensuring required fields, effective dates, and rule identifiers conform to application standards.
  • CHECK_CT_RULE_ITEMS — Examines the line-level items attached to a rule, verifying that associated detail rows are consistent and complete.
  • VALIDATE_CT_RULE_REC — Validates a full rule record (header plus items) in a single call, typically used before committing a transaction.
  • ROSETTA_TABLE_COPY_IN_P3 — A Rosetta-style helper that copies PL/SQL table (JTF/VARCHAR2/NUMBER) parameters into package-level structures for internal processing.
  • ROSETTA_TABLE_COPY_OUT_P3 — The complementary helper that copies results back out into PL/SQL table parameters for the calling program.

The three ROSETTA_TABLE_COPY helpers are plumbing routines that allow array-based multi-record processing; they are not end-user functions.

Tables Accessed

The only documented table reference is PLITBLM, identified via an APPS synonym. PLITBLM is the standard Oracle PL/SQL table-to-index-table utility used to bridge associative arrays and index-by tables. Access through this table supports the Rosetta copy procedures and the array-driven processing model that allows CT rules and their items to be passed in and out efficiently. No direct application tables (such as AMS_CT_RULE or its child tables) are named in the metadata, indicating that the persistent DML is executed against the base rule tables through the paired AMS_CT_RULE_PVT package or through internal cursors not surfaced in the dependency extract.

Usage Notes

AMS_CT_RULE_PVT_W is invoked internally by the Oracle EBS application tier rather than by end users directly. Typical callers include:

  • Trade Management setup and maintenance forms that create or update CT rules, which call the wrapper to validate input before committing.
  • Concurrent programs that bulk-load or bulk-update rules, using the Rosetta table copy routines for set-based processing.
  • Other PL/SQL packages within the AMS/_PVT family that need to validate a rule programmatically, such as compensation and accrual engines.

Because the package is a private wrapper, customizations should not call its procedures directly; instead, developers should extend or call AMS_CT_RULE_PVT, the public specification. When troubleshooting unexpected validation failures or message-stack errors during rule maintenance in 12.1.1 or 12.2.2, review FND_API messages generated by VALIDATE_CT_RULE and CHECK_CT_RULE_ITEMS, since these surface most data-integrity issues back through the wrapper to the calling form or program. The package is reported as valid and stable, with no reversely dependent objects, which simplifies both upgrade impact analysis and any recompilation required during patching.