Help with a BPM

Carl,



If something is not working, I'd suggest putting in some displays so you can
see which code is and is not getting executed:



find first ttlaborhed where ttlaborhed.rowmod="U" no-lock no-error.
if available ttlaborhed then do:

message "found laborhed: " + string(ttlaborhed.laborhedseq).
find first ttlabordtl where (ttlabordtl.RowMod = "U" or ttlabordtl.rowmod =
"A") and ttlaborhed.LaborHedSeq = ttlabordtl.LaborHedSeq no-lock no-error.
if available ttlabordtl then do:
message "found labordtl: " + string(ttlaborhed.labordtlseq).
etc...



(not sure if I have fieldnames correct, but you get the picture.)

Once you run this, check the log files and see where it gets. If you're not
seeing anything, take the "where rowmod" conditions off, and add the rowmod
to the message statement ("found laborhed " + ttlaborhed.rowmod) so you can
see what's there.



This won't fix your problem, but will hopefully narrow it down to where the
problem lies.



HTH.



Kevin Simon

SimsTrak Consulting



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
CarlH
Sent: Tuesday, July 27, 2010 4:17 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Help with a BPM





I am trying to verify that quantity reports on each job operation doe snot
exceed original job quantity.

The code I am using for the exception in BO Labor->Update is below but
doesn't work.

Can anybody suggest what is wrong?

find first ttlaborhed where ttlaborhed.rowmod="U" no-lock no-error.
if available ttlaborhed then do:
find first ttlabordtl where (ttlabordtl.RowMod = "U" or ttlabordtl.rowmod =
"A") and ttlaborhed.LaborHedSeq = ttlabordtl.LaborHedSeq no-lock no-error.
if available ttlabordtl then do:

find first joboper where joboper.JobNum=ttlabordtl.JobNum and
joboper.OprSeq= ttlabordtl.OprSeq no-lock no-error.
if available joboper and joboper.QtyCompleted < joboper.RunQty and
joboper.QtyCompleted + ttlabordtl.LaborQty > joboper.RunQty then do:

{&CALL_DESIGNED_CONDITIONS}

end. /* end test with joboper */
end. /* end ttlbaordtl avaiable */
end. /* end ttlaborhed available */





[Non-text portions of this message have been removed]
I am trying to verify that quantity reports on each job operation doe snot exceed original job quantity.

The code I am using for the exception in BO Labor->Update is below but doesn't work.

Can anybody suggest what is wrong?

find first ttlaborhed where ttlaborhed.rowmod="U" no-lock no-error.
if available ttlaborhed then do:
find first ttlabordtl where (ttlabordtl.RowMod = "U" or ttlabordtl.rowmod = "A") and ttlaborhed.LaborHedSeq = ttlabordtl.LaborHedSeq no-lock no-error.
if available ttlabordtl then do:

find first joboper where joboper.JobNum=ttlabordtl.JobNum and joboper.OprSeq= ttlabordtl.OprSeq no-lock no-error.
if available joboper and joboper.QtyCompleted < joboper.RunQty and
joboper.QtyCompleted + ttlabordtl.LaborQty > joboper.RunQty then do:


{&CALL_DESIGNED_CONDITIONS}

end. /* end test with joboper */
end. /* end ttlbaordtl avaiable */
end. /* end ttlaborhed available */
At first glance I think I might see a potential issue. Don't know for
sure because I don't have the BPM in front of me.



find first ttlaborhed where ttlaborhed.rowmod="U" no-lock no-error.

If your only recording a labor transaction, would ttlaborhed be changed?
It could be that it is failing right away because there are no records
with rowmod = 'U'



I would stick several info message boxes in your code to debug and
determine where it is failing.







From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of CarlH
Sent: Tuesday, July 27, 2010 4:17 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Help with a BPM





I am trying to verify that quantity reports on each job operation doe
snot exceed original job quantity.

The code I am using for the exception in BO Labor->Update is below but
doesn't work.

Can anybody suggest what is wrong?

find first ttlaborhed where ttlaborhed.rowmod="U" no-lock no-error.
if available ttlaborhed then do:
find first ttlabordtl where (ttlabordtl.RowMod = "U" or
ttlabordtl.rowmod = "A") and ttlaborhed.LaborHedSeq =
ttlabordtl.LaborHedSeq no-lock no-error.
if available ttlabordtl then do:

find first joboper where joboper.JobNum=ttlabordtl.JobNum and
joboper.OprSeq= ttlabordtl.OprSeq no-lock no-error.
if available joboper and joboper.QtyCompleted < joboper.RunQty and
joboper.QtyCompleted + ttlabordtl.LaborQty > joboper.RunQty then do:

{&CALL_DESIGNED_CONDITIONS}

end. /* end test with joboper */
end. /* end ttlbaordtl avaiable */
end. /* end ttlaborhed available */




[Non-text portions of this message have been removed]