Search Results okc_dev_report_t




Overview

OKC_PURGE_PVT is a private (PVT-classified) PL/SQL package body in the Oracle E-Business Suite Applications (APPS) schema that belongs to the Oracle Contracts (OKC) module family. Its business purpose is to serve as a centralized purge entry point for obsolete transactional data accumulated by the Oracle Contracts and Terms subsystems. Rather than embedding purge logic in each functional area, Oracle consolidated the deletion of aged contract-related records into a single dispatcher procedure that a concurrent program can invoke, selecting the type of data to purge through a lookup parameter.

The package carries the internal header identifier OKCVPURB.pls and is marked "noship," indicating it is a supporting implementation unit not intended for direct customer modification. It is most closely associated with the contractor terms and deviations feature set, and is the documented caller of OKC_TERMS_DEVIATIONS_PVT.purge_deviations_data — the routine a user reaches when searching for "purge_deviations_data."

Key Procedures and Functions

The package exposes one documented procedure, PURGE. It is a concurrent-program entry point: rather than containing the deletion logic itself, it inspects the p_purge_type parameter and delegates to the appropriate specialist purge routine. The parameter p_purge_type is a lookup_code drawn from the lookup type OKC_PURGE_TYPE, and p_num_days determines how far into the past the purge boundary is drawn (defaulting to 3 days). PURGE also returns an errbuf and retcode conforming to the standard concurrent-manager calling convention, and it emits diagnostic output through FND_LOG and FND_FILE.PUT_LINE.

The dispatch branches documented in the body are as follows:

  • OKC_QA_ERRORS_T — routes to OKC_TERMS_UTIL_PVT.purge_qa_results to remove aged QA/validation error records.
  • OKC_DEV_REPORT_T — routes to OKC_TERMS_DEVIATIONS_PVT.purge_deviations_data to remove aged contract deviation report data. This is the branch most directly relevant to the "purge_deviations_data" search term.
  • OKC_REP_RECENT_T — routes to OKC_REP_UTIL_PVT.purge_recent_contracts to remove aged "recent contracts" reporting rows.

The procedure commits at the end of dispatch and traps the Oracle resource-busy exception (ORA-00054) via the named exception E_Resource_Busy, allowing a controlled exit when a lock cannot be obtained.

Tables Accessed

The ETRM metadata records no direct table references through APPS synonyms for OKC_PURGE_PVT, and this is consistent with its design: it is a pure dispatcher that performs no DML of its own. All underlying table access occurs inside the delegated packages (OKC_TERMS_DEVIATIONS_PVT, OKC_TERMS_UTIL_PVT, and OKC_REP_UTIL_PVT), which own the actual delete statements against the deviations, QA results, and recent-contracts tables respectively. Consequently, any DBA assessing purge impact must inspect those callee packages rather than OKC_PURGE_PVT.

Usage Notes

OKC_PURGE_PVT.PURGE is designed to be invoked from an Oracle EBS concurrent program, which supplies errbuf, retcode, and the two IN parameters. The p_purge_type value must be a valid lookup_code under OKC_PURGE_TYPE; passing an unrecognized value results in no branch executing and an immediate commit, so parameter validation at the concurrent-program level is essential. The metadata records zero other packages referencing OKC_PURGE_PVT, confirming it sits at the top of the call chain for these purge operations rather than being reused as a utility by other code. Administrators should schedule the concurrent program during low-activity windows, because the callee routines issue bulk deletes and the package commits unconditionally at the end of dispatch. Because the source header is version 120.0 (May 2005) and marked noship, behavior is stable across EBS 12.1.1 and 12.2.2 releases.