Search Results p_order_by




Overview

The package body APPS.OKS_OKSCOBKS_XMLP_PKG is a generated Oracle Reports PL/SQL package associated with the Oracle E-Business Suite Service Contracts (OKS) module. Its primary business function is to support the OKSCOBKS report — a Service Contracts report that extracts contract booking and related header information for a specified operating unit, sales representative, and date range. The _XMLP_PKG suffix indicates that this package was produced to support the XML Publisher (BI Publisher) integration layer for the report, providing the pre-report and post-formula processing hooks that Oracle Reports invokes during execution.

The package is owned by APPS and classified as API OTHER. It is not referenced by any other package, confirming that it is a leaf-level report support object rather than a shared library. Its logic is therefore tightly coupled to the OKSCOBKS concurrent program and its report definition.

Key Procedures and Functions

  • BEFOREREPORT — Invoked automatically by Oracle Reports immediately before report execution. In this package it performs initialization and delegates to AFTERPFORM, returning a Boolean status flag to the Reports engine.
  • AFTERPFORM — Invoked after the report's parameter form has been processed. This is the core logic routine of the package. It captures the concurrent request ID via FND_GLOBAL.CONC_REQUEST_ID, applies profile-driven defaults (for example, defaulting the organization from the OKC_VIEW_K_BY_ORG profile), and conditionally builds the dynamic WHERE clause fragments that filter the report query. These fragments include the organization, sales representative, estimated amount, approved date range, and start date range predicates, each stored in package-level variables consumed by the report's data model.
  • AFTERREPORT — Invoked after report execution completes. It provides the standard closing hook for the report, allowing cleanup and finalization of report-level processing once output has been generated.

Tables Accessed

The documented metadata does not list any base tables referenced directly through APPS synonyms, and this is consistent with the source excerpt. The package does not perform SQL DML against contract tables itself; instead it assembles bind-variable predicates (such as org.organization_id, contact.object1_id1, and okc_hdr.estimated_amount) that are embedded into the report's main query, which runs against the OKC/OKS contract tables (for example OKC_HDR and the organization and contact sources). The package's own reads are limited to profile option values obtained through FND_PROFILE.VALUE.

Usage Notes

This package is not intended to be called directly by custom code. It is invoked exclusively by the Oracle Reports runtime engine when the OKSCOBKS report is executed, most commonly through the concurrent program that submits the report. Developers should not modify the generated body directly, as it is regenerated from the OKSCOBKSB.pls source (header revision 120.2) maintained by Oracle. The p_order_by search term that led to this object relates to report-level ordering parameters handled within the data model rather than within this PL/SQL package. Any customization should be applied through the XML Publisher template or a supported report customization mechanism, preserving the integrity of the generated package.