Search Results gen_calendar_sch




Overview

PA_CALENDAR_UTILS is an Oracle EBS Projects (PA) schema utility package that centralizes calendar retrieval and schedule generation logic for Oracle Project Resource Management and project scheduling. The package is owned by APPS and classified in the ETRM repository as an OTHER API, indicating it is an internal utility rather than a formally supported public interface. Its principal function is to translate the persistent definitions of a project calendar — its shifts, shift constructs, and exceptions — into in-memory PL/SQL collections that calling programs can consume for date arithmetic, resource availability analysis, and schedule derivation. The package operates with AUTHID CURRENT_USER, so it executes under the privilege context of the invoker.

The version header identifies the source file as PARGCALS.pls at version 120.1, with a last modification date of 2005/08/19. Several procedures carry NOCOPY hints introduced under bug#2674619 to reduce overhead when returning large PL/SQL tables, and File.Sql.39 standardization tags (bug 4440895) on the return status and message parameters.

Key Procedures and Functions

  • GET_CALENDAR_SHIFTS — Retrieves the shifts assigned to a specified calendar and returns them in bulk as a table of calendar detail records of type PA_SCHEDULE_GLOB.CalendarTabTyp. It is designed for array (bulk) processing rather than row-by-row access.
  • GET_CALENDAR_EXCEPT — Retrieves the exceptions defined against a specified calendar, returning a table of exception detail records typed as PA_SCHEDULE_GLOB.CalExceptionTabTyp.
  • GEN_CALENDAR_SCH — Generates a calendar schedule from supplied shift details held in a CalendarTabTyp collection, returning a ScheduleTabTyp collection. This is the procedure matched by the search term gen_calendar_sch and is the core schedule expansion routine of the package.
  • APPLY_CALENDAR_EXCEPT — Applies calendar exception definitions to an existing schedule, adjusting the generated schedule where exception dates or periods override normal working shifts.
  • CHECK_CALENDAR_NAME_OR_ID — Validates a calendar name or identifier, typically used to confirm the existence and uniqueness of a calendar before it is referenced or created.

The three retrieval and generation procedures share a common error-handling signature: an OUT return status, message count, and message data, allowing callers to inspect success or failure through the standard EBS message stack.

Tables Accessed

The package reads from the JTF calendar foundation tables through APPS synonyms. JTF_CALENDARS_B and JTF_CAL_EXCEPTIONS_B hold the base calendar and exception definitions; JTF_CAL_EXCEPTION_ASSIGN links exceptions to calendars; JTF_CAL_SHIFT_ASSIGN associates shifts with a calendar; and JTF_CAL_SHIFT_CONSTRUCTS stores the shift construction detail used when expanding shifts into schedule entries. PLITBLM is referenced as an index-by table of VARCHAR2 used in the bulk-processing infrastructure. The package reads this calendar metadata and materializes it into the PL/SQL record collections defined in PA_SCHEDULE_GLOB.

Usage Notes

PA_CALENDAR_UTILS is referenced by five other packages in the EBS schema, confirming its role as a shared internal service consumed by scheduling and resource management code rather than being called directly from forms. The expected invocation pattern is a two- or three-step sequence: callers first obtain shift and exception details via GET_CALENDAR_SHIFTS and GET_CALENDAR_EXCEPT, then pass the shift collection to GEN_CALENDAR_SCH, and optionally apply exception handling to reconcile the generated schedule. Because the API is classified as OTHER and carries no public support commitment, customizations should invoke it defensively, always checking x_return_status and remaining aware that the signature and semantics may change across patches and point releases in 12.1.1 and 12.2.2.