BPM from EndActivity MES 409A

If the field is in the active temporary table/dataset you would use the
following line..



Assign ttLaborDtl.BurdenRate = 0. (as an example)





Rob Bucek

Production Control Manager

PH: (715) 284-5376 ext 311

Mobile: (715)896-0590

FAX: (715)284-4084

<http://www.dsmfg.com/>

(Click the logo to view our site) <http://www.dsmfg.com/>





From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Don Kollmann
Sent: Friday, October 01, 2010 4:32 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] BPM from EndActivity MES 409A





Thank You Rob

How would you intercept and update a field at this time?

Don

________________________________
From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf Of Rob Bucek
Sent: Friday, October 01, 2010 3:34 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] BPM from EndActivity MES 409A

Labor.update

Used a preprocess

Action execute 4gl code

for each ttlabordtl where ttlabordtl.rowmod = 'U' and
ttlabordtl.LaborType = 'i' no-lock.

{lib/PublishInfoMsg.i &InfoMsg = "'Indirect Labor'"}.

End.

Down and dirty but it will demonstrate functionality..

Rob Bucek

Production Control Manager

PH: (715) 284-5376 ext 311

Mobile: (715)896-0590

FAX: (715)284-4084

<http://www.dsmfg.com/>

(Click the logo to view our site) <http://www.dsmfg.com/>

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com
<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>]
On Behalf
Of Don Kollmann
Sent: Friday, October 01, 2010 3:12 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] BPM from EndActivity MES 409A

Hi Group,

What business process is called when the OK button is selected at
EndActivity in the MES
I am trying to throw an informational message based on Labor Type and
have not had any luck.

The trace appears to be labor and update but I have not gotten any
results

Thank you

Don Kollmann

ERP / IS Support

[cid:926080920@01102010-1D63]

Phone: 920-924-4050 Ext 325 / 800-236-5377

Fax: 920-924-4042

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

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

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





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

I have written a Pre-Processing BPM for the Customer.GetByCustID method. What it does is copy the description field from the SalesCat table to the ShortChar06 field in the Customer table. I am doing this because I have an EpiCombo box that has the ShortChar06 field as the description for the SalesCatID in Character01. I need the description in ShortChar06, because I'm automatically updating the SalesCatDescripion field in OrderDtl when an order is created.

The good news is that the BPM works. The bad news is that it runs painfully slow. About 35 seconds to bring up a customer record. Does anyone have an idea of how I could speed it up? Below is my code. We are running Vantge 406A.

For each Customer where Customer.Character01 = Character01.
Find first SalesCat where salescat.SalesCatID = Customer.Character01.

If available salescat then do:
run lib\updatetablebuffer.p(input buffer Customer:HANDLE,'ShortChar06',SalesCat.Description).

End.
End.

Thanks!

David Pfiester
Systems Accountant
NuStep, Inc.
734-769-3939 Ext. 150
David,



You are doing a full table scan against your customers, instead of working
with the customer record in your 'tt" dataset. You need to work with
ttCustomer dataset which is the data you are processing, not Customer, as
you are below.



Kevin Simon





From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
nustepvantage
Sent: Thursday, September 30, 2010 10:38 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Slow BPM






Hi All,

I have written a Pre-Processing BPM for the Customer.GetByCustID method.
What it does is copy the description field from the SalesCat table to the
ShortChar06 field in the Customer table. I am doing this because I have an
EpiCombo box that has the ShortChar06 field as the description for the
SalesCatID in Character01. I need the description in ShortChar06, because
I'm automatically updating the SalesCatDescripion field in OrderDtl when an
order is created.

The good news is that the BPM works. The bad news is that it runs painfully
slow. About 35 seconds to bring up a customer record. Does anyone have an
idea of how I could speed it up? Below is my code. We are running Vantge
406A.

For each Customer where Customer.Character01 = Character01.
Find first SalesCat where salescat.SalesCatID = Customer.Character01.

If available salescat then do:
run lib\updatetablebuffer.p(input buffer
Customer:HANDLE,'ShortChar06',SalesCat.Description).

End.
End.

Thanks!

David Pfiester
Systems Accountant
NuStep, Inc.
734-769-3939 Ext. 150





[Non-text portions of this message have been removed]
Put Ty in front of customer in your query. " for each ttCustomer" etc.



Terry S Ellis
Consultant
716-983-8827

Sent from my mobile device

On Sep 30, 2010, at 10:37 PM, "nustepvantage" <dpfiester@...> wrote:

