Search Results migrate_to_table




Overview

APPS.CS_GET_CONTRACTS_PUB is the public API package body belonging to the Oracle Service (CS) schema, dedicated to the contracts retrieval model used by Oracle E-Business Suite service and coverage processing. In Oracle EBS 12.1.1 and 12.2.2, this package provides the server-side logic required to identify service contracts that apply to a given customer product, site, or system configuration at a specified point in time. It is the functional complement to the contract coverage engine: where coverage validation determines whether a covered product is entitled, CS_GET_CONTRACTS_PUB retrieves the underlying contract records and projects their commercial attributes — duration, period, pricing, invoicing and accounting rules, billing frequency, renewals, termination terms, and workflow context — back to the calling layer.

The package is classified as a public API (PUB), meaning its interface is stable and intended for external invocation rather than internal-only use. The header comment identifies July 1999 provenance ($Header: csctglcb.pls 115.12 99/07/16), confirming that this object is long-lived and preserved largely intact across the 11i to R12 upgrade path, including 12.1.1 and 12.2.2.

Key Procedures and Functions

The documented package exposes seven procedures, of which the following are named in the ETRM metadata:

  • GET_LIST_OF_CONTRACTS — the primary public entry point. It returns the contract or set of contracts applicable to a specified customer product, business process, charge date/time, time zone, and exception coverage flag. The documented parameter surface includes an API version, initialization and commit flags, and a large set of scalar OUT parameters covering contract identity, status, type, group, dates, price list, currency, billing and accounting rules, workflow process, renewal and termination rules, and contract amount. The x_contract_rec_type output carries the structured contract record.
  • MIGRATE_TO_TABLE — converts the in-memory contract record structures into a table-shaped form suitable for further SQL processing, bulk operations, or downstream consumption. This is the routine associated with the "migrate_to_table" search term and is the mechanism by which PL/SQL record collections are flattened for set-based access.
  • COUNT_AND_GET — performs a count and retrieval pass, typically used to size a result set before fetching or to validate cardinality of the contract query.
  • MIGRATE_TO_OUT_VARIABLES — maps the internal record representation into the individual scalar OUT variables declared on the public API, which is how GET_LIST_OF_CONTRACTS returns its contract attributes to callers.

Additional documented procedures complete the seven-member API surface and support the same retrieval and transformation flow.

Tables Accessed

All table access is performed through APPS synonyms, indicating the package runs under the APPS schema in a multi-org R12 environment. The documented tables are:

Usage Notes

CS_GET_CONTRACTS_PUB is invoked from Oracle Service forms and service-related concurrent programs that need contract entitlement data for a customer product, and from custom PL/SQL code performing coverage or renewal analysis. Because the ETRM metadata records zero referencing packages, callers invoke it directly rather than through an intermediate wrapper. The p_commit flag should be passed as F in read-only retrieval contexts to avoid unintended transaction control, and callers must supply the required parameters — API version, initialize message list, business process, charge date/time, time zone, and exception coverage flag — for the API to resolve contracts correctly.