Search Results check_erdl_exists




Overview

PA_PROJ_TSK_UTILS is a utility package in the Oracle EBS Projects (PA) application, owned by the APPS schema. It provides a set of reusable PL/SQL functions that answer existence and derivation questions about projects, tasks, and the transactional data attached to them. Rather than enforcing business rules or performing transactional writes, the package functions primarily return boolean-style numeric indicators (1 for existence found, 0 for no record found) or an Oracle error code if a query fails. This design allows calling code throughout Oracle Projects — forms, concurrent programs, and custom extensions — to make lightweight, consistent decisions about whether related data exists before attempting edits, deletions, or transfers.

The package dates to the original Oracle Projects releases (header comments reference 1995) and has evolved to include checks against commitments, billing events, expenditure items, payables, and purchasing distributions. It carries the RESTRICT_REFERENCES pragma on its functions, marking them as read-only (WNDS, WNPS), which is significant because it allows these functions to be called directly from SQL statements and from within PL/SQL contexts that require purity guarantees.

Key Procedures and Functions

These functions collectively form a "liveness" inspection layer, permitting callers to decide whether a project or task element can be safely modified or deleted.

Tables Accessed

The package queries a defined set of APPS synonyms, including AP_EXPENSE_REPORT_HEADERS_ALL and AP_EXPENSE_REPORT_LINES_ALL for expense report activity; AP_INVOICES_ALL and AP_INVOICE_DISTRIBUTIONS_ALL for payables linkage; CSD_REPAIRS, CSF_DEBRIEF_LINES, and CS_ESTIMATE_DETAILS for service and depot repair data; PA_COMMITMENT_TXNS for commitments; PA_COMP_RULE_OT_DEFAULTS_ALL for compensation rule defaults; PA_COST_DISTRIBUTION_LINES_ALL for cost distributions; PA_CUST_EVENT_REV_DIST_LINES and PA_CUST_REV_DIST_LINES for revenue distributions; and PA_DRAFT_INVOICE_DETAILS_ALL, PA_DRAFT_INVOICE_ITEMS, and PA_DRAFT_REVENUE_ITEMS for draft invoice and revenue processing. The functions perform read-only existence lookups against these tables, never modifying them.

Usage Notes

PA_PROJ_TSK_UTILS is typically invoked from Oracle Projects forms and concurrent programs that must validate or gate operations involving projects and tasks. Client extensions and custom concurrent programs reference it because it exposes reliable, reusable existence checks rather than reimplementing query logic. With the RESTRICT_REFERENCES pragma applied to each function, the functions may also be called from SQL statements. The package is referenced by four other packages, indicating its role as a shared dependency in the Oracle Projects module. Developers should treat return value 1 as "exists," 0 as "does not exist," and any other number as an Oracle error code from the underlying query.