Search Results pa_work_type_invalid_ambigous




Overview

APPS.PA_WORK_TYPE_UTILS is a utility package body in the Oracle E-Business Suite Projects (PA) module that centralizes validation and resolution logic for work types. Work types are user-defined classifications (for example, Capital, Internal, or Billable effort categories) that are attached to project and task definitions and later drive costing, billing, and cross-charge processing. Because work type values are entered on many different forms and through multiple public APIs, Oracle provides this utility layer to enforce consistent validation rules — specifically, confirming that a supplied work type identifier or name exists and is currently active based on its effective dates in the work type setup tables. The header comment (version 120.2, dated 03-Nov-2005) shows the package is a long-standing, stable component of the PA codebase, and the ETRM classification of OTHER indicates it is an internal helper rather than a formally published public API.

Key Procedures and Functions

The documented package exposes two procedures:

  • CHECK_WORK_TYPE_NAME_OR_ID — The primary routine. It accepts either a work type ID or a work type name and resolves the pair down to a single validated work type ID. When an ID is supplied, a check flag determines whether the ID is merely passed through or fully validated against the work type table; when only a name is supplied, the name is looked up and converted to its corresponding ID. The procedure returns a standard FND_API return status and, on failure, an error message code (the excerpt shows PA_WORK_TYPE_INVALID_AMBIGOUS being set in the NO_DATA_FOUND handler). The source notes a deliberate change from pa_work_types_v to pa_work_types_b for performance reasons, per Bug 4668829.
  • CHECK_WORK_TYPE — A companion validation routine that verifies a work type against the caller's context. It follows the same success/error status convention, allowing calling code to branch on x_return_status without raising unhandled exceptions.

Both procedures follow the standard EBS API contract: they return status rather than propagating exceptions to the caller, and they use PA_DEBUG for error-stack tracing.

Tables Accessed

  • PA_WORK_TYPES_B — The base work type table, holding work_type_id, name, and start/end date active columns. Used for the ID-based validation path for performance reasons.
  • PA_WORK_TYPES_V — The view over the base table, used for name-based lookup.
  • PA_PROJECTS, PA_TASKS, PA_PROJECT_TYPES — Project, task, and project type entities referenced as APPS synonyms, reflecting the package's role in validating work type assignments in the context of project structures.

All lookups apply the SYSDATE BETWEEN start_date_active AND NVL(end_date_active, SYSDATE) predicate to guarantee only currently effective work types are returned.

Usage Notes

This package is referenced by four other packages within the PA schema, making it a shared dependency. It is typically invoked indirectly: project and task entry forms, work type validation logic, and custom extensions that need to convert a work type name to an ID or confirm that a given work type is active on the current date call CHECK_WORK_TYPE_NAME_OR_ID rather than querying the tables directly. Because the routines return FND_API status codes and OUT parameters, callers must always inspect x_return_status and handle x_error_message_code before using the returned ID. Developers searching for "get_project_type" should note that project type retrieval is a separate concern; the work type utilities validate work type references that are subsequently associated with project types and project definitions. Custom code should treat this package as an internal utility and use the documented PA public APIs where a formally supported interface exists.