Search Results check_task_in_structure




Overview

PA_PROJ_ELEMENTS_UTILS is a foundational PL/SQL utility package in the Oracle E-Business Suite Projects (PA) module. Its principal business function is to centralize the manipulation and interrogation of project element structures — the work breakdown structures (WBS), workplans, and task hierarchies that organize project work in Oracle Projects. The package provides a shared programmatic layer through which other application modules, forms, and concurrent programs evaluate, validate, and modify project elements and their versions without duplicating structural logic.

The package was declared with AUTHID CURRENT_USER, meaning it executes under the privileges of the calling schema rather than its owner. This design choice allows calling code across multiple modules to leverage the utility routines while respecting the calling session's security context. A package-level global variable, g_Struc_Ver_Id, is exposed through accessor routines to carry a structure version identifier across processing steps within a session. The package's header history reflects sustained maintenance across releases, including R12 fixes and an update shipped in the 12.2.2 code line, indicating ongoing support through the EBS 12.1.1 and 12.2.2 releases. The package is referenced by 76 other packages, underscoring its role as a high-leverage utility in the Projects code base.

Key Procedures and Functions

The documented API surface includes 80 procedures and functions, reflecting the breadth of structural validation and retrieval operations required by Projects. Representative entries include:

  • SETGLOBALSTRUCVERID / GETGLOBALSTRUCVERID — Set and retrieve the session-level structure version identifier stored in the package global variable, enabling consistent context across a sequence of calls.
  • CHECK_EDIT_TASK_OK — Determines whether a task may be edited, considering project, structure version, and element identifiers. The documented signature includes parameters requiring a lock and optionally adding an error message, reflecting concurrency and user-feedback considerations.
  • GET_STRUCTURE_ATTRIBUTES — Returns descriptive attributes of a project element version, such as task name, task number, version identifiers, structure name and number, and the owning project. This is a primary retrieval routine for structural metadata.
  • LATEST_PUBLISHED_VER_ID — Returns the most recent published version of a structure for a given project.
  • GET_LAST_UPD_WORKING_WP_VER — Identifies the last-updated working workplan version, supporting shortcut navigation to the active planning version.
  • ELEMENT_HAS_CHILD — Tests whether a structural element has child elements, a prerequisite for safe deletion or reorganization.
  • IS_LOWEST_TASK — Determines whether a task sits at the lowest level of the hierarchy, a common check before charging transactions to a task.
  • CHECK_ELEMENT_NUMBER_UNIQUE — Validates uniqueness of element numbering within the applicable structure.
  • CHECK_STRUC_PUBLISHED, CHECK_DELETE_TASK_VER_OK, CHECK_DATE_RANGE, CHECK_TASK_IN_STRUCTURE — Perform pre-condition validation for publishing, deletion, effective dating, and structural membership.
  • UPDATE_WBS_NUMBERS — Recomputes WBS numbering after structural changes.
  • GET_LINKED_TASK_VERSION_ID, LINK_FLAG, PROJECT_NAME_OR_ID, TASK_VER_NAME_OR_ID, STRUCTURE_TYPE, IS_SUMMARY_TASK_OR_STRUCTURE — Return relationship, identification, and classification details used throughout the Projects forms and validation flows.

Tables Accessed

The package operates against core Projects structures through APPS synonyms. PA_PROJECTS_ALL, PA_PROJ_ELEMENTS, PA_PROJ_ELEMENT_VERSIONS, and PA_PROJ_ELEM_VER_STRUCTURE provide the base project, element, version, and version-to-structure relationships that the utility routines inspect and maintain. PA_STRUCTURE_TYPES supplies valid structure type definitions, and PA_ALTERNATE_TASKS supports alternate task relationships. PA_COMP_RULE_OT_DEFAULTS_ALL and PA_EI_DENORM support compensating rules and denormalized expenditure inquiry data, while PA_COMMITMENT_TXNS and PA_DRAFT_INVOICE_DETAILS_ALL connect structural elements to commitments and draft invoice activity. Cross-module access extends to AP_EXP_REPORT_DISTS_ALL, AP_INVOICES_ALL, and AP_INVOICE_DISTRIBUTIONS_ALL for validation of Payables-related associations, MTL_MATERIAL_TRANSACTIONS for inventory transactions tied to project work, and FND_USER for identity resolution.

Usage Notes

PA_PROJ_ELEMENTS_UTILS is typically invoked indirectly rather than by end users. Oracle Projects forms for workplan and task maintenance call its validation routines (such as CHECK_EDIT_TASK_OK and CHECK_DELETE_TASK_VER_OK) before permitting a user action, and its retrieval routines populate display fields with structure attributes. Concurrent programs and other Projects packages — 76 in total — consume the same routines for bulk publishing, project creation, and transaction validation. Custom code should invoke the package only through its documented interface, respecting the AUTHID CURRENT_USER context and the requirement to set the global structure version identifier before performing operations that depend on structural context. Because the package underpins shared structural integrity checks, extensions should be implemented by wrapping the documented APIs rather than modifying the package body.