I am a newbie to the ax report developing. Actually i am a networking guy but put into a position i have to write reports. here is my delima, i have an open order sales line report that is open and need to see if we have available inventory, which is configuration specific and need to display values only in m001 warehouse.
through search i found a post here by Vince Perta (Finding the Total Available and Available physical for an Item/Warehouse), which gave the following code. seems to work but want to be able to build a report from it.
static void FindOpenSalesLineAvailPhys(Args _args)
{
SalesLine salesline;
InventDim inventDim;
InventDimParm inventDimParm;
InventOnHand inventOnHand;
;
while select salesLine where salesLine.SalesStatus == SalesStatus::Backorder
{
inventDim = salesLine.inventDim();
inventDimParm.initFromInventDim(inventDim);
inventDimParm.WMSLocationIdFlag = NoYes::No;
inventOnHand = InventOnHand::newItemDim(salesLine.ItemId, inventDim, inventDimParm);
if (inventOnHand.availPhysical())
{
info(strfmt("Sales Order %1 Line %2 Item Id %3 Available Physical (ignoring Location) %4",
salesLine.salesId, salesLine.LineNum, salesLine.ItemId, inventOnHand.availPhysical()));
}
}
}
Can anyone help please?