static void InventoryOnHand(Args _args)
{
InventDim inventDim;
InventDimParm inventDimParm;
InventOnHand inventOnHand;
InventTable inventtable;
ItemId itemId;
;
itemId = '28-010020';
inventDim.InventSiteId = "1"; // For site # 1
inventDimParm.initFromInventDim(inventDim);
inventOnHand = InventOnHand::newItemDim(itemId, inventDim, inventDimParm);
if (inventOnHand.availPhysical())
{
info(strfmt("Item Id %1 Available Physical %2",
inventtable.ItemId,inventOnHand.availPhysical()));
}
}