Results for “po_locations_s”

50+ results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

PO_LOCATIONS_S is a server-side PL/SQL package owned by APPS and classified under the OTHER API category. It provides the location validation and derivation logic used throughout Oracle Purchasing when a purchasing document references a ship-to, deliver-to, receipt, or inventory destination. The package consolidates the rules that determine whether a given location identifier is valid, whether it remains active, and what related location attributes apply in the context of an operating unit and inventory organization.

The header comment identifies the package as a client/server-side server package, originally owned by Thomas Cai, with an AUTHID CURRENT_USER declaration. Because Purchasing locations span supplier sites, ship-to addresses, deliver-to addresses, and inventory destinations, the package centralizes the cross-validation logic that otherwise would be duplicated across purchasing forms and concurrent processes. The presence of derive_location_info() and validate_location_info()—added in October 1996—reflects the package's role in populating and checking the address-derived fields that accompany a purchasing document line location.

Key Procedures and Functions

The ETRM metadata documents fourteen procedures and functions. The following are named in the package specification:

  • val_location() — Validates that the necessary fields for a location are populated and consistent.
  • get_loc_attributes() — Retrieves location attributes for a given location identifier.
  • get_tax_name() — Returns the tax name associated with a location.
  • val_if_inventory_destination() — Validates whether the location qualifies as an inventory destination.
  • val_ship_to_site_in_org() — Validates the ship-to site against the inventory organization.
  • val_receipt_site_in_org() — Validates the receipt site against the inventory organization.
  • get_ship_to_location() — Returns a ship-to location ID for a given deliver-to location ID, verifying that the ship-to remains active and returning TRUE or FALSE accordingly.
  • derive_location_info() — Derives location information, populating the address and location attributes required on a purchasing document.
  • validate_location_info() — Validates the derived location information.
  • validate_tax_info() — Validates tax information associated with the location.
  • po_predel_validation() — Performs pre-delete validation, added in March 1999.
  • GET_LOCATION_CODE — Retrieves the location code for a location.

Parameter lists are intentionally not reproduced here; the package specification should be queried directly in the EBS instance for exact signatures.

Tables Accessed

The package references a broad set of APPS synonyms through its dependent objects. Location master data is read from HR_LOCATIONS_ALL and HZ_LOCATIONS. Purchasing document context is provided by PO_HEADERS_ALL, PO_LINES_INTERFACE, PO_LINE_LOCATIONS_ALL, the corresponding archive tables (PO_HEADERS_ARCHIVE_ALL, PO_LINE_LOCATIONS_ARCHIVE_ALL, PO_DISTRIBUTIONS_ARCHIVE_ALL), and the interface tables PO_HEADERS_INTERFACE, PO_LINES_INTERFACE, and PO_DISTRIBUTIONS_INTERFACE. Distribution-level location usage is read from PO_DISTRIBUTIONS and PO_DISTRIBUTIONS_ALL. PO_LOCATION_ASSOCIATIONS links locations to the entities that use them, while PO_AGENTS and PO_CONTROL_RULES supply defaulting and control behavior. These tables support validation of a location in the context of a specific document, line, and organization.

Usage Notes

PO_LOCATIONS_S is invoked primarily from the Purchasing forms and from concurrent programs that process purchasing documents, including the pre-delete validation path exposed by po_predel_validation(). It is referenced by nineteen other packages, indicating that it functions as a shared utility layer for location handling rather than a document-specific API. Custom code extending Purchasing should call these procedures instead of reimplementing address validation. Because the package is declared AUTHID CURRENT_USER, callers must hold the necessary privileges on the underlying location and purchasing tables.