Search Results get_lowest_cardinality




Overview

PSP_TEMPLATE_SELECTION is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that supports the Template Selection process within Oracle's Grants and Labor Distribution (PSP) functionality. Its principal business role is to build and refine the population of persons or assignments that will be processed by a given payroll action, resolving the intersection of the request template's selection rules against HR, Payroll, Projects, and Grants data. The package is declared with AUTHID CURRENT_USER, so execution of its SQL references objects through the invoking user's privileges and APPS synonyms.

The package is organized into two parallel families of logic: a person-oriented path and an assignment-oriented path. The assignment procedures were introduced under a UVA bug fix (bug 4429787), which extended the original person-centric processing to assignment-level selection.

Key Procedures and Functions

The documented procedures are grouped by purpose:

Tables Accessed

The package reads and writes through APPS synonyms. Selection logic draws on PER_ALL_PEOPLE_F and PER_ALL_ASSIGNMENTS_F for the base person and assignment populations, PER_ASSIGNMENT_STATUS_TYPES for active or suspended status filtering, and PER_TIME_PERIODS for effort date context. Organizational and financial scoping uses HR_ASSIGNMENT_SETS and HR_ASSIGNMENT_SET_AMENDMENTS, while PAY_PAYROLL_ACTIONS supplies the payroll action driving execution and PSP_REPORT_TEMPLATES supplies the template definitions whose cardinality is evaluated. Project and award driven selection references PA_PROJECTS_ALL and GMS_AWARDS_ALL. Working and output data are persisted in PSP_PRE_GEN_DIST_LINES_HISTORY, PSP_DISTRIBUTION_LINES_HISTORY, PSP_ADJUSTMENT_LINES_HISTORY, and PSP_REPORT_ERRORS / PSP_REPORT_ERRORS_S for error capture and reporting.

Usage Notes

PSP_TEMPLATE_SELECTION is invoked during concurrent processing of labor distribution and template selection requests rather than directly from end-user forms. The typical flow is INSERT_INTO_TEMPLATE_HISTORY, then the lowest-cardinality or prepare/prune sequence, followed by the relevant exclusion procedure, and finally GET_FINAL_SELECTION_LIST to materialize the results. The package is referenced by one other package, confirming it is an internal worker rather than a public API.

Because the procedures are not classified as a public API, custom code should avoid calling them directly. When investigating why a payroll action selected fewer persons or assignments than expected, apply_exclusion_criteria and its assignment counterpart are the primary diagnostic targets, since exclusions are applied after the initial list is prepared and pruned. Execution should be monitored through PSP_REPORT_ERRORS, which records errors raised during processing.