MICROSOFT DYNAMICS AX 2012 : GET ON HAND OF AN ITEM STOCK COUNT
static void stockOnHand(Args _args)
{
InventOnhand inventOnHand;
InventDim inventDim;
InventDimParm inventDimParm;
InventQty stockOnHand;
ItemId itemid = "00001aTestInter";
inventDim.InventSiteId = "SITE"; // site
inventDim.InventLocationId = "WAREHOUSE"; // warehouse
inventDimParm.initFromInventDim(inventDim);
inventOnHand = InventOnhand::newParameters(itemid,inventDim,inventDimParm);
stockOnHand = inventOnHand.availPhysical();
info (strFmt(" Stock on Hand for Item %1 is %2",itemid,stockOnHand));
}
{
InventOnhand inventOnHand;
InventDim inventDim;
InventDimParm inventDimParm;
InventQty stockOnHand;
ItemId itemid = "00001aTestInter";
inventDim.InventSiteId = "SITE"; // site
inventDim.InventLocationId = "WAREHOUSE"; // warehouse
inventDimParm.initFromInventDim(inventDim);
inventOnHand = InventOnhand::newParameters(itemid,inventDim,inventDimParm);
stockOnHand = inventOnHand.availPhysical();
info (strFmt(" Stock on Hand for Item %1 is %2",itemid,stockOnHand));
}
No comments:
Post a Comment