Search Results billing_main
Overview
OKS_BILLING_PUB is a public PL/SQL package in the APPS schema that supports the billing and contract-closeout functionality of Oracle Service Contracts (formerly Oracle Contracts Service, OKS). In Oracle EBS 12.1.1 and 12.2.2 it acts as the application programming interface through which the service contract billing engine generates, calculates, and adjusts billing schedules for service agreements. The package operates against contract headers, lines, items, and party roles stored in the OKC service contracts tables, and it drives the billing records written to OKS_BILL_CONT_LINES and related billing schedule structures. Because it is classified as a PUB (public) package, it is intended for supported invocation by Oracle EBS forms, concurrent programs, and, where sanctioned, external integration code, rather than being reserved for internal use.
Key Procedures and Functions
The package exposes three documented entry points:
- BILLING_MAIN — The principal driver procedure. It coordinates the billing run for a service contract, orchestrating the reading of contract and line data and the writing of resulting billing schedule lines. It functions as the top-level call within the package's billing flow.
- CALCULATE_BILL — The computation procedure responsible for calculating billing amounts and schedule values for contract lines. It performs the numeric and date logic that determines what is billed and when, drawing on pricing information supplied through the QP pricing dependencies.
- PROCESS_SUPPRESS_CREDITS — The procedure that handles credit suppression processing, controlling when credit lines are withheld or suppressed from billing output as part of contract closeout or adjustment scenarios.
Only these three procedures are documented in the ETRM metadata; parameter lists are not published and should be confirmed against the actual package specification in the target instance.
Tables Accessed
The package references numerous APPS synonyms across the OKC and OKS schemas, grouped as follows:
- Contract structure: OKC_K_HEADERS_ALL_B, OKC_K_HEADERS_B, OKC_K_ITEMS, OKC_K_LINES_B, OKC_K_GRPINGS, OKC_K_REL_OBJS, OKC_ASSENTS, OKC_STATUSES_B, and OKC_K_PARTY_ROLES_B provide the contracts, items, line groupings, related objects, statuses, and party roles that define a service agreement.
- Billing output: OKS_BILL_CONT_LINES and OKS_BCL_PR hold the billing contact lines and billing result records produced by the billing run.
- Inventory and pricing support: MTL_SYSTEM_ITEMS_B and MTL_UNITS_OF_MEASURE_TL supply item and unit-of-measure definitions; CS_COUNTER_VALUES supports counter-based coverage, and MO_GLOB_ORG_ACCESS_TMP supports organization access filtering.
Dependencies include OKC_API, OKS_BILL_REC_PUB, OKS_QP_PKG, and QP_PREQ_GRP, indicating that OKS_BILLING_PUB delegates contract and pricing work to these companion APIs. The package is referenced by 0 other packages, making it a leaf-level caller in the dependency chain.
Usage Notes
OKS_BILLING_PUB is typically invoked through the Oracle Service Contracts billing forms and concurrent programs that perform billing runs, though its PUB classification permits direct calls from custom PL/SQL when standard flows must be extended or automated. Because the package writes billing schedule lines and depends on contract status, item, and pricing data, callers should ensure contract records are properly validated during the relevant Service Contracts API sequences before invoking BILLING_MAIN. Set the standard APPS environment (FND_GLOBAL initialization) before calling these procedures so that organization access and audit columns resolve correctly, and avoid reference to undocumented internal procedures, since the supported surface is limited to the three documented entry points.
-
PACKAGE: APPS.OKS_BILLING_PUB
12.2.2
-
PACKAGE: APPS.OKS_BILLING_PUB
12.1.1
-
APPS.OKS_BILLING_PUB dependencies on UTL_FILE
12.1.1
-
APPS.OKS_BILLING_PUB dependencies on UTL_FILE
12.2.2
-
PACKAGE BODY: APPS.OKS_BILLING_PUB
12.1.1
-
PACKAGE BODY: APPS.OKS_BILLING_PUB
12.2.2
-
APPS.OKS_BILLING_PUB dependencies on FND_FILE
12.1.1
-
APPS.OKS_BILLING_PUB dependencies on FND_FILE
12.2.2