The way I'm reading your code, is that you are stopping any operation after the previous that isn't 'Rework'. Can you describe what you're intending to happen (either here or offline), I'd be glad to help you get this working.
Rob Bucek
Production Control Manager
D&S Manufacturing
301 E. Main St. | PO Box 279
Black River Falls, WI 54615
715-284-5376 Ext. 311
Mobile: 715-896-3119
rbucek@...
www.dsmfg.com<http://www.dsmfg.com>
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Friday, November 13, 2015 11:25 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Epicor 9.04 - Help with BPM to force Op completion
Hello,
I am trying to use the BPM that Rob Bucek listed here (Thank you Rob!), but I'm having an issue getting it to work correctly.
I will list the code below, but the issue I'm having is that it looks at the operations AFTER the one I make checkbox06 true.
For example:
Ops:
10
20
30 - Checkbox06 = True but can't use op
40 - Can use OP but Checkbox06 is false
50
That is also the case for two operations I have it ignoring, ProSuppt and Rework.
In the first section If I change JobOper.OprSeq < ttLaborDtl.OprSeq no-lock. From < to = , then of course it works OK, EXCEPT it will not let the op that we need to work (the first uncompleted op) on be allowed to have entries made.
I've looked at this so long, I need another set of eyes to see my error.
Any suggestions? TIA
Jim Moore
________________________________
Conditions:
Abc query
For each ttLaborDtl where ttLaborDtl.RowMod = 'A' no-lock ,
Each JobOper where JobOper.Company = Cur-Comp and JobOper.JobNum = ttLaborDtl.JobNum and JobOper.AssemblySeq = ttLaborDtl.AssemblySeq and JobOper.OprSeq < ttLaborDtl.OprSeq
OR
Conditions:
Abc2 query
For each ttLaborDtl where ttLaborDtl.RowMod = 'A' no-lock ,
Each JobAsmbl where JobAsmbl.Company = Cur-Comp and JobAsmbl.JobNum = ttLaborDtl.JobNum and JobAsmbl.Parent = ttLaborDtl.AssemblySeq and
JobAsmbl.AssemblySeq <> ttLaborDtl.AssemblySeq no-lock ,
Each JobOper where JobOper.Company = Cur-Comp and JobOper.JobNum = JobAsmbl.JobNum and JobOper.AssemblySeq = JobAsmbl.AssemblySeq and
JobOper.OpComplete = False and (JobOper.OpCode = 'ProSuppt' or JobOper.OpCode = 'Rework') and JobOper.CheckBox06 = false
Actions:
/* Warn or stop labor transaction */
For each ttLaborDtl where ttLaborDtl.RowMod = "A" no-lock.
Find Last JobOper where JobOper.Company = Cur-Comp and JobOper.JobNum = ttLaborDtl.JobNum and JobOper.AssemblySeq = ttLaborDtl.AssemblySeq and
JobOper.OprSeq < ttLaborDtl.OprSeq no-lock.
If avail JobOper Then DO:
/* {lib/PublishInfoMsg.i &InfoMsg = "JobOper.OpCode"}. */
If JobOper.OpCode <> "ProSuppt" and JobOper.OpComplete = False and JobOper.CheckBox06 = false
then
If JobOper.OpCode <> "Rework" and JobOper.OpComplete = False and JobOper.CheckBox06 = false Then DO:
{lib/PublishEx.i &ExMsg = "'WARNING!!! You cannot start this operation as the previous operation, ' + string(JobOper.OpDesc) + ' has not been
completed. Please see your supervisor for assistance.'"}.
end.
Else DO:
If JobOper.OpComplete = False and JobOper.OpCode <> "KIT" Then DO:
{lib/PublishInfoMsg.i &InfoMsg = "'Warning! Only ' + string(JobOper.QtyCompleted) + ' part(s) have been completed in the previous ' + String
(JobOper.OpDesc) + ' operation'"}.
End.
End.
End.
End.
For each ttLaborDtl where ttLaborDtl.RowMod = "A" no-lock,
each JobAsmbl where JobAsmbl.Company = Cur-Comp and JobAsmbl.JobNum = ttLaborDtl.JobNum and JobAsmbl.Parent = ttLaborDtl.AssemblySeq and
JobAsmbl.AssemblySeq <> ttLaborDtl.AssemblySeq and JobAsmbl.AssemblySeq <> ttLaborDtl.AssemblySeq no-lock,
Each JobOper where JobOper.Company = Cur-Comp and JobOper.JobNum = JobAsmbl.JobNum and JobOper.AssemblySeq = JobAsmbl.AssemblySeq and
JobOper.OpComplete = false and (JobOper.OpCode <> "ProSuppt" or JobOper.OpCode <> "Rework") and JobOper.CheckBox06 = false no-lock.
If avail JobOper Then DO:
/* {lib/PublishInfoMsg.i &InfoMsg = "JobOper.OpCode"}. */
{lib/PublishEx.i &ExMsg = "'WARNING!!! You cannot start this operation as the previous operation, ' + string(JobOper.OpDesc) + ' Assembly ' + string
(JobOper.AssemblySeq) + ' has not been completed. Please see your supervisor for assistance.'"}.
End.
End.
[Non-text portions of this message have been removed]