Search Results okc_contract_lines_v
Overview
OKC_RGP_PVT is a private (PVT) PL/SQL package body in the Oracle E-Business Suite Contracts (OKC) module. Its name derives from "Rule Group" processing, and it serves as the internal engine behind the OKC_RULE_GROUPS_V view and the rule group definition framework used throughout Oracle Contracts and Oracle Teleservice. Rule groups associate contractual clauses, deliverables, and business rules with subclass definitions or with specific contract headers, and OKC_RGP_PVT encapsulates the low-level validation, multi-language handling, versioning, and DML logic that maintains these relationships. Because it is classified as a private package, it is not intended as a public extension point; it is invoked by the public Contracts APIs and by the generated rules-group views to enforce integrity of the rule group tables.
Key Procedures and Functions
The package exposes seventeen documented procedures and functions. The version-management family includes CHANGE_VERSION, CREATE_VERSION, RESTORE_VERSION, and API_COPY, which together support the contracts versioning model by propagating rule group definitions across header versions and by copying rule group rows when a contract is duplicated. The DML family consists of INSERT_ROW, UPDATE_ROW, DELETE_ROW, and LOCK_ROW, providing the standard insert/update/delete/lock primitives against the rule group base and translation tables, with LOCK_ROW used to serialize concurrent updates. VALIDATE_ROW applies row-level business rules before the DML operations commit; the hand-coded VALIDATE_ATTRIBUTES function and VALIDATE_RGD_CODE procedure shown in the source excerpt enforce that a rule group definition code exists in the OKC_RULE_GROUP_DEF lookup and, where applicable, that it is valid for the contract's subclass or header. INSERT_ROW_UPG supports the upgrade path for pre-existing rule group data. ADD_LANGUAGE maintains translated rule group descriptions, and QC performs a quick check of row validity. The package also contains internal procedures referenced as l_debug initialization and shared exception constants such as G_NO_PARENT_RECORD and G_UNEXPECTED_ERROR, which are raised through OKC_API return-status conventions.
Tables Accessed
The package reads and writes the rule group base and translation tables OKC_RULE_GROUPS_B and OKC_RULE_GROUPS_TL, along with their history tables OKC_RULE_GROUPS_BH and OKC_RULE_GROUPS_TLH used for audit shadowing. It reads OKC_SUBCLASSES_B and OKC_SUBCLASS_RG_DEFS to resolve which rule group definitions apply to a given contract subclass, OKC_K_HEADERS_B and OKC_K_LINES_B to resolve the owning contract header and its lines, and OKC_RG_ROLE_DEFS for role-based rule group assignment. FND_LOOKUP_VALUES supplies the OKC_RULE_GROUP_DEF lookup codes used in validation, FND_LANGUAGES supports the ADD_LANGUAGE translation logic, and the PL/SQL table type PLITBLM is used for bulk DML operations. All access is made through APPS synonyms.
Usage Notes
OKC_RGP_PVT is not called directly by end users. It is invoked from the Contracts forms and from concurrent versioning programs that manipulate contract headers, and it is referenced by seventeen other packages, including OKC_RULE_GROUPS_V and the Contracts public APIs. Customizations that must manipulate rule groups should call the supported public APIs, which in turn delegate to this package; direct invocation of OKC_RGP_PVT is unsupported and may bypass validation and versioning invariants. Users searching for okc_contract_lines_v should note that OKC_RGP_PVT does not expose that view; contract line data is handled elsewhere, and OKC_RGP_PVT operates strictly on rule group definitions and their versioned relationships.