Search Results get_num_inactive_pay_sites




Overview

PO_VENDORS_AP_PKG is an Oracle E-Business Suite PL/SQL package body owned by the APPS schema that provides supplier-level aggregation utilities for Oracle Purchasing and Oracle Payables. Its principal business function is to quantify a supplier's payment sites — specifically, to determine how many active or inactive payment sites a given vendor maintains, optionally scoped to a single operating unit (ORG_ID). This information is important for supplier site validation, supplier merge and purge processing, and for logic that determines whether a supplier is eligible for transactions that require at least one active pay site.

The package belongs to the API classification "OTHER" and is a small, purpose-built utility rather than a general-purpose supplier API. It is referenced by one other package, indicating it is called internally by dependent EBS code rather than deployed standalone. In 12.1.1, supplier data is sourced from PO_VENDORS/PO_VENDOR_SITES, while in 12.2.2 the corresponding synonym-backed tables are AP_SUPPLIERS and AP_SUPPLIER_SITES, reflecting the multi-org (MOAC) and TCA-based supplier model.

Key Procedures and Functions

  • GET_NUM_ACTIVE_PAY_SITES — Returns the number of active payment sites for a specified vendor, accepting a vendor identifier and an optional operating unit identifier. A site qualifies as an active pay site when the pay_site_flag is set to 'Y' and the site's inactive_date is null or still in the future relative to the current system date. When the operating unit argument is supplied, only sites belonging to that ORG_ID are counted; when it is null, sites across all operating units are counted. The function returns zero when no rows qualify.
  • GET_NUM_INACTIVE_PAY_SITES — Returns the number of inactive payment sites for a specified vendor, using the same vendor/operating-unit filter logic. A site is treated as inactive when it carries the pay-site designation ('Y') but its inactive_date has already passed. This function is the logical complement of the active-site count and is used to distinguish vendors with historical pay sites from those with currently usable ones.

Tables Accessed

The functions read from AP_SUPPLIER_SITES, the supplier site entity in the TCA-based supplier model, selected through an APPS synonym. In older 12.1.1 code paths, this corresponds to PO_VENDOR_SITES. Documented related objects include AP_SUPPLIERS, the supplier header table, and HZ_PARTY_SITES, the TCA party-site table that underlies supplier site records. The package is read-only with respect to its documented logic: it performs COUNT aggregates and returns numeric results without inserting, updating, or deleting rows, and no commit or rollback handling is required.

Usage Notes

The package is typically invoked from supplier maintenance forms, supplier merge and purge concurrent programs, and custom PL/SQL that must validate whether a supplier has a usable payment site before allowing payables or purchasing activity. Because the functions accept an optional ORG_ID, callers operating in a multi-org environment should pass the current operating unit when operating-unit-specific counts are required, or NULL to obtain a global count. Callers should also handle the NO_DATA_FOUND path gracefully, as the exception handler returns zero rather than propagating an error. Given the "OTHER" classification, the package should be treated as internal and used with caution in customizations; Oracle does not guarantee its interface across releases, and custom code should preferably rely on documented public supplier APIs where equivalent functionality is available.