Search Results calculate_bill




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:

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.