BAM Creating Group Alert Messages

Rob,
 Thanks for the reply but I was still getting a number of entries filling up the alert log. Many seemed to be either from the stockroom or receiving. I suspect that they impact the POLine table and with a BAM it fires the BAM. I threw my hands up and created a BPM that I can control via a condition (if the PODetail.UnitCost field has been changed from any to any). This focuses the issue.
Â
Regards, - Karl


________________________________
From: Rob Bucek <rbucek@...>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Sent: Wednesday, March 28, 2012 12:41 PM
Subject: RE: [Vantage] BAM Creating Group Alert Messages


Â
this is an off the top of my head guess.. maybe your 'if not available partcost then return "cancel send" isn't working.. instead of return "cancel send", try

IF NOT AVAILABLE PartCost THEN
Assign SendEmail = False.

Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-0590
FAX: (715)284-4084
[Description: cid:1.234354861@...]<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 Karl Dash
Sent: Wednesday, March 28, 2012 11:50 AM
To: Vantage Group
Subject: [Vantage] BAM Creating Group Alert Messages

I have a BAM keyed on the PODetail table that issues an email if the unit cost is greater than the last good buy. I filter on the UnitCost >0. Many of these email are created BUT I am also getting messages into the Global Alerts log file in which the error is "SMTP: No Email recipients". Sure enough, the To box contains only ;;. Listed below is the BAM and I explicitly define the To recipients. I am on Progress 803.408.

/* This email alert is triggered when a PO line price is greater than the last cost */
{ud/GlbAlert.i &TableName = "PODetail"}
FIND PartCost WHERE PartCost.Company = PODetail.Company AND PartCost.PartNum = PODetail.PartNum NO-LOCK NO-ERROR.
IF NOT AVAILABLE PartCost THEN RETURN "Cancel Send".
DEFINE VARIABLE LastUnitCost AS DECIMAL.
ASSIGN LastUnitCost = (PartCost.LastMaterialCost + PartCost.LastMtlBurCost + PartCost.LastLaborCost + PartCost.LastBurdenCost + PartCost.LastSubContCost).
/* IF LastUnitCost > 0 */
IF PODetail.UnitCost > LastUnitCost AND
PODetail.XOrderQty > 0 THEN
DO:
/* Set the From: sender of the email */
ASSIGN Email-From = "vantage@...<mailto:vantage%40mycompany.com>".

/* Set the To: recipient of the email */
ASSIGN Email-To = "abc@...<mailto:abc%40mycompany.com>, xyz@...<mailto:xyz%40mycompany.com>".
/* Set the subject of the email */
ASSIGN Email-Subject = "Price increase for " +
(PODetail.PartNum) + ", " + (PODetail.LineDesc).
/* Set the body of the email */
ASSIGN Email-Text = "Please note that " + string(PODetail.XOrderQty) + " " +
(PODetail.IUM) + " of " + (PODetail.PartNum) + ", " + (PODetail.LineDesc) + ", has/have just been ordered and that the current price for this material is more than the last price paid for it. For more information, see line #" + string(PODetail.POLine) + " of purchase order #" +
string(PODetail.PONum) + ".~n~nLast Price = " + TRIM(string(LastUnitCost, "$>>>,>>>,>>9.99")) + "~nThis PO =" + TRIM(string(PODetail.UnitCost,"$>>>,>>>,>>9.99")) + ".".
END.
ELSE DO:
Return Error.
END.
--------

[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]
I have a BAM keyed on the PODetail table that issues an email if the unit cost is greater than the last good buy. I filter on the UnitCost >0. Many of these email are created BUT I am also getting messages into the Global Alerts log file in which the error is "SMTP: No Email recipients". Sure enough, the To box contains only ;;. Listed below is the BAM and I explicitly define the To recipients. I am on Progress 803.408.
Â
/* This email alert is triggered when a PO line price is greater than the last cost */
{ud/GlbAlert.i &TableName = "PODetail"}
FIND PartCost WHERE PartCost.Company = PODetail.Company AND PartCost.PartNum = PODetail.PartNum NO-LOCK NO-ERROR.
 IF NOT AVAILABLE PartCost THEN RETURN "Cancel Send".
