Lee,
One approach is to setup a preprocessing directive on the ReceiptsFromMfg.ReceiveMfgPartToInventory Object/Method (That is what it is called in E10, I am thinking this is the same in E9 but you will have to verify that the method exists).
You can drop the following code in an execute code (4GL/ABL) action and it should work. This will not allow them to receive more than the jobs production quantity.
Ross
FOR EACH ttPartTran WHERE (ttPartTran.RowMod = ‘A’ OR ttPartTran.RowMod = ‘U’) NO-LOCK.
DEFINE VARIABLE QtyReceived As INTEGER NO-UNDO INITIAL 0.
DEFINE VARIABLE TextMessage As CHARACTER NO-UNDO.
DEFINE VARIABLE ProdQty AS INTEGER NO-UNDO INITIAL 0.
FIND FIRST JobHead WHERE JobHead.Company = CUR-COMP AND JobHead.JobNum = ttPartTran.JobNum NO-LOCK.
ASSIGN ProdQty = JobHead.ProdQty.
FOR EACH PartTran WHERE PartTran.Company = CUR-COMP AND PartTran.JobNum = ttPartTran.JobNum AND PartTran.TranType = ‘MFG-STK’ NO-LOCK.
QtyReceived = QtyReceived + PartTran.TranQty.
END.
ASSIGN TextMessage = ‘This receipt quantity of ’ + STRING(ttPartTran.TranQty) + ’ will make a total receipt quantity of ’ + STRING(QtyReceived + ttPartTran.TranQty) + ’ exceeding the job’'s production quantity.of ’ + STRING(ProdQty).
IF (QtyReceived + ttPartTran.TranQty) > ProdQty THEN DO:
{lib\PublishEx.i &exMsg = "TextMessage "}
{&THROW_PUBLIC}.
END.
END.