Results for “pa_fin_plan_utils”
50+ results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
PA_FIN_PLAN_UTILS is an Oracle EBS Project Accounting (PA) utility package that provides a library of helper APIs supporting the Financial Plan and Organization Forecast pages. Declared with AUTHID CURRENT_USER and shipped under the APPS schema, the package centralizes common lookups, validation routines, and amount-existence checks that would otherwise be duplicated across the many forms, web pages, and concurrent programs that populate project financial plans.
The package addresses a recurring requirement in Project Accounting: determining whether budget or forecast data already exists for a given planning context before allowing data entry, version changes, or plan deletion. It also resolves configuration metadata — period profile boundaries, financial plan levels, currency attributes, and amount set identifiers — so that higher-level APIs and UI components can operate against consistent plan definitions. The header note confirms its stated purpose is to supply utility APIs for Org Forecast pages, which is consistent with the heavy presence of forecast and budget-related table references.
The search term the user entered, "plan_amount_exists_task_res", maps directly to the documented function PLAN_AMOUNT_EXISTS_TASK_RES, defined in the package at line 52. That function returns 'Y' if at least one record exists in Resource Assignments (PA_RESOURCE_ASSIGNMENTS) for a given Budget Version ID, Task ID, and Resource List Member ID. It was authored by V. Thakkar on 15-MAR-2004, making it one of the older, stable primitives in the package.
Key Procedures and Functions
The package exposes 108 documented routines. The following are representative of the documented set:
- PLAN_AMOUNT_EXISTS — Returns a flag indicating whether any plan amount record exists for a supplied Budget Version ID. Broader than its task/res resource counterpart, it answers the simplest existence question before plan manipulation.
- PLAN_AMOUNT_EXISTS_TASK_RES — As described above, tests for the presence of resource assignment rows scoped to a Budget Version, Task, and Resource List Member. This is the function most often surfaced when callers need to know whether a specific task/resource combination has been planned.
- GET_LOOKUP_VALUE — Retrieves a lookup code value from PA_LOOKUPS given a lookup type and code. A general-purpose fastpath over the PA lookup table.
- CHECK_RECORD_VERSION_NUMBER — Validates a supplied record version number against the expected value, returning a validity flag, return status, and error message code. This supports optimistic locking in plan-editing UIs.
- RETRIEVE_RECORD_VERSION_NUMBER — Returns the current record version number for a given Budget Version ID, complementing the CHECK routine.
- Configuration accessors — GET_RESOURCE_LIST_ID, GET_TIME_PHASED_CODE, GET_MULTI_CURR_FLAG, GET_FIN_PLAN_LEVEL_CODE, GET_AMOUNT_SET_ID, GET_PERIOD_PROFILE_START_DATE, GET_PERIOD_PROFILE_END_DATE, GET_WP_BV_RES_LIST_ID, and GET_WP_BV_TIME_PHASE supply plan-definition metadata on demand.
- Approval and baselining helpers — GET_APP_BUDGET_COST_CB_VER, GET_APPR_COST_PLAN_TYPE_INFO, GET_APPR_REV_PLAN_TYPE_INFO, and GET_BASELINED_VERSION_INFO resolve approved budget versions and plan types for downstream processing.
- Maintenance routines — DELETE_FP_OPTIONS and UPDATE_TXN_CURRENCIES mutate financial plan options and transaction currency rows respectively.
A user-defined exception, Check_Locked_By_User_Exception, is declared alongside package-level globals used during WebADI currency attribute validation (g_first_error_code, g_pc_pfc_context, g_cost_rev_context).
Tables Accessed
The package reads and writes a focused set of Project Accounting and shared Foundation tables through APPS synonyms:
- PA_BUDGET_VERSIONS and PA_BUDGET_LINES — the core plan and line storage against which existence checks and version-number lookups run.
- PA_RESOURCE_ASSIGNMENTS — inspected by PLAN_AMOUNT_EXISTS_TASK_RES to confirm task/resource planning activity (referenced functionally in the header; the assignment table anchors that logic).
- PA_AMOUNT_TYPES_B, PA_FIN_PLAN_TYPES_B, PA_FIN_PLAN_AMOUNT_SETS — plan type, amount type, and amount set metadata.
- PA_PERIODS and PA_PERIODS_ALL — period profile start/end date resolution.
- PA_PROJECTS_ALL, PA_TASKS, PA_PROJ_ELEMENT_VERSIONS, PA_CONTROL_ITEMS — project and task context.
- PA_PROJ_FP_OPTIONS, PA_FIN_PLAN_AMOUNT_SETS, PA_FP_TXN_CURRENCIES — option, set, and transaction-currency maintenance targets for DELETE_FP_OPTIONS and UPDATE_TXN_CURRENCIES.
- PA_IND_RATE_SCHEDULES_ALL_BG — indirect rate schedule information used by rate-related accessors.
- FND_CURRENCIES — currency validation and display attributes.
- PA_LOOKUPS — source for GET_LOOKUP_VALUE and plan context global population.
Usage Notes
PA_FIN_PLAN_UTILS is referenced by 71 other packages, indicating it is a foundational utility rather than an end-user API. It is typically invoked from Project Accounting Financial Plan and Organization Forecast pages, from budget/forecast forms, and from WebADI-based data loaders that must validate currency attributes and plan context before applying spreadsheet uploads. The presence of package globals for WebADI validation reinforces this integration pattern.
Custom code should call the existence and accessor functions rather than querying PA_BUDGET_VERSIONS or PA_RESOURCE_ASSIGNMENTS directly, because the package encapsulates plan-level rules (for example, whether a zero-amount plan still counts as existing). The AUTHID CURRENT_USER declaration means execution runs with the caller's privileges, so grants on the underlying PA tables are required for custom callers. Because the 108 routines share one specification, callers should be aware that recompilation of the package body can invalidate dependent objects across the 71 referencing packages; deployments should schedule recompilation accordingly.