DEFINE VARIABLE LastUnitCost AS DECIMAL.
ASSIGN LastUnitCost = (PartCost.LastMaterialCost + PartCost.LastMtlBurCost + PartCost.LastLaborCost + PartCost.LastBurdenCost + PartCost.LastSubContCost).
/* IF LastUnitCost > 0Â */
IF PODetail.UnitCost > LastUnitCost AND
  PODetail.XOrderQty > 0 THEN
DO:
/* Set the From: sender of the email */
ASSIGN Email-From = "vantage@...".

/* Set the To: recipient of the email */
ASSIGN Email-To = "abc@..., xyz@...".
/* Set the subject of the email */
ASSIGN Email-Subject = "Price increase for " +
(PODetail.PartNum) + ", " + (PODetail.LineDesc).
/* Set the body of the email */
ASSIGN Email-Text = "Please note that " + string(PODetail.XOrderQty) + " " +
(PODetail.IUM) + " of " + (PODetail.PartNum) + ", " + (PODetail.LineDesc) + ", has/have just been ordered and that the current price for this material is more than the last price paid for it. For more information, see line #" + string(PODetail.POLine) + " of purchase order #" +
string(PODetail.PONum) + ".~n~nLast Price = " + TRIM(string(LastUnitCost, "$>>>,>>>,>>9.99")) + "~nThis POÂ Â Â Â =" + TRIM(string(PODetail.UnitCost,"$>>>,>>>,>>9.99"))Â + ".".
END.
ELSE DO:
Return Error.
END.
--------

[Non-text portions of this message have been removed]
this is an off the top of my head guess.. maybe your 'if not available partcost then return "cancel send" isn't working.. instead of return "cancel send", try

IF NOT AVAILABLE PartCost THEN
Assign SendEmail = False.

Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-0590
FAX: (715)284-4084
[Description: cid:1.234354861@...]<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 Karl Dash
Sent: Wednesday, March 28, 2012 11:50 AM
To: Vantage Group
Subject: [Vantage] BAM Creating Group Alert Messages



I have a BAM keyed on the PODetail table that issues an email if the unit cost is greater than the last good buy. I filter on the UnitCost >0. Many of these email are created BUT I am also getting messages into the Global Alerts log file in which the error is "SMTP: No Email recipients". Sure enough, the To box contains only ;;. Listed below is the BAM and I explicitly define the To recipients. I am on Progress 803.408.

/* This email alert is triggered when a PO line price is greater than the last cost */
{ud/GlbAlert.i &TableName = "PODetail"}
FIND PartCost WHERE PartCost.Company = PODetail.Company AND PartCost.PartNum = PODetail.PartNum NO-LOCK NO-ERROR.
IF NOT AVAILABLE PartCost THEN RETURN "Cancel Send".
DEFINE VARIABLE LastUnitCost AS DECIMAL.
ASSIGN LastUnitCost = (PartCost.LastMaterialCost + PartCost.LastMtlBurCost + PartCost.LastLaborCost + PartCost.LastBurdenCost + PartCost.LastSubContCost).
/* IF LastUnitCost > 0 */
IF PODetail.UnitCost > LastUnitCost AND
PODetail.XOrderQty > 0 THEN
DO:
/* Set the From: sender of the email */
ASSIGN Email-From = "vantage@...<mailto:vantage%40mycompany.com>".

/* Set the To: recipient of the email */
ASSIGN Email-To = "abc@...<mailto:abc%40mycompany.com>, xyz@...<mailto:xyz%40mycompany.com>".
/* Set the subject of the email */
ASSIGN Email-Subject = "Price increase for " +
(PODetail.PartNum) + ", " + (PODetail.LineDesc).
/* Set the body of the email */
ASSIGN Email-Text = "Please note that " + string(PODetail.XOrderQty) + " " +
(PODetail.IUM) + " of " + (PODetail.PartNum) + ", " + (PODetail.LineDesc) + ", has/have just been ordered and that the current price for this material is more than the last price paid for it. For more information, see line #" + string(PODetail.POLine) + " of purchase order #" +
string(PODetail.PONum) + ".~n~nLast Price = " + TRIM(string(LastUnitCost, "$>>>,>>>,>>9.99")) + "~nThis PO =" + TRIM(string(PODetail.UnitCost,"$>>>,>>>,>>9.99")) + ".".
END.
ELSE DO:
Return Error.
END.
--------

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



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