Update on the Code:
{Bpm/Bpm.i &OBJECT_NAME=ReceiptsFromMfg}
{ud/csgBPMexception.i}
procedure ReceiveMfgPartToInventoryBefore:
define input-output parameter table for ttPartTran.
define input-output parameter table for ttSelectedSerialNumbers.
define input-output parameter table for ttSNFormat.
define input-output parameter pdSerialNoQty as decimal.
define input-output parameter plNegQtyAction as logical.
define input-output parameter pcMessage as character.
{&TRY_PRIVATE}
Find first parttran where parttran.LotNum = ttparttran.lotnum no-lock no-error.
if available parttran then
do:
find first partlot where partlot.LotNum = ttparttran.LotNum
no-error.
if available partlot then
do:
if(partlot.onhand = no) then
do:
throwexception("update","This Lot has Already been Issued").
end.
end.
end.
{&CATCH_PRIVATE}
end procedure.
{Bpm/Bpm.i &OBJECT_NAME=ReceiptsFromMfg}
{ud/csgBPMexception.i}
procedure ReceiveMfgPartToInventoryBefore:
define input-output parameter table for ttPartTran.
define input-output parameter table for ttSelectedSerialNumbers.
define input-output parameter table for ttSNFormat.
define input-output parameter pdSerialNoQty as decimal.
define input-output parameter plNegQtyAction as logical.
define input-output parameter pcMessage as character.
{&TRY_PRIVATE}
Find first parttran where parttran.LotNum = ttparttran.lotnum no-lock no-error.
if available parttran then
do:
find first partlot where partlot.LotNum = ttparttran.LotNum
no-error.
if available partlot then
do:
if(partlot.onhand = no) then
do:
throwexception("update","This Lot has Already been Issued").
end.
end.
end.
{&CATCH_PRIVATE}
end procedure.