PO Notifications

I have the same license as you. I'll send you my BPM package.

-bws

--
Brian W. Spolarich ~ Manager, Information Services ~ Advanced Photonix / Picometrix
    bspolarich@... ~ 734-864-5618 ~ www.advancedphotonix.com


-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Karl Dash
Sent: Tuesday, September 15, 2009 5:02 PM
To: Vantage Group
Subject: [Vantage] PO Notifications

All,

I've been trying to send this message many times without success. I apologize if it has indeed been listed.

Brian,
Step 3 is driving me nuts. It is SO simple but my BPM is not firing. Since I am at the PO Processing program and it is updating the POApvMsg table (during Base Processing), this BPM should be getting executed during Post Processing, but it isn't. The message in the action doesn't show in the server log BUT the POApvMsg file IS being updated because I have a Crystal report open at the same time that is monitoring that table and MsgType pops up with '1'.
Is it possible that since I don't have the professional version of the Progress license, I have no access to tables that are not in focus?
Thanks,
-Karl
***************************************************

RE: [Vantage] Re: Proper PO Notifications
Tuesday, September 1, 2009 7:19:10 AM
From: Brian W. Spolarich <bspolarich@...>View Contact
To: vantage@yahoogroups.comÂ
Here's what I wound up doing:
1. Save the below 4GL code API-POApprovalNotif ication.p as a .P file under mfgsys803\server\ ud\ with whatever name you want.
2. Create a BAM on POHeader watching for changes in ApprovalStatus and ShortChar01. Add rules, For Alert, where ApprovalStatus <> U or ShortChar01 <> "".
3. Create a BPM as follows:
- POApvMsg.Update, Post-Processing
- Condition: Number of Rows in 'GetApvMsg' query is not lets than one
- Query: for each ttPOApvMsg where ttPOApvMsg.MsgType = '1' no-lock
- Action: Synchronously execute 4GL Action with code below, record nothing
- Code:
find ttPOApvMsg.
for each ttPOApvMsg no-lock:
message "ttPOApvMsg. PONum: " + string(ttPOApvMsg. PONum) + "~n".
find first POHeader where POHeader.Company = ttPOApvMsg.Company and POHeader.PONum = ttPOApvMsg.PONum no-lock.
define variable ApprovalChain as character no-undo.
ApprovalChain = POHeader.ShortChar0 1 + "/" + ttPOApvMsg.MsgTo.
run lib\UpdateTableBuff er.p(input BUFFER POHeader:HANDLE, 'ShortChar01' ,ApprovalChain) .
end.
That's it.
The point here is that without the BPM you have no way that I could figure out how to detect when the up-level approval notification has been generated, so you'd only get an e-mail from the BAM from the initial PO approval request, not the subsequent ones. With the BPM I modify a ShortChar field in the POHeader table appending the next approver. The data is irrelevant, as long as the field changes, and thus the BAM gets triggered. This notification program sends e-mail to each approver in series (assuming their Buyer record has an e-mail address), and the requestor Buyer indicating the final disposition (approve or reject) of the PO approval request.
I needed to use a BAM because I didn't think one could use a BPM 4GL action to send e-mail. However I saw something about this come across the list recently (although I apparently didn't save it and given how badly the search works in this Yahoo! Group not sure if I can find it again), so I think you could do this entirely as a BPM if you wanted to keep it cleaner. It seems to me that one should be able to do everything in a BPM that one can do in a BAM.





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



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
All,

I've been trying to send this message many times without success. I apologize if it has indeed been listed.

Brian,
Step 3 is driving me nuts. It is SO simple but my BPM is not firing. Since I am at the PO Processing program and it is updating the POApvMsg table (during Base Processing), this BPM should be getting executed during Post Processing, but it isn't. The message in the action doesn't show in the server log BUT the POApvMsg file IS being updated because I have a Crystal report open at the same time that is monitoring that table and MsgType pops up with '1'.
Is it possible that since I don't have the professional version of the Progress license, I have no access to tables that are not in focus?
Thanks,
-Karl
***************************************************

RE: [Vantage] Re: Proper PO Notifications
Tuesday, September 1, 2009 7:19:10 AM
From: Brian W. Spolarich <bspolarich@...>View Contact
To: vantage@yahoogroups.comÂ
Here's what I wound up doing:
1. Save the below 4GL code API-POApprovalNotif ication.p as a .P file under mfgsys803\server\ ud\ with whatever name you want.
2. Create a BAM on POHeader watching for changes in ApprovalStatus and ShortChar01. Add rules, For Alert, where ApprovalStatus <> U or ShortChar01 <> "".
3. Create a BPM as follows:
- POApvMsg.Update, Post-Processing
- Condition: Number of Rows in 'GetApvMsg' query is not lets than one
- Query: for each ttPOApvMsg where ttPOApvMsg.MsgType = '1' no-lock
- Action: Synchronously execute 4GL Action with code below, record nothing
- Code:
find ttPOApvMsg.
for each ttPOApvMsg no-lock:
message "ttPOApvMsg. PONum: " + string(ttPOApvMsg. PONum) + "~n".
find first POHeader where POHeader.Company = ttPOApvMsg.Company and POHeader.PONum = ttPOApvMsg.PONum no-lock.
define variable ApprovalChain as character no-undo.
ApprovalChain = POHeader.ShortChar0 1 + "/" + ttPOApvMsg.MsgTo.
run lib\UpdateTableBuff er.p(input BUFFER POHeader:HANDLE, 'ShortChar01' ,ApprovalChain) .
end.
That's it.
The point here is that without the BPM you have no way that I could figure out how to detect when the up-level approval notification has been generated, so you'd only get an e-mail from the BAM from the initial PO approval request, not the subsequent ones. With the BPM I modify a ShortChar field in the POHeader table appending the next approver. The data is irrelevant, as long as the field changes, and thus the BAM gets triggered. This notification program sends e-mail to each approver in series (assuming their Buyer record has an e-mail address), and the requestor Buyer indicating the final disposition (approve or reject) of the PO approval request.
I needed to use a BAM because I didn't think one could use a BPM 4GL action to send e-mail. However I saw something about this come across the list recently (although I apparently didn't save it and given how badly the search works in this Yahoo! Group not sure if I can find it again), so I think you could do this entirely as a BPM if you wanted to keep it cleaner. It seems to me that one should be able to do everything in a BPM that one can do in a BAM.





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