Search Results generate_time




Overview

The APPS.HXT_TIMECARD_INFO package body is a server-side PL/SQL component within the Oracle E-Business Suite Time and Labor (OTL/ETRM) module. It supplies the core data-retrieval and time-conversion logic required to translate raw timecard entries into the canonical date/time and labor-costing structures that Oracle Time and Labor expects. The package resolves an employee's active primary assignment and its associated rotation plan and earning policy, then uses that context to derive work plans, rotation plans, and work days. It is classified as an OTHER API in the ETRM 12.2.2 documentation set and is a dependent object referenced by one other package, which indicates it is intended for internal consumption by the Time and Labor framework rather than direct end-user invocation.

Key Procedures and Functions

Although the source excerpt only exposes GENERATE_TIME, the documented package metadata confirms four public procedures/functions:

  • GENERATE_TIME — The principal entry point. It accepts a resource (person) identifier and a start/stop time range and returns self-service application attributes. Internally it drives the assignment cursor g_asg_cur to identify the active primary assignment, rotation plan, earning policy, and holiday calendar ID for the specified resource.
  • GEN_WORK_PLAN — Derives the work plan applicable to a resource over a given period, drawing on the weekly work schedule and shift definitions.
  • GEN_ROT_PLAN — Generates the rotation plan for a resource, based on the rotation schedule and rotation plan referenced in the assignment's time attributes.
  • GET_WORK_DAY — Returns the effective work day information for a resource and date, reconciling shift data, weekly work schedules, and holiday calendars.

Supporting internal declarations visible in the body include get_holiday_info, convert_time, and convert_timecard_time, which normalize inbound numeric times into DATE values.

Tables Accessed

The package reads from the following tables (via APPS synonyms) to assemble assignment and time attribute context:

The assignment cursor additionally joins HXT_PER_AEI_DDF_V (an AEI descriptive flexfield view) and PER_ASSIGNMENTS_F, though these are referenced through the view and base table rather than listed as direct synonyms.

Usage Notes

HXT_TIMECARD_INFO is not a self-service API; it is invoked programmatically by the Time and Labor timecard processing and self-service flows. Its most likely callers are the OTL self-service timecard pages, the time collection/retrieval concurrent programs, and downstream payroll or costing routines that require normalized work plan, rotation plan, and work day data. Because GENERATE_TIME only recognizes active primary assignments (per Bug 2397763), resources without a currently effective primary assignment will return no data. Customizations should not call this package directly unless adhering to the documented signatures; parameter details must be obtained from the application's dictionary rather than inferred. Debug output is controlled through HR_UTILITY.DEBUG_ENABLED, so enabling HR utility debugging will surface diagnostic messages during execution. All iteration over resource time data should be validated against the effective dating of both the assignment and its associated AEI attributes, as the cursor enforces date-range overlap checks on both.