Search Results pn_var_transactions_all




Overview

PN_VAR_CHG_CAL_PKG is an APPS-owned PL/SQL package body in Oracle EBS Property Manager (PN), the module responsible for variable rent agreements, billing calendars, and escalation processing. The package encapsulates the business logic required to construct and maintain the change calendar for variable rent agreements. Its principal responsibility is to copy configuration and transactional data from a parent variable rent agreement into a change version of that agreement, and then to populate and recalculate the associated billing periods, breakpoints, volume history, and transaction records. In practice, the package acts as the engine behind the "change calendar" workflow: when a user creates a new version of a rent agreement in order to alter terms from a given effective date forward, this package clones the parent agreement's constraints, lines, volume history, and defaults, populates transactions, and recalculates year-to-date breakpoints and blended periods. The header comment in the source declares the original creation date as 13-FEB-2003, indicating the package has been part of the PN variable rent architecture since the early 11i/12.x releases and remains in use through 12.1.1 and 12.2.2.

Key Procedures and Functions

The package exposes sixteen documented procedures and functions, organized around two broad themes: cloning a parent agreement and recalculating derived calendar data.

  • COPY_VAR_RENT_AGREEMENT — Orchestrating routine that creates the change version of a variable rent agreement from its parent.
  • COPY_PARENT_CONSTRAINTS — Creates records in PN_VAR_CONSTRAINTS_ALL for the change agreement by copying the corresponding constraint records from the parent agreement. This is the procedure detailed in the source excerpt, and it iterates the new agreement's periods, matching them against the parent's periods by overlapping start and end dates, then copies the constraints ordered by category, type, and amount.
  • COPY_PARENT_LINES — Copies variable rent line definitions from the parent agreement to the change agreement.
  • COPY_PARENT_VOLHIST — Copies volume history records from the parent agreement so that consumption or usage history is preserved for the new version.
  • COPY_LINE_DEFAULTS and COPY_CONSTR_DEFAULTS — Copy default line and constraint settings from the parent, ensuring the change agreement inherits standard values.
  • POPULATE_TRANSACTIONS — Populates transaction records for the change calendar, the function most closely associated with the PN_VAR_TRANSACTIONS_ALL table referenced by users searching this object.
  • UPDATE_YTD_BKPTS — Recalculates year-to-date breakpoint accumulators following the calendar change.
  • UPDATE_BLENDED_PERIOD — Recomputes blended (partially escalated) periods when a change takes effect mid-period.
  • DETERMINE_RESET_FLAG — Determines whether breakpoint or year-to-date counters must be reset for the change version.
  • GET_LAST_COMPLETE_PERIOD_ID — Returns the identifier of the last fully completed billing period, used to anchor recalculation logic.
  • GET_LY_365_START_DATE and GET_FY_365_END_DATE — Date utility functions that derive the lease-year and fiscal-year 365-day boundaries used in proration and reset calculations.
  • PROCESS_CALENDAR_CHANGE — Drives the end-to-end calendar change process, invoking the copy, populate, and recalculation routines in sequence.
  • CREATE_CREDIT_INVOICE — Generates a credit invoice when a calendar change results in an over-billed or adjusted period.

Tables Accessed

All tables are referenced through APPS synonyms. The package reads and writes PN_VAR_LINES and PN_VAR_LINES_ALL for agreement line definitions, PN_VAR_CONSTRAINTS, PN_VAR_CONSTRAINTS_ALL, and PN_VAR_CONSTRAINTS_S for constraint records and their sequence, and PN_VAR_CONSTR_DEFAULTS_ALL for constraint defaults. Breakpoint processing uses PN_VAR_BKPTS_HEAD, PN_VAR_BKPTS_HEAD_ALL, PN_VAR_BKPTS_HEAD_S, PN_VAR_BKPTS_DET, PN_VAR_BKPTS_DET_ALL, and PN_VAR_BKPTS_DET_S for breakpoint headers and details. PN_VAR_BKHD_DEFAULTS_ALL and PN_VAR_BKDT_DEFAULTS_ALL supply breakpoint header and detail defaults. PN_VAR_GRP_DATES_ALL holds group date definitions used in calendar calculations. Although PN_VAR_TRANSACTIONS_ALL is not explicitly listed in the documented table set, transaction population is performed by POPULATE_TRANSACTIONS, which is the entry point most relevant to that search term.

Usage Notes

This package is classified as OTHER rather than a public API, meaning it is intended for internal invocation within the PN module rather than direct customer extension. It is referenced by two other packages, confirming its role as a shared utility layer. Typical invocation is through the Property Manager variable rent and change calendar forms, or through a concurrent program that processes calendar changes in batch. Custom code should generally avoid calling these procedures directly because they assume the parent/change agreement relationship and the lock and validation context established by the calling form or program. Where the metadata provided is limited, the descriptions above rely on the documented procedure names and table usage; parameter lists are deliberately not stated.