Search Results oks_pm_programs_pvt




Overview

OKS_PML_PVT is a private PL/SQL package in the APPS schema that supports Oracle E-Business Suite's Service Contracts (OKS) module, specifically the Preventive Maintenance (PM) feature set. Its name derives from "PM Stream Levels Private," and it encapsulates the business logic governing the stream levels assigned to preventive maintenance programs. In EBS, a PM program defines a recurring service schedule applied to a contract line; stream levels represent the successive tiers or occurrences within that schedule (for example, first visit, second visit, and so on). OKS_PML_PVT provides the low-level create, read, update, delete, and versioning operations against the underlying stream-level entities, shielded behind the standard EBS private API (PVT) pattern. It builds on the shared utilities FND_API and OKC_API, ensuring concurrency control, row locking, and consistent error handling across the application. The package is classified as PVT, indicating it is not intended for direct customer invocation but rather is called by public APIs and concurrent processes within the Service Contracts architecture.

Key Procedures and Functions

The package exposes twenty documented procedures and functions, several of which follow Oracle's standard table-handler conventions:

  • QC — A quality-control or consistency-check routine used internally to validate stream-level data before or after persistence.
  • CHANGE_VERSION — Alters the version context for an entity, supporting the multi-version data model used by Service Contracts.
  • API_COPY — Copies stream-level records from a source entity to a target, typically when duplicating a PM program or contract.
  • INSERT_ROW — Creates a new stream-level record.
  • LOCK_ROW — Acquires a row-level lock to serialize concurrent updates.
  • UPDATE_ROW — Modifies an existing stream-level record.
  • DELETE_ROW — Removes a stream-level record.
  • VALIDATE_ROW — Applies business validation rules to stream-level data prior to commit.
  • CREATE_VERSION — Establishes a new version of the stream-level entity, preserving history.
  • RESTORE_VERSION — Reinstates a prior version, supporting rollback or version comparison scenarios.

Each procedure is designed to be called within the broader transaction managed by the Service Contracts public APIs, and collectively they implement the persistence and lifecycle management of PM stream levels.

Tables Accessed

Through APPS synonyms, OKS_PML_PVT operates on the following documented tables:

  • OKS_PM_STREAM_LEVELS — The primary entity table storing current stream-level definitions for PM programs. It is the principal target of the insert, update, and delete operations.
  • OKS_PM_STREAM_LEVELS_H — The historical or versioning shadow table, populated during CREATE_VERSION and RESTORE_VERSION to maintain an auditable record of prior states.
  • PLITBLM — A generic PL/SQL index-by table used as an in-memory buffer, typically for passing collections of IDs or rows between the API layers.

The package additionally depends on the OKS_PM_STREAM_LEVELS_V view and the OKC_API and FND_API shared packages, which supply validation, messaging, and error-handling services.

Usage Notes

OKS_PML_PVT is a private package and is not intended for direct invocation from forms, concurrent programs, or customer-written code. It is referenced by other packages in the OKS module, notably OKS_PM_PROGRAMS_PVT and OKS_COVERAGES_PVT, which act as the public-facing APIs that end users and integrators interact with. The typical call path begins at a Service Contracts form or a service-related concurrent program, proceeds through a public API (such as OKS_PM_PROGRAMS_PVT), and then invokes the appropriate OKS_PML_PVT procedures to persist or version stream-level data. Because the package relies on FND_API for error handling and OKC_API for contract-level context, callers must already be operating within a Service Contracts transaction. Direct custom calls to OKS_PML_PVT are discouraged because Oracle may change private interfaces without notice; integrators should always use the supported public APIs. Note that user references to "oks_pm_programs_pvt" most likely indicate OKS_PM_PROGRAMS_PVT, the public package that consumes this private one.