Search Results validate_po_purge




Overview

The APPS.PON_VENDOR_PURGE_GRP package body is a Group (GRP) classified PL/SQL API that governs supplier and vendor purge eligibility within the Oracle Purchasing module of Oracle E-Business Suite 12.1.1 and 12.2.2. Its principal business purpose is to determine whether a supplier record is safe to remove from the system by validating that the vendor is not referenced by any active or historical sourcing documents. Supplier purge operations are inherently destructive, and this package provides the gating logic that protects data integrity by preventing deletion of vendor records that still participate in procurement workflows. The package resides in the APPS schema and follows Oracle's standard API conventions, including version compatibility checking through FND_API.Compatible_API_Call, message list initialization via FND_MSG_PUB, and structured return status handling through FND_API global constants.

Key Procedures and Functions

The package exposes two documented entry points:

  • VALIDATE_VENDOR_PURGE — Returns 'Y' when the specified vendor is eligible for purge and 'N' when the vendor should be retained. The function performs its validation by counting references in key sourcing tables. The internal API name registered with the compatibility check is validate_po_purge, which is the string a caller would search for when tracing this validation logic. When references are detected, the function logs a diagnostic message at statement level through FND_LOG under the log module pon.vendor_purge, sets the return status to success, and returns 'N'.
  • VENDOR_PURGE — The companion procedure that performs the actual purge action once validation has been confirmed. It is the executable counterpart to the validation function and should only be invoked after a positive validation result.

Tables Accessed

The package reads from two documented sourcing tables through APPS synonyms:

  • PON_BID_HEADERS — Queried by vendor_id to count sourcing events associated with the vendor. A non-zero count causes validation to fail, since a supplier attached to a bid header must not be purged.
  • PON_BIDDING_PARTIES — Queried by trading_partner_id, resolved through POS_VENDOR_UTIL_PKG.get_party_id_for_vendor to translate the vendor identifier into a trading partner party identifier. This captures invitations extended to the supplier in sourcing events.

The source comments note that PON_BID_ITEM_PRICES is deliberately not checked, as a header must exist for any item price, and that PON_ACKNOWLEDGEMENTS references are intentionally ignored because the caller accepts that purging may remove a supplier intending to participate in a sourcing event.

Usage Notes

The package is typically invoked by supplier purge concurrent programs, supplier management forms, and custom purge utilities. Callers pass an API version, an initialization flag, and a vendor identifier, receiving a return status, message count, message data, and the 'Y'/'N' purge eligibility flag. The package is referenced by one other package in the ETRM inventory. Because VALIDATE_VENDOR_PURGE raises FND_API.G_EXC_UNEXPECTED_ERROR on incompatible API versions, custom integrations must supply a compatible version number and honor the standard EBS API error-handling pattern.