Search Results load_recurring_period_row




Overview

The APPS.HXC_REC_PERIODS_UPLOAD_PKG package body is a seed-data and data-loading utility within the Oracle E-Business Suite Time and Labor (formerly OTL) schema. It belongs to the HXC application module, which manages recurring periods — the named time intervals (weekly, bi-weekly, semi-monthly, monthly, and similar) against which recurring timecard and schedule rules are evaluated. The package exists to move recurring period definitions from an external or seed data source into the HXC_RECURRING_PERIODS table, enforcing the distinction between Oracle-supplied (SEED) records and customer-defined (CUSTOM) records. Because recurring period definitions are date-sensitive reference data, the package provides a controlled, API-driven upsert path rather than permitting direct DML against the base table.

Key Procedures and Functions

  • LOAD_RECURRING_PERIOD_ROW — The single documented procedure in the package body. It accepts a recurring period name along with its attributes, including the period type (p_period_type), the duration in days, the start and end dates supplied as character strings, and owner and custom-mode control arguments. Its logic is an upsert pattern: it first attempts to select an existing row from HXC_RECURRING_PERIODS by name, retrieving the surrogate key, object version number, and a derived owner flag that classifies the row as SEED or CUSTOM based on the last updating user. If the row exists and the caller is either a SEED owner or has requested FORCE mode, the procedure delegates an update to HXC_RECURRING_PERIODS_API.UPDATE_RECURRING_PERIODS. When the initial name lookup raises NO_DATA_FOUND, the exception handler invokes HXC_RECURRING_PERIODS_API.CREATE_RECURRING_PERIODS to insert the new definition. In both paths, p_period_type is passed through to the corresponding API, which is where the period type is validated and persisted. The procedure converts the incoming start and end date strings using the DD-MM-YYYY format mask and supplies the current system date as the effective date. A commented block within the source records that the obsolete row handler HXC_HRP_UPD.UPD was replaced by the table API.

Tables Accessed

  • HXC_RECURRING_PERIODS — The base table for recurring period definitions. The package reads this table to determine whether a definition with the supplied name already exists, and to obtain the primary key (RECURRING_PERIOD_ID), the OBJECT_VERSION_NUMBER required for optimistic concurrency control, and the ownership classification derived from LAST_UPDATED_BY. All insert and update operations are performed indirectly through HXC_RECURRING_PERIODS_API, which writes to the same table.

Usage Notes

The package is typically invoked during seed data installation, rapid implementation, or data conversion exercises rather than from end-user forms. Because the procedure accepts dates as strings and silently falls back to creation when a lookup fails, it is suited to loading delimited files of recurring period definitions where the same load script may be re-run against an existing environment. The p_custom_mode and p_owner arguments provide the protection boundary for Oracle-owned data: FORCE mode permits overwriting an existing definition, while a SEED owner permits the update unconditionally. Any custom code calling this package must pass a valid period type in p_period_type, since that value is forwarded directly to the underlying API for validation. The package is not referenced by other documented packages, so its callers are limited to upload harnesses, SQL*Plus scripts, or concurrent program wrappers with no declared dependency footprint.