Results for “okc_contingency_rules”
12 results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
APPS.OKC_AR_INT_PUB is a public PL/SQL package body that exposes integration logic between Oracle Contracts (OKC) and Oracle Receivables (AR). The package header is classified as PUB, indicating that its procedures are intended as an externally callable API surface within the E-Business Suite, rather than as private internal helper code. Its name follows the OKC_AR naming convention reserved for contracts-to-receivables integration objects, and the documented content confirms that its principal responsibility is to retrieve contract contingency definitions and return them to a calling process.
The package declares the global package identifier g_package and a logging flag initialized from the AFLOG_ENABLED profile option, a standard EBS debugging convention. The header comment records a source control revision of 120.0 dated 25 May 2005, identifying the object as long-standing core code that has been carried forward unchanged into the 12.1.1 and 12.2.2 releases. The body is deliberately narrow: it contains a single documented public procedure and no additional public functions.
Key Procedures and Functions
The package exposes exactly one documented procedure, GET_CONTRACT_CONTRACT_CONTINGENCIES — recorded in the ETRM metadata as GET_CONTRACT_CONTINGENCIES. It is the entry point queried by users searching for contract contingency functionality.
- GET_CONTRACT_CONTINGENCIES — Extracts the set of revenue contingency rules that apply to a given contract and contract line. It accepts an API version, an initialization message-list flag, the contract identifier, and the contract line identifier, and returns a collection of contract contingency records together with the standard EBS API return status, message count, and message data parameters. The procedure iterates the seeded contingency rule values and evaluates both line-level and header-level rules to assemble the returned collection.
The body defines two private cursors supporting this procedure: csr_seeded_rules, which enumerates the seeded rule codes from the OKC_CONTINGENCY_RULES lookup type, and csr_line_rules, which fetches rule information from rule groups and rules scoped to a specific contract line. A parallel csr_header_rules cursor retrieves rule information at the contract header level. No other procedures or functions are documented for this package.
Tables Accessed
Two contract schema tables are referenced through APPS synonyms:
- OKC_RULES_B — The base table of contract rules. The package reads rule information columns (
rule_information1throughrule_information4) filtered by rule group and rule information category. This supplies the actual contingency rule values returned to the caller. - OKC_RULE_GROUPS_B — The base table of rule groups. It is joined to OKC_RULES_B on the rule group identifier and filtered by the seeded group code
REVENUE_CONTINGENCY_RULES, the contract identifier, and where applicable the contract line identifier. This join establishes the correct rule group context for a given contract or line.
In addition, the seeded rule codes are sourced from the FND_LOOKUPS view using the lookup type OKC_CONTINGENCY_RULES. All access is read-only; the package does not insert, update, or delete data.
Usage Notes
Because the package is classified as PUB and returns a standardized API return status, it is intended to be invoked by other EBS modules, contract-related forms, or custom extensions rather than by end users directly. Typical invocation patterns include:
- Contracts forms or related UI flows that need to display revenue contingencies attached to a contract header or line.
- Receivables integration logic that must determine which contingency rules apply before generating or validating AR transactions.
- Custom PL/SQL code that calls the procedure with a valid contract identifier and line identifier and inspects
x_return_statusbefore consuming the returned contingency collection.
The ETRM metadata records no other packages referencing this object, suggesting its callers are forms or external integration points not tracked as package dependencies. Callers should always initialize the message list as required by the API convention and check the return status, since rule lookups depend on seeded lookup and rule group data being correctly configured.