Search Results delete_empty_sections




Overview

OKC_XPRT_INT_GRP is an APPS-owned PL/SQL package in the Oracle E-Business Suite Contracts (OKC) module. Its name reflects its role as an integration group ("INT_GRP") for exporting contract terms ("XPRT"). The package is defined with AUTHID CURRENT_USER, meaning that its unqualified database object references resolve under the privileges of the invoking schema rather than the package owner. This is consistent with an API intended to be called from a variety of application contexts where the caller's security profile governs access to the underlying contract data.

The package's principal business purpose is to support the extraction and propagation of contract terms into a structured document or template representation. This supports the authoring, generation, and delivery of contract documents in Oracle Contracts, including the generation of terms and conditions from templates and the maintenance of article and section hierarchies.

Key Procedures and Functions

The package exposes two documented procedures. All procedures use the standard Oracle API error-handling signature returning x_return_status, x_msg_count, and x_msg_data.

  • GET_CONTRACT_TERMS — Retrieves the contract terms for a given document and template. It accepts an API version, an initialization flag, document type and document identifiers, a template identifier, a flag indicating whether the call originates from the user interface, an optional document number, and a flag controlling whether export processing is executed. The procedure returns standard API status and message outputs. This is the primary entry point for assembling contract terms into a form suitable for export or document generation.
  • DELETE_EMPTY_SECTIONS — Removes sections from a contract document that contain no meaningful content. It accepts the same document, template, version, and initialization parameters as GET_CONTRACT_TERMS (excluding the UI and export-run flags), and returns the standard API status and message outputs. This procedure is the object of interest for searches on "delete_empty_sections" and is typically used to clean up contract structures after template application or term generation, preventing empty or orphaned sections from appearing in the final document.

Tables Accessed

The package operates across the principal Contracts and Quoting tables, accessed through APPS synonyms:

  • OKC_TERMS_TEMPLATES_ALL — The terms template definition table, providing the template structure used to drive term generation.
  • OKC_TEMPLATE_USAGES — Records which templates are applied to which documents, used to resolve the applicable template for a given contract.
  • OKC_SECTIONS_B — The base table holding contract section definitions; read to identify existing sections and modified by DELETE_EMPTY_SECTIONS to remove empty ones.
  • OKC_K_ARTICLES_B — The base table for contract articles, providing the article-level content that sections organize.
  • ASO_QUOTE_HEADERS — The Quoting header table, indicating that the package also supports extraction of terms associated with sales quotes.
  • PLITBLM — The standard Oracle Applications message/error table, used to store and retrieve API error messages returned through x_msg_data.

Usage Notes

OKC_XPRT_INT_GRP is a group-type API, meaning it is not itself an entity CRUD interface but a helper package invoked by higher-level Contracts processes. The metadata documents that it is referenced by two other packages, confirming that it is called programmatically rather than directly by end users.

In Oracle EBS 12.1.1 and 12.2.2, the package is typically invoked from Contract Terms and Template setup flows, from the contract authoring UI when terms are generated or refreshed, and from concurrent programs that produce contract documents. Custom integrators can call GET_CONTRACT_TERMS and DELETE_EMPTY_SECTIONS directly, provided they supply a valid API version, initialize the message list appropriately, and inspect x_return_status. Because the package is declared AUTHID CURRENT_USER, callers must ensure their schema has the necessary privileges on the referenced APPS synonyms. As with all documented Oracle APIs, direct updates to the underlying OKC tables should be avoided in favor of these procedures to preserve data integrity and template consistency.