In the Manual Receipt window of a Work order the system does not check minimum quantity of receipt assembly.
This only works in the "Material issue window".
It is possible to execute the check with BSL WorkorderBoM/CheckMinMax.
Idea: Check the issue quantity while inserting the receipt quantity.
What we check:
Needed Quantity = the input quantity + all receipts from past
Related to this quantity the system has to calculate the Plan-Quantity and based on this the minimum and maximum quantity.
mw_manuell_buchen.src
![]()
global function dw_1_item_menge_itemchanged
dec lc_bookedQty
// Work order - Bill of Material position must be defined
if <dw_1.item.belnr_id.value> n> 0 and <dw_1.item.belpos_id.value> n> 0 and <dw_1.item.pos_id.value> n= 0 and <dw_1.item.menge.value> n> 0 then
// Get booked Quantity
// Parameter with [] because inside placeholder
// comma in placeholder not allowed. Use | as comma
lc_bookedQty=<bsl.WorkorderPos([dw_1.item.belnr_id.value]|[dw_1.item.belpos_id.value]).QuantityProduced/$value>
lc_bookedQty=<lc_bookedQty,dbnum> + <dw_1.item.menge.value,dbnum>
// Execute BSL function
instance bsl b
b.get=WorkorderBom/CheckMinMaxBom(<dw_1.item.belnr_id.value>,<dw_1.item.belpos_id.value>,0,"",<lc_bookedQty,dbnum>,true)
// if locked, then set quantity to 0
if <b.Status> = locked then
dw_1.item.menge.setvalue=0
end if
destroy=b
end if
end global