PdcApplication.CheckStock
Declaration
CheckStock(strMatNr as String)
Description
Creates purchaseorderlines or internal productionorders if necessary
Notes
This method checks the ACTUAL stock position against the MINIMUM quantity stated in the material's master data. Depending on the materialtype this can lead to purchaseorder lines (RawMaterials of BuyParts) or internal stock order lines (Stocked MakeParts).
Code example
This code example checks the need for purchase order or stock order lines for materials for which the stocked quantity is changed to 100.
dim strMatNr
dim tblMAT
strMatNr = "12345"
set tblMAT = pdc.Database.OpenTable(pdcConData, "LM_MAT", "LM_MATN")
if IsValid(tblMat) and tblMat.Locate("LM_MATN", strMatNr) then
pdc.ChangeStock(strMatNr, 100)
pdc.CheckStock(strMatNr)
set tblMat = nothing
end if
Availability
Available since July 2008 (From version 3.8).