Search Results create_program




Overview

The APPS.OKL_VENDOR_PROGRAM_PUB package body is a public API wrapper within the Oracle E-Business Suite leasing and financial services module (OKL — Oracle Lease Management, part of the ETRM/OKS family). It exposes a controlled public interface for creating and maintaining vendor programs, which are the structured agreements under which a lessor or financing entity establishes terms with equipment vendors, dealers, or manufacturers. The package follows the standard EBS PL/SQL API architecture: a thin PUB layer delegates processing to a private _PVT package (OKL_VENDOR_PROGRAM_PVT), manages the FND message stack, and translates internal return-status codes into standard API exceptions.

The source header identifies the file as OKLPPRMB.pls (version 120.2, dated 2005/10/29), indicating a stable, long-lived component carried forward from earlier releases into Oracle EBS 12.1.1 and 12.2.2. As an APPS-owned, API-classified public package, it is a supported integration point and is referenced by six other packages, confirming its role as a shared service rather than a private implementation detail.

Key Procedures and Functions

  • CREATE_PROGRAM — The primary entry point for establishing a new vendor program record. It accepts a program header record, an optional parent agreement number (supporting hierarchical or child program relationships), and returns both the generic header record and the detailed K-header record. The procedure assigns the API name create_program for error-tracking purposes, copies the incoming header into a local variable, and invokes OKL_VENDOR_PROGRAM_PVT.create_program. Return status is evaluated against FND_API.G_RET_STS_ERROR and G_RET_STS_UNEXP_ERROR, raising the corresponding G_EXC_ERROR or G_EXC_UNEXPECTED_ERROR exceptions. When caught, the handler reassigns x_return_status and populates the message stack via FND_MSG_PUB.Count_and_get, so callers receive both the status code and any associated messages.
  • UPDATE_PROGRAM — The counterpart to CREATE_PROGRAM, providing the supported mechanism for modifying an existing vendor program header. It follows the same wrapper conventions, delegating validation and persistence to the private package.
  • IS_PROCESS_ACTIVE — A query-style function used to determine whether a workflow or process instance associated with a vendor program is still running. This guards against conflicting updates while a program is mid-approval or mid-process.

Tables Accessed

  • OKC_K_PROCESSES — Holds process instances linked to contract/program headers; queried by IS_PROCESS_ACTIVE to detect in-flight activity.
  • OKC_PROCESS_DEFS_B — The base table of process definitions, providing the metadata that qualifies each process instance.
  • WF_ITEMS — The Oracle Workflow items table, used to confirm whether the underlying workflow item remains active or has completed.

Access is performed through APPS synonyms, as is standard in EBS. Because these tables belong to the OKC (Contracts Core) schema, this package demonstrates the tight coupling between OKL vendor programs and the OKC contract/process framework.

Usage Notes

Because OKL_VENDOR_PROGRAM_PUB is classified as a public API, it should be invoked whenever vendor programs must be created or amended programmatically — for example, from Oracle Forms based on the vendor program entity, from concurrent programs performing bulk program loads, or from custom PL/SQL integration code. Callers must supply a valid p_api_version, initialize the message list via p_init_msg_list, and check x_return_status and the message stack on return. Client code should never insert into or update the underlying OKL/OKC tables directly; doing so bypasses validation, workflow initiation, and process-tracking logic enforced by the private package. Because the wrapper can raise FND_API.G_EXC_ERROR and G_EXC_UNEXPECTED_ERROR, calling routines should include appropriate exception handlers. Given that six other packages already depend on it, the interface is effectively frozen, and any modification should be treated as a versioned change to the public API surface.