Search Results check_work_type_name_or_id




Overview

PA_WORK_TYPE_UTILS is a public PL/SQL utility package owned by the APPS schema in Oracle E-Business Suite, shipped with the Projects (PA) module and available in both 12.1.1 and 12.2.2. It was created to centralize the validation and resolution logic governing work types, which are the classifications used on project assignments, expenditure items, and task-level labor reporting. The package is declared with AUTHID CURRENT_USER, meaning its SQL statements execute under the privileges of the calling schema rather than as the APPS owner, so invoker rights are applied at run time.

The package addresses two recurring requirements in the Projects application: converting or confirming the identity of a work type supplied by an external caller, and confirming that a chosen work type is permissible for a particular project and task. Its header comment, dated 2000, reflects that it is one of the older foundation utilities on which newer Projects APIs depend; the ETRM metadata records four other packages that reference it, indicating it functions as a shared validation layer rather than a stand-alone user-facing program.

Key Procedures and Functions

Two procedures are documented in the package specification:

  • CHECK_WORK_TYPE_NAME_OR_ID — Resolves a work type identifier from either a name or an existing ID. When a work type name is passed, the procedure converts the name into its corresponding work_type_id. When an ID is passed instead, it validates that ID according to the p_check_id_flag setting and returns the resolved ID along with a status and error message code. The procedure history shows two creation entries dated 19-Jul-2000 and 21-Sep-2000.
  • CHECK_WORK_TYPE — Validates the compatibility of a work type with a project and task. The documented business rule is that when the project is an indirect project, only non-billable work types may be assigned; when the project is not indirect, all work types are acceptable. Created 28-Nov-2000, the procedure returns only a status and error message code, allowing callers to continue or raise an application error.

Tables Accessed

ETRM lists four base tables reached through APPS synonyms:

  • PA_WORK_TYPES_B — the work type definition table, read to resolve a name to an ID and to confirm that a supplied ID is valid.
  • PA_PROJECTS — read to determine project attributes, including whether the project is indirect, which drives the billable/non-billable rule in CHECK_WORK_TYPE.
  • PA_TASKS — read to evaluate task-level context when a task identifier is supplied.
  • PA_PROJECT_TYPES — read to classify the project and support the indirect-project determination.

The package is a read-only validation utility; the documented behavior involves no inserts, updates, or deletes.

Usage Notes

Because this package is an API-classified utility rather than a form or concurrent program, it is normally invoked programmatically. Typical callers include Projects forms that validate a work type entered on a project, task, or assignment, and other PL/SQL packages performing project setup or transaction validation. The fact that four packages reference it confirms it is commonly called from within the Projects API stack rather than directly by end users.

Custom code should call the procedures through the APPS schema and inspect x_return_status before proceeding, using x_error_message_code to retrieve the corresponding message from FND_MESSAGE. Callers searching for check_work_type_name_or_id should note that the procedure both resolves names to IDs and validates IDs, so a single call can replace separate lookup and validation steps. As with any seeded utility, the behavior should be treated as fixed; overloading or modifying the package is not supported.