Job Receipt To Inventory /BPM / Method Directives

this ABL did the trick on a method directive…/ReceiptsFromMfg.OnChangeActTranQty

I found this post really useful and just modified the ABL

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 QtyCompleted AS INTEGER NO-UNDO INITIAL 0.

FIND FIRST JobHead WHERE JobHead.Company = CUR-COMP AND JobHead.JobNum = ttPartTran.JobNum NO-LOCK.
ASSIGN QtyCompleted = JobHead.QtyCompleted.

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 additional receipt quantity will mean the total received quantity will exceed the jobs current completed quantity of ’ + STRING(QtyCompleted).

IF (QtyReceived + ttPartTran.ActTranQty) > QtyCompleted THEN DO:
{lib\PublishEx.i &exMsg = "TextMessage "}
{&THROW_PUBLIC}.
END.

END.