Search Results create_facilities




Overview

WSH_FACILITIES_INTEGRATION is a public PL/SQL package in the Oracle E-Business Suite Applications (APPS) schema that supports Oracle Warehouse Management and Oracle Shipping Execution by programmatically creating facility records from Oracle location definitions. In the EBS 12.1.1 and 12.2.2 data models, a facility represents a physical inventory or shipping site, such as a warehouse, distribution center, or dock area, that is authorized to process material. The package exists to bridge Oracle Inventory locations, defined through the locations model, with the facilities model used by the shipping and warehouse modules. Its API classification is documented as OTHER, indicating it is a supporting integration utility rather than a primary public business API. The package is declared AUTHID CURRENT_USER, so it executes with the privileges of the calling schema rather than as DEFINER, a convention that matters when invoking it from custom code that must itself hold the necessary object privileges.

Key Procedures and Functions

One documented procedure is exposed by this package.

  • Create_Facilities — Documented with the header comment "Procedure: Create_Facilities" and the stated purpose "Create facilities using the location ids in p_location_ids." The procedure accepts collection-type input parameters describing the location identifiers, the associated company names, and the site or location code names, and it returns standard API-style output parameters consisting of a return status and an error message. These inputs mirror the WSH_LOCATIONS_PKG.ID_Tbl_Type, Address_Tbl_Type, and LocationCode_Tbl_Type collection structures, so the caller supplies corresponding arrays of location IDs, company names, and site names. Because the procedure operates on collections, it supports bulk creation of multiple facilities in a single invocation. The output parameters follow the conventional EBS pattern: x_return_status indicates success, expected error, or unexpected error, while x_error_msg carries diagnostic text when creation fails. Callers must inspect x_return_status after every call rather than relying on exception propagation alone.

Tables Accessed

The provided ETRM metadata does not enumerate base tables read or written by the package, and no tables are documented via APPS synonyms for this object. Functionally, the procedure consumes location identifiers and descriptive attributes supplied by the caller and uses them to establish facility records, which implies interaction with the facilities and locations data structures maintained by the WSH and INV schemas. Because the documentation identifies no explicit table list, implementers should treat the underlying persistence as an implementation detail and rely solely on the documented procedure interface. This package is referenced by one other package, confirming that it participates in a broader call chain within the shipping and warehouse integration layer rather than standing alone.

Usage Notes

WSH_FACILITIES_INTEGRATION is typically invoked from setup and integration flows that must align shipping facilities with existing Oracle locations, including custom concurrent programs, staging-table loaders, and data-conversion scripts during implementations or upgrades. It is not generally driven by an online form in the standard application, so most invocations originate from custom PL/SQL that populates the required collections from location queries before calling Create_Facilities. Callers must supply location IDs that already exist and are valid for facility creation; invalid or missing identifiers are reported through x_error_msg. Because the package is AUTHID CURRENT_USER, the invoking schema requires execute privilege on the package and appropriate privileges on the underlying objects. The procedure should be called within a controlled transaction, and the return status should be validated before committing. Given the sparse ETRM documentation, developers should test the API in a non-production environment and confirm behavior against the specific 12.1.1 or 12.2.2 instance, as the source header indicates an early file revision (115.0 dated 2003) whose behavior may vary across point releases.