Search Results check_pm_schedule
Overview
OKS_PM_PROGRAMS_PVT is a private PL/SQL package in the Oracle EBS Service Contracts (OKS) module, classified as a PVT API. It encapsulates the core business logic for Preventive Maintenance program scheduling, including the generation, renewal, adjustment, and refresh of PM program schedules. The package is owned by APPS and is referenced by twelve other packages, indicating its role as a foundational utility within the OKS Preventive Maintenance subsystem rather than a standalone public API.
The package header carries a build header dated July 2005, and defines global constants such as G_PKG_NAME, G_APP_NAME, G_UNEXPECTED_ERROR, and G_REQUIRED_VALUE (sourced from OKC_API), plus a debug flag driven by the AFLOG_ENABLED profile option. It also declares several PL/SQL collection types, most notably pmsch_refresh_rec_type and pmsch_refresh_tbl_type, which carry sequence numbers, rule identifiers, schedule dates, activity and stream line identifiers, and program identifiers used during schedule refresh processing. These structures support the central job of synchronising PM schedule rows against their driving rules and activities.
Key Procedures and Functions
The package exposes twenty documented procedures and functions, which fall into several functional groups:
- REFRESH_PM_PROGRAM_SCHEDULE — the entry point most relevant to the searched term; it recalculates and repopulates PM program schedule rows, using the pmsch_refresh collection type to stage schedule dates and identifiers before applying updates.
- GENERATE_SCHEDULE, POPULATE_SCHEDULE — create and populate schedule records for a PM program based on the applicable scheduling rules.
- RENEW_PM_PROGRAM_SCHEDULE, ADJUST_PM_PROGRAM_SCHEDULE — extend or modify existing schedules in response to contract renewals or manual adjustments.
- CHECK_PM_MATCH, CHECK_PM_SCHEDULE, CHECK_PM_PROGRAM_EFFECTIVITY, CHECK_PM_REQUIRED_VALUES, CHECK_PM_NEW_ACTIVITIES — validation routines that verify rule matches, schedule integrity, program effectivity, mandatory values, and newly added activities.
- MIGRATE_TO_PROGRAM, MIGRATE_TO_ACTIVITIES — move PM data between program-level and activity-level representations.
- VERSION_PM, RESTORE_PM, UNDO_PM_LINE, DELETE_PMHISTORY, DELETE_PMSAVED_VERSION — versioning and history management operations, working against the corresponding _H history tables.
- INIT_OKS_K_LINE, COPY_PM_TEMPLATE, UPDATE_PMP_RULE_ID — support operations for line initialisation, template copying, and rule identifier maintenance.
Tables Accessed
The package reads and writes a documented set of tables through APPS synonyms. The principal PM tables are OKS_PM_ACTIVITIES, OKS_PM_SCHEDULES, OKS_PM_STREAM_LEVELS, and their history counterparts OKS_PM_ACTIVITIES_H, OKS_PM_SCHEDULES_H, and OKS_PM_STREAM_LEVELS_H. Contract-side structures include OKC_RULES_B, OKC_K_LINES_B, OKC_CLASS_OPERATIONS, OKC_OPERATION_INSTANCES, OKC_OPERATION_LINES, and OKC_SUBCLASSES_B. Association to installed base equipment occurs through AHL_MR_HEADERS_B, and OKS_K_LINES_B holds the Service Contracts line data. PLITBLM is referenced for PL/SQL table operations. This combination reflects the package's dual role: deriving schedules from contract rules and service activities, then persisting them and their history.
Usage Notes
As a PVT package, OKS_PM_PROGRAMS_PVT is not intended for direct invocation by external or custom code. It is normally called from within the OKS public APIs and from the Service Contracts forms and concurrent programs that manage Preventive Maintenance programs, as evidenced by the twelve dependent packages. The REFRESH_PM_PROGRAM_SCHEDULE routine in particular is the mechanism by which schedule changes propagate after rule or activity modifications. Developers troubleshooting schedule inconsistencies should treat this package as internal plumbing and, where a supported hook is required, use the corresponding public OKS API rather than calling these procedures directly.