mes.spPopulateItemClassHierarchy
Description
Populates the `mes.itemClassHierarchy_MAT` table with the full path hierarchy of item classes using a recursive CTE. Designed to improve performance of lookups and filters based on item class lineage.Key Operations
- Truncates the existing hierarchy materialized table - Builds full hierarchical paths (e.g., `RootClass\SubClass\LeafClass`) - Stores parent-enabled status for UI and logic filteringUsage Notes
Run this after any modifications to the item class tree to ensure the hierarchy view stays accurate.Example
-- Refresh the item class hierarchy
EXEC mes.spPopulateItemClassHierarchy;