Search Results p_to_project_id




Overview

PJM_TASK_AUTOASSIGN_COPY is a PL/SQL package body owned by the APPS schema in Oracle E-Business Suite 12.1.1 and 12.2.2. It belongs to the Project Management (PJM) product family and supports the automatic assignment and replication of task-level rules between projects. Its principal business purpose is to copy task auto-assignment rules configured on a source project onto a target project, while resolving the appropriate default task for each assignment type. This capability is central to project template reuse and setup replication: instead of manually re-entering assignment rules for every new project, implementers and project administrators can clone the rule definitions from an existing project and let the package derive the correct target tasks.

Automated task assignment underpins downstream project manufacturing, procurement, and costing flows, where transactions must be routed to a valid task. The package is classified as OTHER in the ETRM metadata, indicating it is an internal utility rather than a formally published public API. The parameter naming convention (P_From_Project_ID, P_To_Project_ID, P_Organization_ID) reflects its copy-oriented semantics and confirms the relationship to the searched term p_to_project_id, which identifies the destination project for the copied rules.

Key Procedures and Functions

  • COPY_RULES — The single documented procedure in the package body. It copies task auto-assignment rules from a source project to a destination project within a specified operating unit. The procedure exposes input parameters for the source project, destination project, organization, a copy option indicator, and a flag controlling whether the default task should be used. It returns status information through output parameters, including a return status, a message count, message data, and two counter variables used to report the number of records processed. Internally it works with a cursor that selects assignment type, project, and task information and converts task identifiers to numeric form using PJM_PROJECT.ALL_TASK_IDTONUM.

The package body also contains private helper logic. Most notably, the Default_Task function resolves the default task for a given project, organization, and assignment type by querying PJM_DEFAULT_TASKS. It filters strictly on records where all optional qualifiers — inventory item, category, purchase order header, subinventory, procurement flag, standard operation, assembly item, department, WIP entity pattern, WIP material transaction type, and destination organization — are null, thereby isolating the generic default task. Cached package-level variables (project, organization, assignment type) avoid redundant cursor execution when the same context is requested repeatedly.

Tables Accessed

  • PJM_DEFAULT_TASKS — The primary source of default task definitions. Queried by the Default_Task helper to retrieve the task_id matching a project, organization, and assignment type when no specialized qualifiers are present.
  • PJM_ORG_PARAMETERS — Organization-level project setup parameters used to validate or interpret auto-assignment behavior for the operating unit.
  • PJM_PROJECT_PARAMETERS — Project-level setup parameters that govern task and rule behavior for the source and destination projects.
  • DUAL — Used for single-row PL/SQL evaluations and anonymous reference queries.

Usage Notes

Because COPY_RULES is not a published API and the package is referenced by zero other packages, it is typically invoked through project setup forms, concurrent programs, or custom client extensions that clone project structures. The searched parameter p_to_project_id is supplied by the calling form or program to designate the destination project. Callers should expect task identifiers to be re-resolved in the target project context rather than copied verbatim, and should handle the returned status, message data, and record counts to detect partial or failed copies. As an internal, early-generation utility (header version 115.5), it should be used with caution in customizations, and behavior may vary between 12.1.1 and 12.2.2.