Search Results oe_contracts_util




Overview

OE_CONTRACTS_UTIL is an Oracle E-Business Suite utility package owned by APPS that centralizes common contractual and article-terms processing for Oracle Order Management in releases 12.1.1 and 12.2.2. In the Oracle EBS architecture, contracts and terms functionality for sales documents—Blanket Sales Agreements and Sales Orders—is not isolated to a single module. Instead, contract articles, terms templates, and versioning logic are shared between Order Management and the Oracle Contracts (OKC) subsystem. OE_CONTRACTS_UTIL provides the connective layer that allows Order Management forms, ordering APIs, and workflow components to manipulate articles and document terms in a consistent, licensed, and API-compliant manner.

The package exposes global constants representing document types, notably a Blanket Sales Agreement type ('B') and a Sales Order type ('O'), and wraps several OKC terms group data types through PL/SQL subtype declarations. It is also used to enforce contractual licensing through the CHECK_LICENSE function, ensuring that a user session is entitled to the contractual option before article or terms operations proceed. Because it is a UTIL-classification API, it is not a transactional business API in its own right; rather, it is called by higher-level Order Management and Contracts flows to perform discrete supporting operations.

Key Procedures and Functions

The 26 documented procedures and functions can be grouped by purpose. GET_G_BSA_DOC_TYPE and GET_G_SO_DOC_TYPE return the document-type constants, since Oracle Forms' PL/SQL engine cannot always reference package globals directly. CHECK_LICENSE returns the licensing result for contractual usage.

Article management is the largest group. COPY_ARTICLES copies articles from one document to another, supporting version and start-date parameters. VERSION_ARTICLES creates a new version of existing articles. DELETE_ARTICLES and PURGE_ARTICLES remove article content, the latter typically for permanent cleanup. QA_ARTICLES and NON_STANDARD_ARTICLE_EXISTS, along with WF_NON_STNDRD_ARTICLE_EXISTS, validate article quality and detect non-standard or workflow-generated article conditions. ATTACHMENT_LOCATION resolves the storage location of article attachments, while TERMS_EXISTS checks whether terms are defined for a document.

Terms handling includes GET_ARTICLE_VARIABLE_VALUES for retrieving substitution variable values, GET_TERMS_TEMPLATE and GET_TEMPLATE_NAME for resolving templates, and INSTANTIATE_TERMS and INSTANTIATE_DOC_TERMS for materializing terms from templates onto documents. The searched term "instantiate_doc_terms" refers to the latter routine, which applies a terms template to a specific document. GET_ITEM_INFO supplies item data, and COPY_DOC and IS_ORDER_SIGNED support document duplication and signature-state checks.

Tables Accessed

The package reads and writes Order Management base tables through APPS synonyms. OE_ORDER_HEADERS_ALL and OE_ORDER_LINES_ALL hold Sales Order header and line records. OE_BLANKET_HEADERS_ALL, OE_BLANKET_HEADERS_EXT, and OE_BLANKET_LINES_ALL hold Blanket Sales Agreement data. FND_ATTACHED_DOCUMENTS stores the attachment records referenced by article and attachment logic, while PLITBLM is the PL/SQL table used as an in-memory collection for table-based processing.

Usage Notes

OE_CONTRACTS_UTIL is typically invoked from Order Management forms libraries, from concurrent programs that manage contract terms, and from custom extensions that need to copy, version, or instantiate articles and terms. Because it is referenced by numerous other packages, invoking it directly should follow Oracle's API conventions, including proper initialization of message lists and return-status handling. Custom code should prefer documented public routines such as INSTANTIATE_DOC_TERMS rather than manipulating the underlying tables directly.