Search Results renew_pm_program_schedule




Overview

OKS_PM_PROGRAMS_PVT is a private (PVT) PL/SQL package in the Oracle E-Business Suite Service Contracts (OKS) module, part of the Enterprise Technical Reference Manual (ETRM) for release 12.1.1 and 12.2.2. The package encapsulates the business logic governing Preventive Maintenance (PM) programs: the recurring service schedules, activities, and rules that drive contractually obligated maintenance visits. It is not a public API; rather it functions as the internal engine behind the public OKS_PMS_PVT access layer and the Service Contracts forms, handling schedule generation, renewal, adjustment, migration between program types, versioning, and history maintenance.

The package header declares a set of global constants and exception identifiers — G_PKG_NAME, G_APP_NAME derived from OKC_API, G_UNEXPECTED_ERROR, G_EXCEPTION_HALT_VALIDATION, G_SQLERRM_TOKEN, and G_SQLCODE_TOKEN — that standardize error handling and message token substitution across all procedures. It also defines several PL/SQL collection types, including pms_rec_type and pms_tbl_type (carrying SCHEDULE_DATE), act_rec_type and act_tbl_type (carrying ACTIVITY_ID), and the composite pmsch_refresh_rec_type / pmsch_refresh_tbl_type, which aggregate sequence numbers, rule identifiers (RULE_ID, PMP_RULE_ID, PMA_RULE_ID), object version numbers, schedule date ranges, and line and program identifiers. These structures support bulk processing of schedule rows, which is essential when a single program revision spans hundreds of future service dates.

Key Procedures and Functions

The 20 documented procedures divide into functional clusters.

Internally the package reuses oks_pm_schedules_rec_type from OKS_PMS_PVT, reinforcing its role as a helper rather than a standalone API.

Tables Accessed

The package reads and writes through APPS synonyms. OKS_PM_SCHEDULES and its history table OKS_PM_SCHEDULES_H hold generated service dates; OKS_PM_ACTIVITIES and OKS_PM_ACTIVITIES_H hold activity definitions; OKS_PM_STREAM_LEVELS and OKS_PM_STREAM_LEVELS_H define stream hierarchies. Contract structures are reached via OKC_RULES_B, OKC_K_LINES_B, OKC_CLASS_OPERATIONS, OKC_OPERATION_LINES, OKC_OPERATION_INSTANCES, and OKC_SUBCLASSES_B. OKS_K_LINES_B links PM data to service contract lines, AHL_MR_HEADERS_B ties schedules to maintenance requirements, and PLITBLM supports bulk operations.

Usage Notes

As a PVT package, OKS_PM_PROGRAMS_PVT is not intended for direct customer invocation. It is called by the Service Contracts authoring forms when a user creates or renews a PM program, by concurrent programs that generate or refresh future schedules, and by the 12 other packages that reference it, notably OKS_PMS_PVT. Customizations requiring schedule renewal or adjustment should call the supported public APIs, which delegate to RENEW_PM_PROGRAM_SCHEDULE and its siblings, preserving validation and versioning integrity.