I should have added that if youre really looking to track off of end
activity, only include rowmod = 'U', as the record already exists from
start activity, adding 'A' with it will fire on every single
transaction...
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Rob Bucek
Sent: Wednesday, June 24, 2009 11:24 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Op complete BPM
Strange...I do have a BPM that runs off MES activity Labor.Update. I
update an user defined field on a JobHead record - Pre-Process...
If this is usefull for anything...
Designed query
for each ttLaborDtl where (ttLaborDtl.RowMod = 'U' and
ttLaborDtl.LaborQty > 0 and ttLaborDtl.AssemblySeq = 0) no-lock ,
each JobHead where (ttLaborDtl.Company = JobHead.Company and
ttLaborDtl.JobNum = JobHead.JobNum) no-lock ,
each JobProd where (JobHead.Company = JobProd.Company and JobHead.JobNum
= JobProd.JobNum) and (JobProd.OrderNum = 0 and JobProd.ProdQty =
JobHead.QtyCompleted + ttLaborDtl.LaborQty) no-lock
4GL Action
for each ttLaborDtl where (ttLaborDtl.RowMod = 'U' and
ttLaborDtl.LaborQty > 0 and ttLaborDtl.AssemblySeq = 0) no-lock ,
each JobHead where
(ttLaborDtl.Company = JobHead.Company and ttLaborDtl.JobNum =
JobHead.JobNum and ttLaborDtl.LaborQty = JobHead.ProdQty -
JobHead.QtyCompleted) no-lock ,
each JobPart where
(JobHead.Company = JobPart.Company and JobHead.JobNum = JobPart.JobNum)
and (JobPart.StockQty > 0) no-lock.
If available JobPart then
assign ttLaborDtl.ShortChar03 = JobPart.PartNum.
Run lib\UpdateTableBuffer.p(input BUFFER JobHead:HANDLE,
'ShortChar01',"Stock").
End.
Perhaps theres a snipet in there you can use...
From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
Of Michael McWilliams
Sent: Wednesday, June 24, 2009 8:23 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Op complete BPM
I am trying to create a BPM to automatically complete ops during end
activity, but I am having problems with it working. I have tried the
Labor.update method, but it will not let me log in our out of jobs. I
have also set my query to only if JobOper.ActiveTrans = True but it
still fires off when starting activity even though it is a preprocess.
If the complete checkbox actually worked in my version I would just use
a customization but there is a bug that even though you complete an op
or mark it as complete it really does not. I have tried
Labor.EndActivityComplete but that only fires when you check the
complete box, not when you click OK. I tried Labor.EndActivity but that
fires when the form is loading. Below is my BPM.
find first ttLaborDtl where ttLaborDtl.RowMod = 'U' or ttLaborDtl.RowMod
='A' no-lock.
find first JobHead where JobHead.JobNum = ttLaborDtl.JobNum.
find first JobOper where JobOper.JobNum = JobHead.JobNum and
JobOper.OprSeq = ttLaborDtl.OprSeq.
DEFINE VARIABLE ProdQty As Integer NO-Undo.
Define Variable CompleteQty As Integer no-undo.
ProdQty = JobHead.ProdQty.
CompleteQty = JobOper.QtyCompleted.
If CompleteQty / ProdQty > .96 then do:
Run lib\UpdateTableBuffer.p(input BUFFER
JobOper:Handle,'OpComplete',True).
end.
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
activity, only include rowmod = 'U', as the record already exists from
start activity, adding 'A' with it will fire on every single
transaction...
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Rob Bucek
Sent: Wednesday, June 24, 2009 11:24 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Op complete BPM
Strange...I do have a BPM that runs off MES activity Labor.Update. I
update an user defined field on a JobHead record - Pre-Process...
If this is usefull for anything...
Designed query
for each ttLaborDtl where (ttLaborDtl.RowMod = 'U' and
ttLaborDtl.LaborQty > 0 and ttLaborDtl.AssemblySeq = 0) no-lock ,
each JobHead where (ttLaborDtl.Company = JobHead.Company and
ttLaborDtl.JobNum = JobHead.JobNum) no-lock ,
each JobProd where (JobHead.Company = JobProd.Company and JobHead.JobNum
= JobProd.JobNum) and (JobProd.OrderNum = 0 and JobProd.ProdQty =
JobHead.QtyCompleted + ttLaborDtl.LaborQty) no-lock
4GL Action
for each ttLaborDtl where (ttLaborDtl.RowMod = 'U' and
ttLaborDtl.LaborQty > 0 and ttLaborDtl.AssemblySeq = 0) no-lock ,
each JobHead where
(ttLaborDtl.Company = JobHead.Company and ttLaborDtl.JobNum =
JobHead.JobNum and ttLaborDtl.LaborQty = JobHead.ProdQty -
JobHead.QtyCompleted) no-lock ,
each JobPart where
(JobHead.Company = JobPart.Company and JobHead.JobNum = JobPart.JobNum)
and (JobPart.StockQty > 0) no-lock.
If available JobPart then
assign ttLaborDtl.ShortChar03 = JobPart.PartNum.
Run lib\UpdateTableBuffer.p(input BUFFER JobHead:HANDLE,
'ShortChar01',"Stock").
End.
Perhaps theres a snipet in there you can use...
From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
Of Michael McWilliams
Sent: Wednesday, June 24, 2009 8:23 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Op complete BPM
I am trying to create a BPM to automatically complete ops during end
activity, but I am having problems with it working. I have tried the
Labor.update method, but it will not let me log in our out of jobs. I
have also set my query to only if JobOper.ActiveTrans = True but it
still fires off when starting activity even though it is a preprocess.
If the complete checkbox actually worked in my version I would just use
a customization but there is a bug that even though you complete an op
or mark it as complete it really does not. I have tried
Labor.EndActivityComplete but that only fires when you check the
complete box, not when you click OK. I tried Labor.EndActivity but that
fires when the form is loading. Below is my BPM.
find first ttLaborDtl where ttLaborDtl.RowMod = 'U' or ttLaborDtl.RowMod
='A' no-lock.
find first JobHead where JobHead.JobNum = ttLaborDtl.JobNum.
find first JobOper where JobOper.JobNum = JobHead.JobNum and
JobOper.OprSeq = ttLaborDtl.OprSeq.
DEFINE VARIABLE ProdQty As Integer NO-Undo.
Define Variable CompleteQty As Integer no-undo.
ProdQty = JobHead.ProdQty.
CompleteQty = JobOper.QtyCompleted.
If CompleteQty / ProdQty > .96 then do:
Run lib\UpdateTableBuffer.p(input BUFFER
JobOper:Handle,'OpComplete',True).
end.
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]