Search Results get_fy_365_end_date
Overview
APPS.PN_VAR_CHG_CAL_PKG is a PL/SQL package in the Oracle Property Manager (PN) module of Oracle E-Business Suite, declared with AUTHID CURRENT_USER. It supports the variable rent billing and calendar infrastructure used by property lease and variable rent agreements. The package primarily addresses change-of-calendar scenarios, providing the logic required to copy, rebuild, and reprice variable rent agreements when the underlying billing calendar is altered. In the context of Oracle EBS 12.1.1 and 12.2.2, the package sits alongside the broader PN_VAR_* schema family that manages variable rent lines, breakpoints, constraints, and volumetric history. The presence of GET_LY_365_START_DATE, GET_FY_365_END_DATE, and GET_LAST_COMPLETE_PERIOD_ID indicates that the package encapsulates date and period boundary logic independent of any single form or concurrent program, making it reusable by both standard product flows and extension code. Its multi-table persistence across the PN_VAR_BKPTS and PN_VAR_CONSTRAINTS families confirms that it performs write operations that carry billing consequences, not merely read-only reporting.
Key Procedures and Functions
- COPY_VAR_RENT_AGREEMENT — Creates a new variable rent agreement by copying an existing one, with optional date range, proration rule, and period creation controls, returning the new agreement identifier and number.
- COPY_PARENT_CONSTRAINTS — Replicates constraint records from a source variable rent agreement to a target agreement.
- COPY_PARENT_LINES — Copies variable rent line definitions between agreements.
- COPY_PARENT_VOLHIST — Copies volumetric history associated with the parent agreement.
- POPULATE_TRANSACTIONS — Generates billing transactions for a given variable rent agreement, optionally scoped by period or line item.
- UPDATE_YTD_BKPTS — Recalculates year-to-date breakpoint values across the specified period or date range.
- DETERMINE_RESET_FLAG — Determines whether a period requires a breakpoint reset, using category, sales type, and date criteria.
- UPDATE_BLENDED_PERIOD — Recomputes blended-period pricing, available in both short and extended overloaded forms.
- GET_LAST_COMPLETE_PERIOD_ID — Returns the identifier of the most recently completed period for an agreement.
- GET_LY_365_START_DATE — Returns the start date corresponding to the prior-year 365-day comparison window.
- GET_FY_365_END_DATE — Returns the fiscal-year 365-day end date.
- PROCESS_CALENDAR_CHANGE — Orchestrates the calendar-change workflow, accepting old and new agreement identifiers and an effective date, returning status and message outputs.
- COPY_LINE_DEFAULTS, COPY_CONSTR_DEFAULTS, CREATE_CREDIT_INVOICE — Supporting utilities for copying default settings and credit invoice creation.
Tables Accessed
The package reads and writes the PN_VAR_BKPTS_DET and PN_VAR_BKPTS_HEAD families (including _ALL and _S variants), which hold breakpoint detail and header data central to variable rent pricing. PN_VAR_CONSTRAINTS and its _ALL/_S variants store agreement constraints that COPY_PARENT_CONSTRAINTS propagates. PN_VAR_LINES and PN_VAR_LINES_ALL hold variable rent line definitions. PN_VAR_BKDT_DEFAULTS_ALL, PN_VAR_BKHD_DEFAULTS_ALL, and PN_VAR_CONSTR_DEFAULTS_ALL supply default templates for details, headers, and constraints respectively. PN_VAR_GRP_DATES_ALL holds grouping date definitions used in period and calendar calculations.
Usage Notes
This package is typically invoked from the Oracle Property Manager variable rent setup and calendar change forms, and from concurrent programs responsible for breakpoint recalculation. Because it is referenced by two other PL/SQL packages, callers should treat it as an internal integration point. The GET_LY_365_START_DATE function is commonly called in custom reporting or extension logic that needs prior-year comparison dates. Direct invocation from custom code should honor the AUTHID CURRENT_USER declaration and be exercised within a controlled transaction, since the copy and update procedures commit multi-table billing changes.