Search Results create_tk_grp_query_criteria




Overview

The APPS.HXC_TK_GRP_QUERY_CRITERIA_API package body is a public application programming interface within Oracle E-Business Suite's Time and Labor (HXC) module, part of the ETRM (Enterprise Time and Resource Management) product family. Its business function is to manage the query criteria that define how a Timekeeper group query selects the set of workers that the query should return. In Time and Labor, a "TK group query" is a reusable definition used to retrieve a population of employees or assignments for time entry, approval, or reporting. Each criterion attached to that query represents a filtered attribute (for example, a supervisor relationship, an organization, or a specific assignment) that narrows the query's result set.

The package encapsulates the full lifecycle of those criteria records: creation, modification, deletion, validation, and retrieval. By exposing a controlled API layer rather than allowing direct DML against the underlying tables, it preserves data integrity, enforces uniqueness of criteria within a query, and centralizes business rules such as acceptable criteria types and identifiers. The package is classified as an API in the ETRM repository, and it is referenced by two other packages, indicating it acts as a shared building block for higher-level Time and Labor processing.

Key Procedures and Functions

  • CREATE_TK_GRP_QUERY_CRITERIA — Creates a new query criteria record for an existing TK group query. It validates the criteria type and criteria ID, then delegates persistence, including coordination with HXC_TK_GROUP_QUERY_API. It supports validation-only mode.
  • UPDATE_TK_GRP_QUERY_CRITERIA — Modifies an existing criteria record, including object version checks for optimistic locking.
  • DELETE_TK_GRP_QUERY_CRITERIA — Removes a criteria row, subject to delete-eligibility checks. This is the procedure associated with the search term delete_tk_grp_query_criteria.
  • CHK_CRITERIA_TYPE — Validates that the supplied criteria type is one of the supported values.
  • CHK_CRITERIA_ID — Validates that the criteria identifier is consistent with the criteria type.
  • CHK_TK_GROUP_QUERY_ID — Confirms the parent group query exists and is valid.
  • CHK_DELETE — Determines whether a criteria record may be deleted without violating referential or business constraints.
  • CHK_CRITERIA_UNIQUE — Ensures the same criterion is not attached to a query more than once.
  • GET_CRITERIA — Retrieves criteria information, typically for display or downstream processing.
  • GET_TC_PERIOD, CHECK_AUDIT_ENABLED, TC_PERIOD_OK — Support retrieval of timecard period data and audit enablement checks that influence criteria handling.

Tables Accessed

The package reads and writes HXC_TK_GROUP_QUERY_CRITERIA as its primary transactional table, and references HXC_TK_GROUP_QUERIES for the parent query. Criteria type validation draws on FND_LOOKUP_VALUES. HXC_PREF_HIERARCHIES and HXC_RECURRING_PERIODS support hierarchy and period-based criteria logic. FND_SESSIONS and DUAL are used for session context and scalar checks.

Usage Notes

This API is typically invoked from the Time and Labor administrative forms that configure TK group queries, from concurrent programs performing bulk maintenance, and from custom PL/SQL that must programmatically manage query criteria. Because it is a documented public API, customizations should call these procedures rather than performing direct INSERT, UPDATE, or DELETE operations on the underlying table, ensuring validation, uniqueness, and audit behavior remain consistent.