Search Results calp_clc_dt_from_da
Overview
IGS_CA_GEN_002 is a PL/SQL package owned by the APPS schema in Oracle E-Business Suite, classified under the ETRM as an "OTHER" API object. It belongs to the Oracle Student System / Higher Education calendar and scheduling subsystem, as indicated by the IGS_CA_ prefix, which denotes Calendar (CA) entities. The package provides utility functions that compute and validate dates derived from calendar type definitions, date alias mappings, and date instance offsets. These are core building blocks used throughout the calendaring engine to translate abstract date references — such as a "date alias" in a named calendar — into concrete DATE values that downstream scheduling, enrollment, and fee calculation logic can consume. The $Header comment in the source (IGSCA02S.pls 115.4 2002/11/20) indicates the package is a long-standing component carried forward from earlier 11i releases into the 12.1.1 and 12.2.2 code lines. It is declared with AUTHID CURRENT_USER, meaning that runtime privileges are resolved against the invoking schema rather than the definer, and several functions carry PRAGMA RESTRICT_REFERENCES declarations that enforce read consistency for use in SQL contexts.
Key Procedures and Functions
The package exposes seven documented functions, all returning either a DATE, an INTEGER, or a BOOLEAN, and most accepting an OUT NOCOPY VARCHAR2 message parameter that reports error or diagnostic text to the caller.
- CALP_CLC_DAIO_CNSTRT — Computes a date from a date alias combined with date instance and offset constraint inputs. Carries
WNDS, WNPSpurity assertions, permitting its use in SQL. - CALP_CLC_DAO_CNSTRT — Derives a date from a date alias and alias value with offset constraints applied. Declared
WNDS. - CALP_CLC_DT_FROM_DA — The function most closely associated with the user's search term. It resolves a concrete date from a calendar type, calendar instance sequence number, and date alias. Declared
WNDS. This is the primary date-from-alias conversion routine. - CALP_CLC_DT_FROM_DAI — Extends the prior function by also accepting a date alias instance sequence number, resolving the specific occurrence of an alias. Declared
WNDS, WNPS. - CALP_CLC_WK_OF_MONTH — Returns the integer week number within a month for a supplied date, useful for scheduling rules keyed to monthly recurrence patterns.
- CALS_CLC_DT_FROM_DAI — A variant of the date-from-alias-instance computation, differing in purity declarations and likely intended for a distinct call context or access path.
- CALP_VAL_CI_CAT — Validates calendar category information for a given calendar type, returning a boolean status.
Tables Accessed
The package reads from calendar definition and date alias instance tables accessed through APPS synonyms. The IGS_CA_TYPE and IGS_CA_STAT tables hold calendar type definitions and calendar status records respectively. The IGS_CA_DA_INST family — including IGS_CA_DA_INST_OFCNT, IGS_CA_DA_INST_OFST, and IGS_CA_DA_INST_PAIR — stores date alias instances along with their offset counts, offset definitions, and paired alias relationships. The related IGS_CA_DA_OFFCNT and IGS_CA_DA_OFST tables provide the offset and offset-count definitions that the constraint functions apply. Together these supply the alias-to-date resolution logic central to the package.
Usage Notes
IGS_CA_GEN_002 is referenced by 33 other packages, confirming its role as a shared low-level utility within the calendaring subsystem. It is typically invoked indirectly through higher-level calendar APIs and Oracle Student System forms rather than called directly by end users. Because several functions carry PRAGMA RESTRICT_REFERENCES with WNDS, they are safe to embed in SQL statements, allowing date-from-alias resolution to occur inside queries, views, and concurrent program logic. Custom extensions and integrations that manipulate academic calendars, term dates, or scheduling rules should call these functions rather than replicating alias resolution logic, ensuring consistency with the standard calendaring engine across both 12.1.1 and 12.2.2 environments.