>
> Hi All,
>
> I have written a Pre-Processing BPM for the Customer.GetByCustID method. What it does is copy the description field from the SalesCat table to the ShortChar06 field in the Customer table. I am doing this because I have an EpiCombo box that has the ShortChar06 field as the description for the SalesCatID in Character01. I need the description in ShortChar06, because I'm automatically updating the SalesCatDescripion field in OrderDtl when an order is created.
>
> The good news is that the BPM works. The bad news is that it runs painfully slow. About 35 seconds to bring up a customer record. Does anyone have an idea of how I could speed it up? Below is my code. We are running Vantge 406A.
>
> For each Customer where Customer.Character01 = Character01.
> Find first SalesCat where salescat.SalesCatID = Customer.Character01.
>
> If available salescat then do:
> run lib\updatetablebuffer.p(input buffer Customer:HANDLE,'ShortChar06',SalesCat.Description).
>
> End.
> End.
>
> Thanks!
>
> David Pfiester
> Systems Accountant
> NuStep, Inc.
> 734-769-3939 Ext. 150
>
>


[Non-text portions of this message have been removed]
There are a few things wrong here. The other posts are correct you are
running through your whole customer database every time you get a new
customer. Also you don't need the updatetablebuffer to make this work.
For the code below to work you would need to move the bpm to the
"Update" procedure.

BPM.s work with temporary or "tt" records. For the customer it is
ttCustomer. You can manipulate the tt record directly BEFORE it is
saved to the database, which allows you to change values and have the
update method take care of setting the values in the Customer table.
The first thing you need to do is get the current customer by finding
it's tt record. If you don't find it you can't use it. You need to
look for your tt record only when there is a change "U" or and addition
of a record "A"

FIND FIRST ttCustomer WHERE ttCustomer.Rowmod = "U" OR ttCustomer.RowMod
= "A".
IF AVAIL ttCustomer THEN
DO:
FIND FIRST SalesCat WHERE SalesCat.SalesCatID = ttCustomer.Character01
NO-LOCK NO-ERROR.
IF AVAIL SalesCat THEN
DO:
ttCustomer.ShortChar06 = SalesCat.Description.
END.
END.


The update process will now set Customer.ShortChar06


________________________________

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Terry S. Ellis
Sent: Friday, October 01, 2010 7:56 AM
To: vantage@yahoogroups.com
Cc: vantage@yahoogroups.com
Subject: Re: [Vantage] Slow BPM




Put Ty in front of customer in your query. " for each ttCustomer" etc.

Terry S Ellis
Consultant
716-983-8827

Sent from my mobile device

On Sep 30, 2010, at 10:37 PM, "nustepvantage" <dpfiester@...
<mailto:dpfiester%40nustep.com> > wrote:

>
> Hi All,
>
> I have written a Pre-Processing BPM for the Customer.GetByCustID
method. What it does is copy the description field from the SalesCat
table to the ShortChar06 field in the Customer table. I am doing this
because I have an EpiCombo box that has the ShortChar06 field as the
description for the SalesCatID in Character01. I need the description in
ShortChar06, because I'm automatically updating the SalesCatDescripion
field in OrderDtl when an order is created.
>
> The good news is that the BPM works. The bad news is that it runs
painfully slow. About 35 seconds to bring up a customer record. Does
anyone have an idea of how I could speed it up? Below is my code. We are
running Vantge 406A.
>
> For each Customer where Customer.Character01 = Character01.
> Find first SalesCat where salescat.SalesCatID = Customer.Character01.
>
> If available salescat then do:
> run lib\updatetablebuffer.p(input buffer
Customer:HANDLE,'ShortChar06',SalesCat.Description).
>
> End.
> End.
>
> Thanks!
>
> David Pfiester
> Systems Accountant
> NuStep, Inc.
> 734-769-3939 Ext. 150
>
>

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






[Non-text portions of this message have been removed]
Thanks to everyone for your input. I tried your code Mike and it worked great. I'm now more knowledgeable about how BPM's work, and now know better what not to do!

David Pfiester
Systems Accountant
NuStep Inc.
Phone: 734-769-3939 x150

