Search Results cascade_lease_status




Overview

OKL_CONTRACT_STATUS_PVT is a private (PVT) PL/SQL package body in the Oracle E-Business Suite Applications (APPS) schema that implements the core status-management logic for Oracle Lease and Finance Management (OKL). It belongs to the Oracle Contracts (OKC) integration layer, since lease contracts in OKL are stored as contract documents within the OKC schema. The package drives the lifecycle of lease contract statuses, supplying the private routines that are wrapped and exposed publicly by companion status-management APIs.

The package header declares a rich set of global message constants drawn from OKL_API, including G_NO_PARENT_RECORD, G_REQUIRED_VALUE, G_INVALID_VALUE, G_UPPERCASE_REQUIRED, and G_MISSING_CONTRACT (OKL_LLA_CONTRACT_NOT_FOUND). It also declares two control-flow exceptions, G_EXCEPTION_HALT_VALIDATION and G_EXCEPTION_STOP_VALIDATION, which allow multi-line validation loops to stop cleanly. The API version is fixed at 1.0 with a _PVT scope and a bulk batch size of 10,000, indicating that large multi-line leases are processed in bulk. The header defines three parallel PL/SQL collections indexed by BINARY_INTEGER — clev_tbl_id_type, clev_tbl_sts_type, clev_tbl_start_date_type, and clev_tbl_end_date_type — for contract line IDs, status codes, and effective start/end dates, used to bulk-process line-level status changes.

Key Procedures and Functions

  • GET_CONTRACT_STATUS — Retrieves the current status information of a lease contract. This is the routine most commonly associated with the user search term "get_lease_status," since callers invoke it to obtain the present status of a lease.
  • UPDATE_CONTRACT_STATUS — Applies a new status to a contract header, performing the required validation and persistence logic against the underlying contract tables.
  • CASCADE_LEASE_STATUS — Propagates a header-level status change down to the associated lease lines, ensuring that line statuses remain consistent with the header.
  • CASCADE_LEASE_STATUS_EDIT — Performs the same cascading operation in an edit/modification context, allowing status changes to be applied while a contract is being amended.

Tables Accessed

The package reads and writes the core contracts and lease tables referenced through APPS synonyms:

  • OKC_K_HEADERS_B and OKC_K_LINES_B — the base contract header and line tables where header and line statuses reside; the clev collections are typed directly from OKC_K_LINES_B columns.
  • OKC_STATUSES_B — the status definition table used to validate that a requested status code is legitimate.
  • OKL_K_HEADERS and OKL_TRX_CONTRACTS — the lease-specific header and transaction contract tables that link the OKC document to its lease context.
  • DUAL and PLITBLM — used for single-row selection and for indexing PL/SQL table collections (PLITBLM underlies the symbolic BINARY_INTEGER collection indexes).

Usage Notes

Because OKL_CONTRACT_STATUS_PVT is a private package, it is not invoked directly by forms or concurrent programs; instead it is called by the two packages documented as referencing it, which supply the public, wrapped API surface. Customizations should therefore call the corresponding public OKL status API rather than this private body. Invocation typically occurs during lease booking, contract amendment, status-driven business flows, and validation routines where a lease status must be read, changed, or cascaded to lines. The bulk batch size of 10,000 and the array-based collections make the package suitable for high-volume leases with many lines, while the halt/stop validation exceptions let callers control how aggressively multi-line validation errors are reported.