Search Results sub_copy




Overview

OKS_SETUP_UTIL_PUB is a public PL/SQL package in the APPS schema that serves as ETRM's core service-contract setup and copy utility. Its primary business function is to support the creation, duplication, modification, and deletion of service contracts and their underlying subscription, billing, and revenue structures within Oracle Service Contracts (OKS). The package provides the reusable business logic that allows a contract — including its header attributes, lines, sales credits, revenue distributions, and subscription instances — to be reproduced accurately from a source contract or quote. It additionally manages setup-level data such as line numbering, governance and class operation defaults, annualized factors for billing, and the resolution of the responsible organization identifier. Because it is classified as a public (PUB) API, it is intended to be called by other ETRM packages, forms, and concurrent programs rather than being restricted to internal use. It depends on foundational ETRM and Oracle APIs including FND_API, OKC_API, OKS_BILL_SCH, OKS_EXTWAR_UTIL_PVT, and OKS_K_DEFAULTS, confirming its role as an orchestrating utility layer over the service contracts data model.

Key Procedures and Functions

The package exposes 24 documented procedures and functions, which fall into several logical groups:

These routines operate collectively to keep contract structures consistent during mass updates, renewals, and copying.

Tables Accessed

The package reads and writes through APPS synonyms across the ETRM and Trading Community schemas. Service contract data resides in OKC_K_HEADERS_ALL_B, OKC_K_HEADERS_B, OKC_K_HEADERS_ALL_BH, OKC_K_ITEMS, and OKC_K_LINES_B for headers, history, items, and lines; OKC_CONTACTS, OKC_GOVERNANCES, and OKC_CLASS_OPERATIONS hold contact, governance, and class-operation setup data. OKS_K_DEFAULTS provides service contracts defaults. Customer and party data is drawn from HZ_CUST_ACCOUNTS_ALL, HZ_CUST_ACCT_SITES_ALL, HZ_CUST_SITE_USES_ALL, HZ_CONTACT_POINTS, and HZ_PARTIES, supporting account and contact resolution during copy. CS_COUNTER_GROUPS is referenced for counter group configuration.

Usage Notes

OKS_SETUP_UTIL_PUB is referenced by six other packages — OKC_COPY_CONTRACT_PVT, OKS_BILL_UTIL_PUB, OKS_COPY_CONTRACT_PVT, OKS_COVERAGES_PUB, OKS_MASS_UPDATE_PVT, and OKS_RENEW_CONTRACT_PVT — indicating it is invoked during contract copy, billing utility processing, mass update, and renewal workflows. It is typically called from Service Contracts forms, concurrent programs such as mass update and renewal, and custom extensions that require programmatic contract duplication or deletion. As a PUB API, calls should honor standard ETRM error-handling conventions via FND_API.