Results for “insert_into_crm”
30 results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
APPS.PA_R_PROJECT_RESOURCES_PVT is a private PL/SQL package body within the Oracle E-Business Suite Projects (PA) module that manages the synchronization of project resource records between Oracle Human Resources, Oracle Projects, and the CRM resource repository. The package is responsible for creating, maintaining, and reconciling resource definitions that originate in PER_ALL_PEOPLE_F and PER_ALL_ASSIGNMENTS_F and must be reflected in PA_RESOURCES, PA_RESOURCES_DENORM, and the JTF_RS_RESOURCE_EXTNS CRM tables. In Oracle EBS 12.1.1 and 12.2.2 the package is compiled under the APPS schema and is classified as a private (PVT) API, meaning it is intended for internal consumption by other PA packages rather than as a public integration interface.
The name of the package reflects its purpose: it operates on the project resources dimension of the Projects application, ensuring that HR persons and assignments are surfaced as usable resources in Projects and CRM. The presence of the global variable G_p_crmwf_id and the forward declaration of start_crm_workflow indicates that the package coordinates CRM workflow invocation, invoking the CRM resource workflow once for all HR assignments belonging to a given person rather than per assignment.
Key Procedures and Functions
The documented package exposes seven procedures and functions:
- INSERT_INTO_CRM — Inserts or synchronizes the resource definition into the CRM resource tables (JTF_RS_RESOURCE_EXTNS). This is the procedure most directly implicated by the user search term "insert_into_crm" and is the primary CRM-side write path in the package.
- INSERT_INTO_PA — Creates the corresponding Projects resource record in PA_RESOURCES and the denormalized PA_RESOURCES_DENORM structure, along with resource type and transaction attribute rows.
- CHECK_OU — Validates the operating unit context for the resource, ensuring the resource is associated with a valid operating unit before creation or update proceeds.
- CREATE_INTERNAL_RESOURCE — Creates a resource of internal type, typically corresponding to an HR employee or contingent worker with associated assignments.
- CREATE_RESOURCE — The general resource creation entry point that dispatches to internal, future-dated, or CRM-specific creation logic.
- CREATE_FUTURE_CRM_RESOURCE — Creates a CRM resource record with a future-dated start, used when a person's assignment start date is later than the current effective date.
- GET_USER_PERSON_TYPE — Derives the person type for a given FND_USER, used to determine which resource creation path should be followed.
Tables Accessed
The package reads from and writes to the following documented tables:
- PA_RESOURCES, PA_RESOURCES_DENORM, PA_RESOURCES_S — Core Projects resource definition and denormalized lookup tables.
- PA_RESOURCE_TXN_ATTRIBUTES, PA_RESOURCE_TYPES — Resource transaction attributes and resource type classification.
- JTF_RS_RESOURCE_EXTNS — CRM resource extension table, the target of INSERT_INTO_CRM.
- PER_ALL_PEOPLE_F, PER_ALL_ASSIGNMENTS_F, PER_PERSON_TYPES — HR source records for persons and their assignments.
- FND_USER — Application user records used to link an HR person to an EBS user.
- HR_ORGANIZATION_INFORMATION, PA_ALL_ORGANIZATIONS — Organization and operating unit information.
- JTF_CALENDARS_B, JTF_CAL_RESOURCE_ASSIGN, JTF_CAL_RESOURCE_ASSIGN_S — CRM calendar and resource calendar assignment tables.
Usage Notes
PA_R_PROJECT_RESOURCES_PVT is a private package and is referenced by one other package in the EBS data model. It is typically invoked indirectly through the Projects resource management flows — for example, when a concurrent program or a Project Resource Management form triggers synchronization of HR persons into Projects and CRM resources. Because the package is not a public API, custom code should not call it directly; customizations that require resource creation should instead use the supported public APIs or the underlying base tables. The presence of debug profile PA_DEBUG_MODE in the source indicates that FND logging can be enabled for troubleshooting resource creation issues, and the CRM workflow coordination logic implies that CRM resource records may be created asynchronously via workflow.