Search Results add_condition




Overview

WSH_ITM_QUERY_CUSTOM is a PL/SQL package body owned by APPS in the Oracle E-Business Suite, classified under the ETRM API classification OTHER. It belongs to the WSH (Shipping) product family and serves as a custom query-construction and condition-handling utility used primarily by Oracle Shipping Execution's item query framework. Its documented header comment indicates a private method design for "searching with Condn String" and a private method for editing or adding elements in a table of value objects and value types, establishing the package as a building-block layer for dynamic, condition-driven item lookups.

The package manipulates an internal table type (g_CondnValTableType) that stores condition strings paired with value objects and value types. This structure supports dynamic SQL assembly where query conditions and their bound values are accumulated, indexed, edited, and removed. In Oracle EBS 12.1.1 and 12.2.2 the package operates as a supporting custom component for shipping item selection, typically alongside standard WSH item query APIs.

Key Procedures and Functions

  • ADD_CONDITION — Adds a new search condition, together with its associated value and value type, to the internal condition/value table used to construct item queries.
  • EDIT_CONDITION — Modifies an existing condition entry in the internal table, replacing the condition string and its associated value or value type.
  • DEL_CONDITION — Removes a previously added condition from the internal condition/value table, allowing callers to prune query criteria before execution.
  • BIND_VALUES — Binds the accumulated values to the dynamically assembled SQL statement, ensuring conditions carry their correct value objects and types at execution time.
  • FIND_INDEX (private, per header excerpt) — Locates the positional index of a condition string within the internal table so that add, edit, and delete operations target the correct element.
  • SET_DATA_INDEX (private, per header excerpt) — Edits or inserts an element at a specified index, populating the new condition string, value, and value type.

All procedures incorporate WSH debug instrumentation via WSH_DEBUG_INTERFACE and WSH_DEBUG_SV, pushing and popping module names and logging key parameters when debug is enabled.

Tables Accessed

The documented table and synonym references are DBMS_SQL and PLITBLM. DBMS_SQL is the Oracle-supplied dynamic SQL package used to parse, bind, and execute the dynamically generated query built from the accumulated conditions; the BIND_VALUES procedure feeds values into it. PLITBLM is the PL/SQL-supplied table-to-string conversion package, commonly used to render indexed table collections into string form, which aligns with the package's internals around condition/value tables. No application base tables are documented as directly referenced; the package operates on in-memory PL/SQL collections rather than persistent EBS tables.

Usage Notes

Because the ETRM classification is OTHER and the package is marked custom (the header indicates a non-shipped "noship" build), it is not a public Oracle API. It is referenced by five other packages, indicating it is invoked as an internal utility within a broader shipping query flow rather than called directly from forms or concurrent programs. Typical invocation patterns include form-level item query handlers and custom shipping extensions that need dynamic, condition-based item selection. Developers customizing or debugging this package should enable WSH debug to leverage its instrumentation, and must preserve the FIND_INDEX / SET_DATA_INDEX index alignment contract, since add, edit, and delete operations depend on consistent positional indexing of the condition table across a query-building session.