Search Results ap_prepay_trak_rep_turk_pkg




Overview

AP_PREPAY_TRAK_REP_TURK_PKG is a Turkish localization package within the Oracle E-Business Suite Payables (AP) module. Its stated purpose, per the package header, is to generate the Prepayment Tracking Report for Turkey. The package header identifies the source file as APPPTRPS.pls and records a creation date of 26-JAN-2007 by author Pgollu M, with a later revision dated 31-OCT-2007. It is declared with AUTHID CURRENT_USER, meaning its SQL executes with the privileges of the invoking schema rather than the definer, which is standard for APPS-owned reporting packages that rely on APPS synonyms and row-level security via MO/ORG_ID.

The package exposes global variables and constant declarations that hold report parameter values and lexical (LOV) query strings. These include date range variables, invoice number range (from/to), supplier name range (from/to), currency, vendor type, organization ID, and prepayment status. The corresponding c_lex_* constants hold dynamic SQL fragments used to build LOV queries, and gc_org_where holds an organization filter clause. This design indicates the report is driven by a parameter form whose LOVs are populated at runtime.

Key Procedures and Functions

Two documented procedures are present in the package metadata.

  • BEFOREREPORT — The standard Oracle Reports user-exit procedure invoked before the report query executes. It initializes the report session, typically assigning the runtime parameter values into the package globals (gd_date_from, gd_date_to, the invoice, supplier, currency, vendor type, and prepay status variables) and constructing the dynamic WHERE clause. Because it runs in the report's Before Report trigger, it is the point at which parameter values are validated and made available to the query.
  • DATE_CLOSE — A supporting function/procedure whose name suggests derivation or validation of a closing date boundary for the report. In Turkish prepayment tracking, the reporting period boundary is significant because prepayment application and closure dates drive the outstanding balance. Its exact behavior cannot be confirmed from the available metadata; it should be treated as an internal helper used to compute or validate the date criteria applied by the report.

Tables Accessed

The ETRM metadata for this object records no directly referenced tables through APPS synonyms. This is a common characteristic of Oracle Reports–oriented packages, where the substantive SQL resides in the associated report definition (RDF) rather than in the PL/SQL package. The package primarily supplies parameter handling and lexical LOV fragments. Reports of this type conventionally read AP invoice and payment tables—AP_INVOICES_ALL, AP_INVOICE_DISTRIBUTIONS_ALL, AP_PAYMENT_SCHEDULES_ALL, AP_CHECKS_ALL, and supplier tables (AP_SUPPLIERS, PO_VENDORS)—filtered by ORG_ID and a vendor type derived from the supplier's tax registration attributes. No documented table access is asserted here beyond what the metadata confirms.

Usage Notes

This package is invoked in the context of an Oracle Reports concurrent program or a request submitted from an AP localization responsibility. Standard invocation is through the Turkish Payables menu or the Submit Request form, where the parameter window supplies the date range, invoice range, supplier range, currency, vendor type, organization, and prepayment status. The BEFOREREPORT user exit is called from the report's Before Report trigger; the report query then consumes the package globals and lexical fragments. The package is referenced by zero other PL/SQL packages, confirming it is a leaf-level reporting utility rather than a shared API. Because it is not a public API, it should not be called from custom code except through the associated report definition. Its AUTHID CURRENT_USER declaration requires the invoking user to hold the APPS synonyms and Payables data access privileges appropriate to the requested ORG_ID.