Search Results hours_worked




Overview

APPS.HXC_APP_PERIOD_TOTAL_TIME_V is a Time and Labor Engine (HXC) reporting view that aggregates time entries into a single, summarized figure for each combination of timecard, day, and application period. Its documented purpose is to total time entries for eligible approvals and it is consumed by Time Entry Rules within the Oracle E-Business Suite 12.1.1 and 12.2.2 codebase. The view is owned by the APPS schema and carries a VALID status in the ETRM repository.

In practice, the view is the endorsed access path for retrieving the well-known HOURS_WORKED measure without having to rebuild the underlying hierarchy of time building blocks or reproduce the date-effective logic required to identify current records. Time and Labor stores timecard data as a nested set of time building blocks: a timecard header, one or more day-level blocks, and detail-level blocks beneath each day. Rather than exposing those rows individually, this view collapses them to one row per day/detail combination and presents the summed hours together with approval and period context. This makes it a natural integration point for reporting, approval processing, and downstream payroll or project costing extracts.

Underlying Base Objects

The view is defined over four documented objects: HXC_TIME_BUILDING_BLOCKS (synonym), HXC_AP_DETAIL_LINKS (synonym), HXC_TIME_CATEGORY_UTILS_PKG (package), and HR_GENERAL (package).

HXC_TIME_BUILDING_BLOCKS is referenced three times under the aliases HTB (timecard scope), HTB_DAY (day scope), and HTB_DETAIL (detail scope), joined through the PARENT_BUILDING_BLOCK_ID relationship. Each alias is filtered by its SCOPE value (TIMECARD, DAY, DETAIL), by TYPE='RANGE', and by DATE_TO=HR_GENERAL.END_OF_TIME, which restricts the result set to the currently effective version of each record. HXC_AP_DETAIL_LINKS, aliased AP, joins the detail block to its application period via TIME_BUILDING_BLOCK_ID and TIME_BUILDING_BLOCK_OVN. HXC_TIME_CATEGORY_UTILS_PKG supplies the CATEGORY_DETAIL_HRS function that calculates hours for a detail block, and HR_GENERAL contributes both the END_OF_TIME constant and the DECODE_LOOKUP function used to translate approval status codes.

Key Columns

  • TIME_ID — Identifier of the timecard-level time building block.
  • RESOURCE_ID — The person resource to whom the timecard belongs.
  • DAY_ID — Identifier of the day-level time building block.
  • DETAIL_ID — Identifier of the detail-level time building block.
  • STATUS_CODE — Raw approval status code from the timecard header.
  • STATUS_NAME — Decoded approval status (truncated to 80 characters) derived from the HXC_APPROVAL_STATUS lookup.
  • START_DATE and STOP_DATE — Date-only representations of the day block's start and stop times.
  • HOURS_WORKED — Sum of CATEGORY_DETAIL_HRS across the detail blocks, with nulls coerced to zero.
  • APPLICATION_PERIOD_ID — The application period associated with the detail block through HXC_AP_DETAIL_LINKS.

Common Use Cases and Queries

A primary use is determining total approved hours per person per period. The following query returns all approved hours for a resource:

  • SELECT resource_id, start_date, status_name, SUM(hours_worked) FROM hxc_app_period_total_time_v WHERE status_code = 'APPROVED' GROUP BY resource_id, start_date, status_name;

Because the view already resolves the current, date-effective blocks and joins the application period, it is also used to reconcile balances feeding payroll or project costing. A representative period-based extract is:

  • SELECT application_period_id, resource_id, SUM(hours_worked) FROM hxc_app_period_total_time_v WHERE application_period_id = :period_id GROUP BY application_period_id, resource_id;

Time Entry Rules reference this view when evaluating eligibility for approval, so administrators troubleshooting approval routing frequently query it to confirm the hours the rule engine will see for a given timecard or period.