--- In vantage@yahoogroups.com, "Mike Anstey" <manstey@...> wrote:
>
> There are a few things wrong here. The other posts are correct you are
> running through your whole customer database every time you get a new
> customer. Also you don't need the updatetablebuffer to make this work.
> For the code below to work you would need to move the bpm to the
> "Update" procedure.
>
> BPM.s work with temporary or "tt" records. For the customer it is
> ttCustomer. You can manipulate the tt record directly BEFORE it is
> saved to the database, which allows you to change values and have the
> update method take care of setting the values in the Customer table.
> The first thing you need to do is get the current customer by finding
> it's tt record. If you don't find it you can't use it. You need to
> look for your tt record only when there is a change "U" or and addition
> of a record "A"
>
> FIND FIRST ttCustomer WHERE ttCustomer.Rowmod = "U" OR ttCustomer.RowMod
> = "A".
> IF AVAIL ttCustomer THEN
> DO:
> FIND FIRST SalesCat WHERE SalesCat.SalesCatID = ttCustomer.Character01
> NO-LOCK NO-ERROR.
> IF AVAIL SalesCat THEN
> DO:
> ttCustomer.ShortChar06 = SalesCat.Description.
> END.
> END.
>
>
> The update process will now set Customer.ShortChar06
>
>
> ________________________________
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of Terry S. Ellis
> Sent: Friday, October 01, 2010 7:56 AM
> To: vantage@yahoogroups.com
> Cc: vantage@yahoogroups.com
> Subject: Re: [Vantage] Slow BPM
>
>
>
>
> Put Ty in front of customer in your query. " for each ttCustomer" etc.
>
> Terry S Ellis
> Consultant
> 716-983-8827
>
> Sent from my mobile device
>
> On Sep 30, 2010, at 10:37 PM, "nustepvantage" <dpfiester@...
> <mailto:dpfiester%40nustep.com> > wrote:
>
> >
> > Hi All,
> >
> > I have written a Pre-Processing BPM for the Customer.GetByCustID
> method. What it does is copy the description field from the SalesCat
> table to the ShortChar06 field in the Customer table. I am doing this
> because I have an EpiCombo box that has the ShortChar06 field as the
> description for the SalesCatID in Character01. I need the description in
> ShortChar06, because I'm automatically updating the SalesCatDescripion
> field in OrderDtl when an order is created.
> >
> > The good news is that the BPM works. The bad news is that it runs
> painfully slow. About 35 seconds to bring up a customer record. Does
> anyone have an idea of how I could speed it up? Below is my code. We are
> running Vantge 406A.
> >
> > For each Customer where Customer.Character01 = Character01.
> > Find first SalesCat where salescat.SalesCatID = Customer.Character01.
> >
> > If available salescat then do:
> > run lib\updatetablebuffer.p(input buffer
> Customer:HANDLE,'ShortChar06',SalesCat.Description).
> >
> > End.
> > End.
> >
> > Thanks!
> >
> > David Pfiester
> > Systems Accountant
> > NuStep, Inc.
> > 734-769-3939 Ext. 150
> >
> >
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
Hi Group,

What business process is called when the OK button is selected at EndActivity in the MES
I am trying to throw an informational message based on Labor Type and have not had any luck.

The trace appears to be labor and update but I have not gotten any results

Thank you


Don Kollmann

ERP / IS Support

[cid:926080920@01102010-1D63]



Phone: 920-924-4050 Ext 325 / 800-236-5377

Fax: 920-924-4042










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



Used a preprocess



Action execute 4gl code



for each ttlabordtl where ttlabordtl.rowmod = 'U' and
ttlabordtl.LaborType = 'i' no-lock.

{lib/PublishInfoMsg.i &InfoMsg = "'Indirect Labor'"}.

End.



Down and dirty but it will demonstrate functionality..



Rob Bucek

Production Control Manager

PH: (715) 284-5376 ext 311

Mobile: (715)896-0590

FAX: (715)284-4084

<http://www.dsmfg.com/>

(Click the logo to view our site) <http://www.dsmfg.com/>





From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Don Kollmann
Sent: Friday, October 01, 2010 3:12 PM
To: vantage@yahoogroups.com
Subject: [Vantage] BPM from EndActivity MES 409A






Hi Group,

What business process is called when the OK button is selected at
EndActivity in the MES
I am trying to throw an informational message based on Labor Type and
have not had any luck.

The trace appears to be labor and update but I have not gotten any
results

Thank you

Don Kollmann

ERP / IS Support

[cid:926080920@01102010-1D63]

Phone: 920-924-4050 Ext 325 / 800-236-5377

Fax: 920-924-4042

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





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

How would you intercept and update a field at this time?

Don

________________________________
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Rob Bucek
Sent: Friday, October 01, 2010 3:34 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] BPM from EndActivity MES 409A



Labor.update

Used a preprocess

Action execute 4gl code

for each ttlabordtl where ttlabordtl.rowmod = 'U' and
ttlabordtl.LaborType = 'i' no-lock.

{lib/PublishInfoMsg.i &InfoMsg = "'Indirect Labor'"}.

End.

Down and dirty but it will demonstrate functionality..

Rob Bucek

Production Control Manager

PH: (715) 284-5376 ext 311

Mobile: (715)896-0590

FAX: (715)284-4084

<http://www.dsmfg.com/>

(Click the logo to view our site) <http://www.dsmfg.com/>

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf
Of Don Kollmann
Sent: Friday, October 01, 2010 3:12 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] BPM from EndActivity MES 409A

Hi Group,

What business process is called when the OK button is selected at
EndActivity in the MES
I am trying to throw an informational message based on Labor Type and
have not had any luck.

The trace appears to be labor and update but I have not gotten any
results

Thank you

Don Kollmann

ERP / IS Support

[cid:926080920@01102010-1D63]

Phone: 920-924-4050 Ext 325 / 800-236-5377

Fax: 920-924-4042

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

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





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