Search Results pn_lease




Overview

PN_LEASE_PUB is the public API package for lease and terms information within the Oracle Property Manager (PN) product of Oracle E-Business Suite. Declared with AUTHID CURRENT_USER and classified as a public (PUB) API under the ETRM repository, it exposes a supported, governed interface through which external callers and internal EBS components can create, maintain, and transition lease records without writing directly to the underlying Property Manager base tables. The package header carries the R12 lineage marker $Header: PNLSPUBS.pls 120.5.12020000.2, confirming its active maintenance through the 12.1.1 and 12.2.2 release streams.

Functionally, the package encapsulates the business rules governing lease definition: lease header attributes, lease terms, expense and revenue account derivation, accrual accounting, liability and receivable account treatment, and the associated child entities that describe a lease — contacts, tenancies, insurance, rights, obligations, and options. Because these validations and derivations are centralized in the API layer, callers receive consistent scheduling, accounting, and referential-integrity behavior rather than reimplementing it. The package is tagged in ETRM with the business entity PN_LEASE, the product code PN, and a compatibility flag of S (supported), and its lifecycle status is recorded as active.

Key Procedures and Functions

The package exposes five documented entry points:

  • CREATE_LEASE — Creates a new lease in Oracle Projects/Property Manager. It accepts the lease header record together with the associated expense and revenue accounts record, the accrual account record, and the liable or receivable account record, plus PL/SQL tables carrying contacts, tenancies, insurance, rights, obligations, and options. A validation flag (p_validate) allows callers to perform scheduling validation without persisting the lease.
  • UPDATE_LEASE — Modifies an existing lease and its related account and child-entity information, applying the same validation and accounting logic used at creation.
  • CREATE_TERMS — Creates lease terms, the payment and billing schedule definitions attached to a lease that drive expense, revenue, and accrual generation.
  • UPDATE_TERMS — Maintains existing lease terms when schedules, amounts, or term attributes change.
  • UPDATE_STATUS — Transitions a lease between lifecycle statuses, controlling whether the lease is active for processing, billing, or accrual.

All procedures follow the Oracle API standard, accepting p_api_version, p_init_msg_list, and p_commit so that callers control message-stack initialization and transaction demarcation, and returning standard x_return_status and x_msg_count/x_msg_data outputs.

Tables Accessed

The documented table reference for this package, exposed through APPS synonyms, is PN_LEASES_ALL. This is the multi-organization-enabled master table holding lease header records. CREATE_LEASE and UPDATE_LEASE insert and update rows in this table, while UPDATE_STATUS updates the lease status column that governs downstream processing. Account records, contacts, tenancies, insurance, rights, obligations, and options are supplied as input records and tables to the API and are persisted to their respective Property Manager child tables as part of the same logical transaction. No additional base tables are named in the ETRM metadata.

Usage Notes

PN_LEASE_PUB is the recommended integration point for any process that must create or maintain leases programmatically. Typical invocations include:

  • Custom PL/SQL performing bulk lease loading or migration, calling CREATE_LEASE with p_validate = 'Y' first to confirm scheduling validity before committing.
  • Concurrent programs and interfaces that import lease data from external systems, where the API's built-in validation replaces direct DML against PN_LEASES_ALL.
  • Oracle Forms and EBS UI components within Property Manager that delegate lease and term persistence to this package.
  • Correction scripts for status or term changes, using UPDATE_TERMS and UPDATE_STATUS rather than updating tables directly.

Callers should always pass a valid p_api_version, inspect x_return_status for FND_API.G_RET_STS_ERROR or G_RET_STS_UNEXP_ERROR, and drain the message stack with FND_MSG_PUB utilities. Because the package is AUTHID CURRENT_USER, it must be executed in a context with appropriate grants on the PN schema objects. ETRM records no packages referencing PN_LEASE_PUB, indicating it is a top-level API intended for external consumption rather than an internal dependency of other PL/SQL units.