Search Results pon_bid_validations_pkg




Overview

PON_BID_VALIDATIONS_PKG is a PL/SQL package in the Oracle E-Business Suite Advanced Procurement / Sourcing (Oracle Sourcing) module, owned by the APPS schema. It is declared with AUTHID CURRENT_USER, meaning that all SQL statements execute under the privileges of the invoking user rather than the package owner. The package serves as the central server-side engine for validating bid and price data associated with sourcing auctions and supplier bid submissions. Its responsibilities span price formatting and precision checking, currency precision validation, whole-bid validation, spreadsheet and XML/TXT upload validation, and change detection against existing bid lines.

The package defines three package-level constants that identify the mode of bid submission: g_online_mode ('ONL') for online entry, g_xml_upload_mode ('XML') for XML upload, and g_txt_upload_mode ('TXT') for text-based upload. These constants allow the validation routines to apply different rules depending on how the bid was captured, which is a recurring pattern in the Sourcing bid processing framework.

Key Procedures and Functions

  • GET_MASK — Returns a format mask string derived from a supplied precision value. Used to build numeric display/format templates for prices.
  • FORMAT_PRICE — Formats a numeric price into a string using a supplied format mask and precision. This is the function most commonly associated with the search term "format_price" and is used wherever bid prices must be presented or stored in a consistently formatted character form.
  • VALIDATE_PRICE_PRECISION — Validates that a given number conforms to the allowable precision. Returns a status/error string indicating the outcome.
  • VALIDATE_CURRENCY_PRECISION — Validates a number against the precision defined for a specific currency, ensuring bid amounts conform to the currency's allowed decimal places.
  • VALIDATE_BID — The principal validation procedure, invoked with auction header, bid number, interface type, user, batch, and request identifiers. Returns a status code and message via output parameters.
  • VALIDATE_SPREADSHEET_UPLOAD — Validates bid data originating from spreadsheet uploads, accepting an additional spreadsheet type parameter to distinguish formats.
  • POPULATE_HAS_BID_CHANGED_LINE — Compares a source bid against a target bid and populates change-tracking line information, using batch start and end range parameters.
  • GET_VENDOR_SITE_CODE — Retrieves the vendor site code associated with a bidding party, used during validation and error reporting.

Tables Accessed

The package reads and writes a broad set of Sourcing tables through APPS synonyms. PON_BID_ITEM_PRICES and PON_INTERFACE_ERRORS are central: the former stores submitted bid prices and the latter records validation errors with interface type, batch, and request identifiers. Auction definition data comes from PON_AUCTION_HEADERS_ALL, PON_AUCTION_ITEM_PRICES_ALL, PON_AUCTION_SECTIONS, PON_AUCTION_SHIPMENTS_ALL, PON_AUCTION_ATTRIBUTES, PON_AUC_BIZRULES, and PON_AUC_DOCTYPE_RULES. Bid-side data is held in PON_BID_HEADERS, PON_BID_ATTRIBUTE_VALUES, PON_BID_PAYMENTS_SHIPMENTS, PON_BIDDING_PARTIES, and PON_ATTRIBUTE_SCORES. FND_CURRENCIES supplies currency precision definitions used by VALIDATE_CURRENCY_PRECISION.

Usage Notes

PON_BID_VALIDATIONS_PKG is invoked during supplier bid submission through the Sourcing application, including online bidding, spreadsheet upload, and XML/TXT interface uploads. It is referenced by five other packages within the Sourcing schema, indicating it is a shared validation utility rather than an entry-point API. Validations are typically launched from the Sourcing bid entry forms, from the bid upload concurrent programs, and from custom extensions that must enforce identical price, currency, and bid-level validation rules. Because it uses AUTHID CURRENT_USER and writes to PON_INTERFACE_ERRORS, callers must ensure appropriate grants and that a valid batch_id and request_id are available for error logging.