Search Results g_sqlerrm




Overview

The APPS.HXT_TIME_GEN package body is the core time-generation engine within the Oracle E-Business Suite Time and Labor (OTL) and Oracle Time and Labor / HRMS timecard architecture. Its principal business function is to automatically create and populate timecards and hours-worked records based on an employee's assignment, work plan, rotation plan, and payroll time period. Rather than requiring employees or clerks to enter every time line manually, the Time and Labor process invokes this generator to derive expected time entries from the defining rules of the enterprise.

In Oracle EBS 12.1.1 and 12.2.2, the package operates within the HXT schema objects and is invoked from the time-generation workflow that underpins payroll-ready timecard creation. It reads the assignment and scheduling configuration, resolves holiday and shift information, and writes summarized and detailed hours-worked rows into the HXT tables. The package is an OTHER-classified API owned by APPS and is referenced by three other packages, indicating it forms a shared generation layer rather than a standalone utility.

The ETRM source excerpt reveals additional internal helper logic beyond the nine documented program units, including procedures for error handling (call_gen_error), session management (manage_fnd_sessions), batch reference updates, time conversion, deletion of obsolete timecards, existence checks, and holiday retrieval. These support the high-level generation routines rather than being called directly by external consumers.

Key Procedures and Functions

  • GENERATE_TIME — The primary driver that orchestrates automatic time generation for a payroll and time period, coordinating assignment eligibility, work plan resolution, and record creation.
  • GEN_WORK_PLAN — Derives expected time entries from the employee's assigned work plan, translating scheduled hours into timecard lines.
  • GEN_ROT_PLAN — Generates time from rotation plans, applying the shift patterns associated with rotational schedules.
  • CREATE_BATCH — Establishes a batch container used to group generated timecard records for processing and reconciliation.
  • CREATE_TIMECARD — Creates the timecard header/record for an assignment based on generated time data.
  • CREATE_HRW — Creates hours-worked records that capture the actual time detail written to the HXT hours tables.
  • GET_HXT_SEQNO — Retrieves the next sequence number from the HXT sequence generator, ensuring unique identifiers for generated records.
  • GET_NEXT_BATCH_ID — Returns the next available batch identifier used to link generated records into a batch.
  • GET_WORK_DAY — Determines whether a given date is a valid working day for an assignment, factoring scheduling and calendar rules.

Tables Accessed

The package reads configuration and references and writes generated results to the following documented tables:

Usage Notes

HXT_TIME_GEN is typically invoked indirectly. Its routines are called by higher-level Time and Labor time-generation concurrent programs, by the timecard generation workflow, and by the three dependent packages. Direct invocation from custom code should be avoided in favor of the supported generation entry points. Administrators generally configure assignments, work plans, rotation plans, and holiday calendars; the package then consumes that configuration during the time-generation run. The documented use of g_sqlerrm-style global error text (through the internal call_gen_error helper) indicates that failures during generation are captured and surfaced to the caller and to the concurrent manager log.