Show HUs with their packaging, quantity and consumer units
/*
Lists the LU and TUs of a HU tree, together with their packaging products and the packaged consumer products.
Note that only those items are listed that hava a packaging product. Taht means that the leaves ("virtual HUs") of the tree are not shown.
*/selectv.M_HU_ID,v.Value,v.HUStatus,hui.M_HU_Item_ID,hupi.ItemType,pm_p.Value,pm_p.Name,hus.M_HU_Storage_ID,hus.Qty,hus.C_UOM_ID,hus_p.Value,hus_p.Namefrom"de.metas.handlingunits".m_hu_tree(17996009)vJOINM_HU_ItemhuiONhui.M_HU_ID=v.M_HU_IDJOINM_HU_PI_ItemhupiONhupi.M_HU_PI_Item_ID=hui.M_HU_PI_Item_IDANDhupi.ItemTypeIN('PM')/* we are interested in the used packing material such as IFCO, palette etc, because that gives us a good idea about how the whole thing looks like*/LEFTJOINM_HU_PackingMaterialhupmONhupm.M_HU_PackingMaterial_ID=hupi.M_HU_PackingMaterial_IDLEFTJOINM_Productpm_pONpm_p.M_Product_ID=hupm.M_Product_IDJOINM_HU_StoragehusONhus.M_HU_ID=v.M_HU_IDJOINM_Producthus_pONhus_p.M_Product_ID=hus.M_Product_IDWHEREtrue