Search Results validate_deal




Overview

OKL_LA_VALIDATION_UTIL_PVT_W is a public PL/SQL package in the Oracle Lease and Finance Management (OKL) module, part of the Oracle E-Business Suite 12.1.1 and 12.2.2 technology stack. The suffix _PVT_W indicates a private package body exposed through a thin wrapper ("W") that provides a public, invocable interface. The package declares AUTHID CURRENT_USER, meaning its SQL executes with the privileges of the calling schema rather than the defining owner.

The business function of this package is to validate lease and finance deal data captured during contract authoring before that data is committed to the database. It acts as a server-side validation utility used primarily by the Contract Authoring (OKL) forms to confirm that customer, product, contact, program, credit line, MLA, and currency references on a deal are internally consistent and resolvable. Because the procedure accepts several IN OUT NOCOPY parameters, it both validates identifiers supplied by the caller and returns the canonical values (IDs, codes, names) resolved from those inputs, allowing the form to synchronize its block fields without additional round trips.

Key Procedures and Functions

  • VALIDATE_DEAL — The sole documented procedure. It validates a deal (contract) identified by p_chr_id, contract number, and scenario code, and performs consistency checks across the deal's associated entities: customer, customer account, product, contact, MLA, program, credit line, and currency. It returns the standard EBS API out parameters x_return_status, x_msg_count, and x_msg_data following the OAF/BC4J message convention (success, unexpected error, or error). Several parameters are declared IN OUT NOCOPY, notably the customer, product, contact, MLA, program, and credit line identifiers, indicating the procedure may resolve or normalize these values as part of validation and pass corrected values back to the caller. Parameters such as p_chr_cust_acct_id are OUT NOCOPY, supplying newly derived identifiers. The date parameter p_start_date and p_deal_type allow the validation to be date- and type-sensitive.

Tables Accessed

The ETRM metadata for this object does not enumerate specific base tables. The procedure operates against the OKL lease/contract schema, and its parameter set (contract ID, customer, product, contact, MLA, program, credit line, currency) implies it queries the OKL contract headers, contract parties, and product/contact cross-reference entities via APPS synonyms. Validation logic determines whether referenced IDs exist, are active, and are valid for the given deal type and start date; resolved values are returned in the IN OUT parameters rather than through explicit table reads/writes documented here. No direct DML is implied — the routine is a read-and-validate utility, not a data-modification API.

Usage Notes

VALIDATE_DEAL is typically invoked from the Oracle Lease and Finance Management contract authoring forms or from custom PL/SQL that needs to pre-validate deal data before submission. Callers must supply a valid API version, optionally request message list initialization, and check x_return_status before proceeding. Because the package uses AUTHID CURRENT_USER, invoking code must have appropriate grants on the underlying OKL objects; the _PVT_W wrapper exists precisely to expose the private implementation safely. The header revision ($Header: OKLEDVUS.pls 115.4) shows this is a stable, long-standing interface. No other packages reference it per the metadata, so it is generally called directly by the form layer or bespoke integrations rather than from within the OKL package hierarchy.