Search Results first_year




Overview

CN_ACC_PERIODS_PVT is a private PL/SQL package body in the APPS schema belonging to the Oracle E-Business Suite ETRM (Enterprise Trade and Risk Management) product family. It provides the period-management infrastructure used to open and maintain accounting periods within the CN application. The package acts as the internal engine behind the accounting calendar lifecycle, resolving the period set, period type, and set of books associated with the CN repository, and then driving the period open/close state transitions that control whether trading and risk transactions can be posted to a given period.

Because the package is classified as PVT (private), it is not a public API and is not intended for direct invocation by external integrators. Its logic would typically be reached indirectly through concurrent programs, forms, or other CN packages. The package header declares a package name constant (G_PKG_NAME := 'CN_ACC_PERIODS_PVT') and a str_tbl_type collection used to cache lookup code/meaning pairs returned from CN_LOOKUPS for the PERIOD_CLOSING_STATUS lookup type. The get_closing_status helper function, based on the 120.7 source header revision, was simplified to return the closing status meaning directly, reflecting a fix for bug 2804029.

Key Procedures and Functions

  • OPEN_PERIOD — Drives the period-opening process. It accepts an error buffer, a return code, a period name, and a freeze flag, then builds a period table from a cursor that joins CN_PERIOD_STATUSES and CN_LOOKUPS to derive the closing and processing status of the period. The repository context (set of books, period set, and period type) is resolved from CN_REPOSITORIES. This procedure is the primary entry point for opening a CN accounting period.
  • START_REQUEST — Submits a concurrent request. It is designed to be invoked in a single-organization context, allowing an EBS concurrent program to be launched from within the period-management logic.
  • UPDATE_ACC_PERIODS — Applies changes to the set of accounting periods, persisting status or attribute updates against the period metadata maintained in the CN period tables.
  • GET_ACC_PERIODS — Retrieves the accounting periods for the current repository, building the period rows used by the calling process. The cursor in OPEN_PERIOD is noted in the source as a copy of the cursor used here.

Tables Accessed

  • CN_REPOSITORIES — Read to determine the set_of_books_id, period_set_id, and period_type_id for the CN application context (repository_id > 0, application_type = 'CN').
  • CN_PERIOD_SETS / CN_PERIOD_TYPES — Provide the accounting calendar structure used to interpret period names and years.
  • CN_PERIOD_STATUSES — The central transactional table holding each CN period's name, year, start and end dates, and status codes.
  • CN_LOOKUPS (GL_LOOKUPS) — Supplies the meanings for PERIOD_CLOSING_STATUS and PERIOD_PROCESSING_STATUS lookup codes.
  • GL_PERIOD_STATUSES — Referenced for cross-validation against the General Ledger period status.
  • PLITBLM — The EBS standard table used for storing multi-line concurrent program parameters.

Usage Notes

CN_ACC_PERIODS_PVT is invoked in single-org context and is referenced by one other package in the CN schema, so callers normally reach it through higher-level CN APIs or concurrent programs rather than directly. Administrators choosing the "first year" of an accounting calendar or opening the first period of a new repository would trigger this logic indirectly. Typical triggers include the CN accounting calendar form and period-opening concurrent requests. Because the package is private, customizations should target the public CN accounting APIs instead of calling these procedures directly; dependencies on lookup meanings and repository configuration mean that all periods are interpreted relative to the active CN repository, and the freeze flag stored on generated period rows controls whether transactions may still post to a given period.