Search Results spread_amount




Overview

PA_MISC is a utility package in the Oracle EBS Projects (PA) module, owned by the APPS schema and declared with AUTHID CURRENT_USER, meaning its SQL statements execute with the privileges of the calling user rather than the package owner. It functions as a shared library of low-level helper routines that other Projects packages and forms invoke to resolve common lookup values — job identity, set of books, period names, and date boundaries — without duplicating that logic across the application. The package is classified as OTHER in the ETRM API registry, indicating it is not an externally supported public API but an internal building block used throughout the Projects codebase. Its header dates to the original 11.5-era porting release, and the package remains structurally unchanged in 12.1.1 and 12.2.2.

Key Procedures and Functions

Eight functions are documented, each marked with pragma RESTRICT_REFERENCES (..., WNDS, WNPS), which asserts that the function writes neither database state nor package state and thus can be safely called from SQL.

  • get_job_id — The function the user searched for. It resolves the job identifier applicable to a person on a task within a project as of a given effective date, returning a NUMBER. Rather than storing the parameter list, note that it is the package's mechanism for deriving the correct job assignment when multiple assignments or overrides exist over time.
  • get_exp_cycle_start_day_code — Returns the expenditure cycle start day code configured for the installation.
  • get_set_of_books_id — Returns the set of books identifier in effect, used to anchor multi-org and ledger-sensitive queries.
  • get_week_ending_date — Derives the week-ending date corresponding to a supplied expenditure item date.
  • get_month_ending_date — Derives the month-ending date for an expenditure item date.
  • get_pa_period — Maps a date to its Oracle Projects period name.
  • get_gl_period — Maps a date to its General Ledger period name.
  • spread_amount — Distributes an amount across a date range according to a specified spread type, returning the resulting portion; used in revenue and cost spreading calculations.

Tables Accessed

Through APPS synonyms the package reads four tables:

  • PA_JOB_ASSIGNMENT_OVERRIDES — consulted by get_job_id to apply job assignment overrides for a person/task/project combination.
  • PA_IMPLEMENTATIONS — supplies implementation-level settings, including the set of books and expenditure cycle configuration.
  • PA_PERIODS — source of Projects period definitions used by get_pa_period and the date-boundary functions.
  • GL_PERIOD_STATUSES — source of General Ledger period information for get_gl_period.

Usage Notes

Because PA_MISC is classified as OTHER and is internal, it is typically invoked from other Projects PL/SQL packages rather than directly by end users; ETRM records 17 packages referencing it. Typical call sites include expenditure processing logic that must determine the correct job for a person before building cost or billing distributions, period-validation routines, and spreading engines that use get_week_ending_date, get_month_ending_date, and spread_amount. Custom extensions in the Projects module may call these functions, but because the package is not an officially supported public API, signatures should be treated as subject to change across patches. The RESTRICT_REFERENCES pragmas confirm the functions are safe to embed in SQL statements.