Search Results get_annualized_factor
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:
- Copy and subscription logic — OKSCOPY, SUB_COPY, COPY_SUBSCR_INST, COPY_HDR_ATTR, COPY_LINES_ATTR, COPY_REVENUE_DISTB, COPY_HDR_SALES_CREDITS, and COPY_LINE_SALES_CREDITS duplicate contract headers, line attributes, subscription instances, revenue distributions, and sales credit records from a source to a target contract.
- Quote-to-order integration — GET_QTO_DETAILS and CREATE_QTO_RULE retrieve quote-to-order details and establish the rule governing that relationship for service contract generation.
- Deletion operations — DELETE_CONTRACT, DELETE_CONTRACT_LINE, DELETE_TRANSFER_CONTRACT, and DELETE_TOP_SUB_LINE remove contracts, individual lines, transferred contracts, and top-level subscription lines while respecting referential dependencies.
- Billing and revenue maintenance — UPDATE_HDR_AMOUNT, UPDATE_LINE_NUMBERS, GET_ANNUALIZED_FACTOR, and UPDATE_ANNUALIZED_FACTOR_BMGR adjust contract header amounts, resequence line numbers, and compute or update annualized billing factors.
- Organization and hierarchy resolution — RESP_ORG_ID resolves the responsible organization identifier, while GET_STRLVLS returns structure levels used in coverage and governance setup.
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.