Search Results fetch_available_rows




Overview

WMS_RULE_PICK_PKG1 is a public PL/SQL package body in the APPS schema that serves as a dispatcher within the Oracle Warehouse Management (WMS) picking engine. Its business function is to abstract the selection of picking rules so that callers do not need to know which specific rule implementation is being evaluated. Given a rule identifier and a full set of inventory context attributes — organization, item, transaction type, revision, lot, subinventory, locator, cost group, serial range, LPN, project, and task — the package routes the request to the appropriate underlying rule package. In Oracle EBS 12.1.1 and 12.2.2 this package therefore sits at the centre of strategy-based picking, allowing the system to open, fetch, and close a pick cursor against the correct rule logic as determined by the configured picking rule setup.

Key Procedures and Functions

The ETRM metadata documents four procedures in this package. Their names describe a complete cursor lifecycle, which is the signature of a rule-based picking engine.

  • EXECUTE_OPEN_RULE — Opens the pick cursor for the supplied rule. The excerpt shows it accepting a NOCOPY cursor parameter of type WMS_RULE_PVT.Cv_pick_type together with the rule identifier and the full inventory context, then branching on p_rule_id. Rules 1, 2, and 3 delegate to WMS_RULE_1, WMS_RULE_2, and WMS_RULE_3 respectively via their open_curs entry points, returning a result code through x_result. This pattern establishes that additional rule identifiers are handled by analogous sibling packages.
  • EXECUTE_FETCH_RULE — Fetches the next matching row set from the previously opened cursor, returning the selected inventory rows to the caller. This is the procedure most closely associated with the user's search term "fetch_available_rows," since fetching available inventory candidates is its operational purpose.
  • EXECUTE_FETCH_AVAILABLE_INV — Separately fetches available inventory records, supporting the determination of what stock is genuinely eligible to satisfy the pick under the active rule.
  • EXECUTE_CLOSE_RULE — Closes the pick cursor once iteration is complete, releasing the associated session resources.

Tables Accessed

The ETRM metadata does not enumerate base tables referenced through APPS synonyms for this package. Functionally, the package operates on the tables that define WMS picking strategies and their rules, together with the inventory and locator tables that supply candidate source rows. Because the visible body delegates to WMS_RULE_1, WMS_RULE_2, and WMS_RULE_3, the actual table access is largely performed inside those subordinate rule packages rather than in WMS_RULE_PICK_PKG1 itself. Consumers should treat the table list of the sibling rule packages as the authoritative source for DML and query activity.

Usage Notes

This package is an internal engine component rather than an end-user API. It is invoked during pick release and picking transactions — for example from the mobile picking flows, from picking rule simulation, and from any concurrent or custom code that needs to evaluate configured picking rules. The metadata records that it is referenced by one other package, reinforcing its role as a dependent implementation detail of the WMS rule framework. Customizations should call the documented procedures in the open–fetch–close sequence shown above, passing a cursor of type WMS_RULE_PVT.Cv_pick_type, and should inspect the returned x_result value to detect failures. Because the parameter signatures are long and position-sensitive, direct invocation is generally discouraged in favour of the higher-level WMS rule APIs, and any extension that adds rule identifiers must supply a corresponding sibling rule package following the established open_curs convention.