Search Results domain_result_calc




Overview

PQH_PRVCALC is a PL/SQL package owned by the APPS schema in Oracle E-Business Suite (12.1.1 and 12.2.2). It belongs to the Public Sector / Human Resources (PQH) product family, which supports position management, position hierarchies, and related HR budgeting structures. The package is classified under the generic API classification OTHER, indicating that it is an internal implementation package rather than a formally published business API with a documented interface contract.

The business function of PQH_PRVCALC centers on the calculation and validation of attribute privileges and requirement flags associated with templates. In the PQH data model, templates and their attributes drive how position, task, and domain information is captured, defaulted, and validated. PQH_PRVCALC resolves which attributes apply to a given template or task, determines whether those attributes are required, and evaluates the resulting privilege or mode flags that govern whether the end user may view, enter, or update the associated data. Because it is referenced by five other packages, it functions as a shared calculation engine that higher-level PQH processing routines delegate to.

Key Procedures and Functions

The package exposes twelve documented program units. The following are the principal ones:

  • DOMAIN_RESULT_CALC — Computes attribute privilege results for a domain template, returning a populated collection of attribute identifiers and their associated flags.
  • TASK_REFERENCES — Resolves the attribute references attached to a given task template, accumulating result rows into the supplied collection.
  • TASK_RESULT_UPDATE — Updates task-level attribute privilege results, reconciling calculated values with the task template definition.
  • ATTRIBUTE_FLAG_RESULT — Derives the mode and required flags for individual attributes, forming the basis of the privilege model.
  • TASK_TASK_MODE_COMP_FLAG — Compares task-level mode flags, evaluating compatibility between a task and its associated task mode configuration. This is the unit surfaced by the search term "task_task_mode_comp_flag."
  • DOMAIN_TASK_MODE_COMP_FLAG — Performs the analogous mode-flag compatibility comparison at the domain level.
  • PRIVILEDGE_CALC — Calculates the effective privilege set for a template or attribute combination.
  • TEMPLATE_ATTRIB_REQD_CALC — Determines which template attributes are required, driving mandatory-field behavior in the user interface.
  • GET_ROW_PRV — Retrieves row-level privilege information for the current calculation context.
  • CHECK_PRIV_CALC — Validates that calculated privileges satisfy the applicable rules.
  • PRIVILEDGE_CALC_COUNT — Returns counts of calculated privileges, typically used for summary or control-break processing.
  • GET_ATTRIBUTE_MODE — Returns the mode flag for a specified attribute.

The package defines record and table types such as t_attid_priv, t_attname_priv, and t_task_templ, and maintains a global result collection used to return calculated values row by row.

Tables Accessed

PQH_PRVCALC reads and writes the following tables through APPS synonyms:

  • PQH_TEMPLATE_ATTRIBUTES — The central table mapping attributes to template definitions; supplies the template_id values that drive most calculations.
  • PQH_ATTRIBUTES — Defines the attribute metadata, including attribute identifiers used in the privilege records.
  • PQH_TXN_CATEGORY_ATTRIBUTES — Associates transaction categories with attributes, used when evaluating task and mode flag compatibility.
  • PQH_REF_TEMPLATES — Provides reference template information for resolving template relationships during calculation.
  • PLITBLM — A general PL/SQL index-by table utility used for passing tabular data into and out of SQL statements.

Usage Notes

Because PQH_PRVCALC is an internal package, it is not typically invoked directly by end users or external integrations. It is called by higher-level PQH packages and by the Oracle Forms-based setup and maintenance screens for position management templates, where attribute privileges and required-field flags must be recalculated on save or template change. Customizations should avoid direct calls to PQH_PRVCALC and instead use the supported public APIs of the PQH product, since the package header may change between releases. DBAs debugging privilege or required-field discrepancies in PQH templates can use the individual procedures, particularly CHECK_PRIV_CALC and PRIVILEDGE_CALC_COUNT, as diagnostic entry points during troubleshooting.