Search Results check_duplicate_vendor_site




Overview

AP_VENDOR_SITES_PKG is a core Oracle E-Business Suite PL/SQL package owned by the APPS schema that encapsulates the business logic governing supplier site and supplier site location records. Supplier sites represent the physical addresses, procurement settings, and payment attributes associated with a supplier at a specific operating unit. This package underpins the Oracle Payables supplier management model and the Oracle Purchasing supplier site model, both of which act upon the same underlying data structures — AP_SUPPLIER_SITES_ALL and PO_VENDOR_SITES_ALL. This shared architecture, in which the same site rows are exposed through the PO_VENDOR_SITES_S sequence-backed synonym and its AP_SUPPLIER_SITES counterparts, explains why the package simultaneously references both Purchasing and Payables object families.

The package provides the procedural enforcement layer for validation rules that cannot be expressed as database constraints alone, including duplicate-site detection, tax site resolution, state and currency validation, offset account checking, and ECE code duplication. It is the transactional engine invoked when supplier sites are created or modified through the Oracle Forms–based supplier entry screens and through programmatic interfaces. The documented metadata classifies the object as an API of type OTHER, status VALID, and it is referenced by four other database objects.

Key Procedures and Functions

Thirteen procedures and functions are documented for this package:

  • INSERT_ROW — Creates a new supplier site record and its associated location row, applying defaulting and validation logic.
  • UPDATE_ROW — Applies modifications to an existing supplier site, including location and site-level attribute changes.
  • LOCK_ROW — Obtains a concurrency lock on the target site row to prevent conflicting simultaneous updates.
  • FORMAT_ADDRESS — Builds the formatted address string for a site, applying territory and formatting conventions.
  • CHECK_VENDOR_OFFSETS — Validates supplier offset account configurations against site and supplier-level settings.
  • CHECK_DUPLICATE_VENDOR_SITE — Detects duplicate supplier site definitions for a given supplier and location.
  • CHECK_MULTIPLE_TAX_SITES — Enforces the rule governing whether more than one tax-reporting site may exist for a supplier.
  • CHECK_SITE_CURRENCIES — Validates the currency assigned to a supplier site against invoice and payment currency rules.
  • GET_TAX_SITE — Retrieves the designated tax-reporting site for a supplier, used during tax calculation and 1099 processing.
  • CHECK_STATE_CODES — Validates that the state or province code entered is consistent with the specified country.
  • CHECK_DUPLICATE_ECE_CODE — Detects duplicate ECE (tax registration / fiscal code) values across sites.

Tables Accessed

The package reads and writes supplier site data through AP_SUPPLIER_SITES, AP_SUPPLIER_SITES_ALL, PO_VENDOR_SITES, PO_VENDOR_SITES_ALL, and the PO_VENDOR_SITES_S sequence synonym. Reference validation data is drawn from FND_TERRITORIES (country definitions), AP_INCOME_TAX_REGIONS (tax region mapping), and PO_LOCATION_ASSOCIATIONS (supplier site to location linking). Supplier master data is referenced through AP_SUPPLIERS, and WHERE-clause logic is built against APPS synonyms, with DUAL and STANDARD providing utility support. The package also depends on AP_VENDOR_PUB_PKG, AP_PO_LOCN_ASSOCIATION_PKG, IGI_CIS2007_UTIL_PKG, FND_MESSAGE, APP_EXCEPTION, and MO_GLOBAL.

Usage Notes

AP_VENDOR_SITES_PKG is invoked primarily from the Oracle Payables and Oracle Purchasing supplier entry forms, and from concurrent programs and interfaces that load supplier site data. Because it is not referenced by any database object, it operates as a top-level API entry point rather than as a shared library. Customizations that manipulate supplier sites should call these procedures rather than performing direct DML on PO_VENDOR_SITES_ALL or AP_SUPPLIER_SITES_ALL, so that duplicate-site, tax-site, currency, state-code, and ECE validation logic is preserved. The MO_GLOBAL dependency indicates operating unit context is established before site operations execute.