Epicor 9 - 9.05.605 - Help with BPM

I did move it to pre-processing but, it is still writing a labor record.

 

 

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, September 24, 2014 9:33 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Epicor 9 - 9.05.605 - Help with BPM

 

 

If you want to prevent the transaction you would have to move it to a pre-processing directive.

Doing so sometimes requires a bit of rewriting as the data currently in the temp-tables (tt*) will not yet be in the database (tables without tt).

After taking a quick look at your routine, I think you will be OK just moving it to the "pre".

Cheers!

Chris Heins
Enterprise Programmer/Analyst
PNY Technologies, Inc.
[Description: Description: cid:image001.jpg@01CA473E.14A061C0]
p: 973.560.5370
m: 908.256.3662
e: cheins@...<mailto:cheins@...>
w: www.pny.com<http://www.pny.com/>

__________________________________________________________
NOT INTENDED AS A SUBSTITUTE FOR A WRITING
NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO, SHALL CONSTITUTE A BINDING CONTRACT, OR ANY CONTRACTUAL OBLIGATION BY PNY, OR ANY INTENT TO ENTER INTO ANY BINDING OBLIGATIONS, NOTWITHSTANDING ANY ENACTMENT OF THE UNIFORM ELECTRONIC TRANSACTIONS ACT, THE FEDERAL E-SIGN ACT, OR ANY OTHER STATE OR FEDERAL LAW OF SIMILAR SUBSTANCE OR EFFECT. THIS EMAIL MESSAGE, ITS CONTENTS AND ATTACHMENTS ARE NOT INTENDED TO REPRESENT AN OFFER OR ACCEPTANCE OF AN OFFER TO ENTER INTO A CONTRACT. NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO SHALL ALTER THIS DISCLAIMER.
This e-mail message from PNY Technologies, Inc. (http://www.pny.com) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

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

I know this topic has been discussed before but, I am having trouble with a BPM I wrote.  In MES, End Activity, I would like this BPM to stop a user when the current quantity being reported plus the quantity already completed is greater than the run quantity.

I get a pop up error but, it doesn't stop the labor transaction.  After I hit the can button, it still report the labor transaction.

It is on Labor Update - Post Processing.

How can I just stop this transaction?

Code is below.

*********************************************************************************************************


define variable msg as character no-undo.
define variable vTotalOpQuantity as decimal no-undo.

Assign vTotalOpQuantity  = 0.

For each ttLaborDtl no-lock.

Find first JobOper where JobOper.Company = ttLaborDtl.Company
                   and   JobOper.JobNum = ttLaborDtl.JobNum
                   and   JobOper.AssemblySeq = ttLaborDtl.AssemblySeq
                   and   JobOPer.OprSeq = ttLaborDtl.OprSeq.

Assign vTotalOpQuantity = ttLaborDtl.LaborQty + JobOper.QtyCompleted.

IF vTotalOpQuantity > JobOper.RunQty THEN DO:


  {lib/PublishEx.i &ExMsg = "'You cannot report more than the quantity required by the job.'"}
  {&THROW_PUBLIC}.

End.


               

End.


This is one I got from the group from Rob Bucek

 

Greg

 

Preprocess method directive Labor.Update 

Condition: Number of rows in <your> query is not less than 1 

For Each ttLaborDtl where ttLaborDtl.RowMod = 'U' and ttLaborDtl.LaborType = 'P' and ttLaborDtl.LaborQty > 0 

Action: Synchronously Execute 4GL Code 

 

/* Stopping Over Reporting of Production Quantities */

 

For each ttLaborDtl where ttLaborDtl.RowMod = 'U' no-lock.

 

     Find First JobOper Where JobOper.Company = ttLaborDtl.Company and JobOper.JobNum = ttLaborDtl.JobNum and JobOper.AssemblySeq = ttLaborDtl.AssemblySeq and

     JobOper.OprSeq = ttLaborDtl.OprSeq no-lock no-error.

    

       If avail JobOper Then Do:

      

       If JobOper.QtyCompleted + ttLaborDtl.LaborQty > JobOper.RunQty and ttLaborDtl.EnableRequestMove = yes Then DO:

      

       {lib/PublishEx.i &ExMsg = "'There are already ' + String(JobOper.QtyCompleted)  + ' complete. The operation required quantity is ' +

       String(JobOper.RunQty) + '. You entered a quantity of ' +  String(ttLaborDtl.LaborQty) + ' this will result in over reported quantities.'"}.

      

       assign ttLaborDtl.LaborQty = 0.

      

       End.

    

     End.

    

     Else.

    

     Find First labordtl where labordtl.company = ttlabordtl.company and labordtl.LaborDtlSeq = ttLaborDtl.LaborDtlSeq no-lock no-error.

    

       if avail LaborDtl Then DO:

      

                Define Variable oldLaborQty as integer no-undo.

      

                assign oldLaborQty = LaborDtl.LaborQty.

      

                If (JobOper.QtyCompleted - oldLaborQty) + ttLaborDtl.LaborQty > JobOper.RunQty  and ttLaborDtl.EnableRequestMove = no Then DO:

      

       {lib/PublishEx.i &ExMsg = "'There are already ' + String(JobOper.QtyCompleted)  + ' complete. The operation required quantity is ' +

       String(JobOper.RunQty) + '. You entered a quantity of' +  String(ttLaborDtl.LaborQty) + ' this will result in over reported quantities.'"}.

      

       assign ttLaborDtl.LaborQty = 0.

      

       End.

    

     End.

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Tuesday, September 23, 2014 6:57 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Epicor 9 - 9.05.605 - Help with BPM

 

 

I know this topic has been discussed before but, I am having trouble with a BPM I wrote.  In MES, End Activity, I would like this BPM to stop a user when the current quantity being reported plus the quantity already completed is greater than the run quantity.

I get a pop up error but, it doesn't stop the labor transaction.  After I hit the can button, it still report the labor transaction.

It is on Labor Update - Post Processing.

How can I just stop this transaction?

Code is below.

*********************************************************************************************************

 

define variable msg as character no-undo.
define variable vTotalOpQuantity as decimal no-undo.

Assign vTotalOpQuantity  = 0.

For each ttLaborDtl no-lock.

Find first JobOper where JobOper.Company = ttLaborDtl.Company
       & nbsp;           and   JobOper.JobNum = ttLaborDtl.JobNum
                   and   JobOper.AssemblySeq = ttLaborDtl.AssemblySeq
                   and   JobOPer.OprSeq = ttLaborDtl.OprSeq.

Assign vTotalOpQuantity = ttLaborDtl.LaborQty + JobOper.QtyCompleted.

IF vTotalOpQuantity > JobOper.RunQty THEN DO:


  {lib/PublishEx.i &ExMsg = "'You cannot report more than the quantity required by the job.'"}
  {&THROW_PUBLIC}.

End.


               

End.

 



CONFIDENTIALITY NOTICE

The information contained in this communication, including attachments, is privileged and confidential. It is intended only for the exclusive use of the addressee. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us at 727-578-6280 and immediately delete the communication.

"This (document/presentation) may contain technical data as defined in the International Traffic In Arms Regulations (ITAR) 22 CFR 120.10. Export of this material is restricted by the Arms Export Control Act (22 U.S.C. 2751 et seq.) and may not be exported to foreign persons without prior approval form the U.S. Department of State."

You need to catch it on Pre Proc. At Post Proc it's too late; it's already been written.

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Tuesday, September 23, 2014 6:57 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Epicor 9 - 9.05.605 - Help with BPM

 

 

I know this topic has been discussed before but, I am having trouble with a BPM I wrote.  In MES, End Activity, I would like this BPM to stop a user when the current quantity being reported plus the quantity already completed is greater than the run quantity.

I get a pop up error but, it doesn't stop the labor transaction.  After I hit the can button, it still report the labor transaction.

It is on Labor Update - Post Processing.

How can I just stop this transaction?

Code is below.

*********************************************************************************************************

 

define variable msg as character no-undo.
define variable vTotalOpQuantity as decimal no-undo.

Assign vTotalOpQuantity  = 0.

For each ttLaborDtl no-lock.

Find first JobOper where JobOper.Company = ttLaborDtl.Company
                   and   JobOper.JobNum = ttLaborDtl.JobNum
                   and   JobOper.AssemblySeq = ttLaborDtl.AssemblySeq
                   and   JobOPer.OprSeq = ttLaborDtl.OprSeq.

Assign vTotalOpQuantity = ttLaborDtl.LaborQty + JobOper.QtyCompleted.

IF vTotalOpQuantity > JobOper.RunQty THEN DO:


  {lib/PublishEx.i &ExMsg = "'You cannot report more than the quantity required by the job.'"}
  {&THROW_PUBLIC}.

End.


               

End.

 

If you want to prevent the transaction you would have to move it to a pre-processing directive.

Doing so sometimes requires a bit of rewriting as the data currently in the temp-tables (tt*) will not yet be in the database (tables without tt).

After taking a quick look at your routine, I think you will be OK just moving it to the "pre".

Cheers!

Chris Heins
Enterprise Programmer/Analyst
PNY Technologies, Inc.
[Description: Description: cid:image001.jpg@01CA473E.14A061C0]
p: 973.560.5370
m: 908.256.3662
e: cheins@...<mailto:cheins@...>
w: www.pny.com<http://www.pny.com/>

_________________________________________________________________________________________________________
NOT INTENDED AS A SUBSTITUTE FOR A WRITING
NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO, SHALL CONSTITUTE A BINDING CONTRACT, OR ANY CONTRACTUAL OBLIGATION BY PNY, OR ANY INTENT TO ENTER INTO ANY BINDING OBLIGATIONS, NOTWITHSTANDING ANY ENACTMENT OF THE UNIFORM ELECTRONIC TRANSACTIONS ACT, THE FEDERAL E-SIGN ACT, OR ANY OTHER STATE OR FEDERAL LAW OF SIMILAR SUBSTANCE OR EFFECT. THIS EMAIL MESSAGE, ITS CONTENTS AND ATTACHMENTS ARE NOT INTENDED TO REPRESENT AN OFFER OR ACCEPTANCE OF AN OFFER TO ENTER INTO A CONTRACT. NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO SHALL ALTER THIS DISCLAIMER.
This e-mail message from PNY Technologies, Inc. (http://www.pny.com) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.


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

I moved it to Pre Processing.   Message pop up – hit cancel. Still wrote a labor record – however the labor quantity is 0.

 

The job is still in the window in the MES.

 

At cancel – it should not write a labor record.

 

How can this be stopped.

 

Thanks,

Cathy

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, September 24, 2014 5:53 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Epicor 9 - 9.05.605 - Help with BPM

 

 

You need to catch it on Pre Proc.  At Post Proc it's too late; it's already been written.

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Tuesday, September 23, 2014 6:57 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Epicor 9 - 9.05.605 - Help with BPM

 

 

I know this topic has been discussed before but, I am having trouble with a BPM I wrote.  In MES, End Activity, I would like this BPM to stop a user when the current quantity being reported plus the quantity already completed is greater than the run quantity.

I get a pop up error but, it doesn't stop the labor transaction.  After I hit the can button, it still report the labor transaction.

It is on Labor Update - Post Processing.

How can I just stop this transaction?

Code is below.

*********************************************************************************************************

 

define variable msg as character no-undo.
define variable vTotalOpQuantity as decimal no-undo.

Assign vTotalOpQuantity  = 0.

For each ttLaborDtl no-lock.

Find first JobOper where JobOper.Company = ttLaborDtl.Company
                   and   JobOper.JobNum = ttLaborDtl.JobNum
                   and   JobOper.AssemblySeq = ttLaborDtl.AssemblySeq
                   and   JobOPer.OprSeq = ttLaborDtl.OprSeq.

Assign vTotalOpQuantity = ttLaborDtl.LaborQty + JobOper.QtyCompleted.

IF vTotalOpQuantity > JobOper.RunQty THEN DO:


  {lib/PublishEx.i &ExMsg = "'You cannot report more than the quantity required by the job.'"}
  {&THROW_PUBLIC}.

End.


               

End.