From: "teaglem@... [vantage]" <vantage@yahoogroups.com>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Subject: [Vantage] BPM for locking the PORel Lock Quantity
Date: Wed, Jun 11, 2014 4:00 AM
Hello
Hello
Cathy,
I just put this BPM into our system yesterday and I have a In Transaction Data Directive on the PORel table. The code I used is:
FOR EACH ttPORel WHERE ttPORel.RowMod = 'A' no-lock.
CREATE ComXRef.
Assign ComXRef.Company = ttPORel.Company
ComXRef.File = 'PORel_Mapping'
ComXRef.Key1 = string(ttPORel.PONum)
ComXRef.Key2 = string(ttPORel.POLine)
ComXRef.Key3 = string(ttPORel.PORelNum)
ComXRef.foreignKey1 = 'Yes'
ComXRef.ForeignKey2 = 'Yes'.
end.
John
Cathy:
This is my DD for setting lock date and lock qty. it does go thru 4 times, but looks like it only writes to comxref on the first pass.
Greg
condition: there is at least one added row in the ttPORel table
Action : ABL
/* set lock date and qty */
/* set lock flags */
For Each ttPORel where ttPORel.Company = CUR-COMP.
message "IN POREL DD " + STRING(ttPoRel.PONum) + " Line " + string(ttPORel.POLine) + " Rel " + string(ttPORel.PORelNum).
Find ComXRef where ComXRef.Company = ttPORel.Company and ComXRef.File = "PORel_Mapping" and ComXRef.Key1 = string(ttPORel.PONum) and
ComXRef.Key2 = string(ttPORel.POLine) and ComXRef.Key3 = string(ttPORel.PORelNum) no-error.
If Not Avail ( ComXRef ) Then Do:
Create ComXRef.
ComXRef.Company = ttPORel.Company.
ComXRef.File = "PORel_Mapping".
ComXRef.Key1 = string(ttPORel.PONum).
ComXRef.Key2 = string(ttPORel.POLine).
ComXRef.Key3 = string(ttPORel.PORelNum).
End.
ComXRef.ForeignKey1 = "yes".
ComXRef.ForeignKey2 = "yes".
Release ComXRef.
End.
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
On Behalf Of cathy@...
Sent: Tuesday, December 10, 2013 6:37 PM
To: vantage@yahoogroups.com
Subject: [Vantage] BPM for locking the PORel Lock Quantity
So far I am using a In-Transaction Data Directive to lock the PORel Lock Qty since - there are 2 different ways a PO rel is added - when you add a new line it automatically adds the release and when you create a new release.
I usually start slow since I haven't really programmed for a while.
I put in Displays -
When I add a PO line and save - the display pop up 4 times for the same PO Rel.
However, when I add a new release - it only pops up 1 time.
So it seems when you add a new line - it loops -
First - is this the best way to Lock Quantities on the PO release?
If not, what is the best way to do this?
Below is my code where I have put in the displays -
*******************************************************************
define variable vSubject as character no-undo.
For each ttPORel no-lock.
assign vSubject = "Correct BO ".
{l ib/publishinfomsg.i &infomsg = vSubject} .
End.
Thank all for answering my question.
Cathy B.
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Greg Payne
Sent: Wednesday, December 11, 2013 8:02 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] BPM for locking the PORel Lock Quantity
Cathy:
This is my DD for setting lock date and lock qty. it does go thru 4 times, but looks like it only writes to comxref on the first pass.
Greg
condition: there is at least one added row in the ttPORel table
Action : ABL
/* set lock date and qty */
/* set lock flags */
For Each ttPORel where ttPORel.Company = CUR-COMP.
message "IN POREL DD " + STRING(ttPoRel.PONum) + " Line " + string(ttPORel.POLine) + " Rel " + string(ttPORel.PORelNum).
Find ComXRef where ComXRef.Company = ttPORel.Company and ComXRef.File = "PORel_Mapping" and ComXRef.Key1 = string(ttPORel.PONum) and
ComXRef.Key2 = string(ttPORel.POLine) and ComXRef.Key3 = string(ttPORel.PORelNum) no-error.
If Not Avail ( ComXRef ) Then Do:
Create ComXRef.
ComXRef.Company = ttPORel.Company.
ComXRef.File = "PORel_Mapping".
ComXRef.Key1 = string(ttPORel.PONum).
ComXRef.Key2 = string(ttPORel.POLine).
ComXRef.Key3 = string(ttPORel.PORelNum).
End.
ComXRef.ForeignKey1 = "yes".
ComXRef.ForeignKey2 = "yes".
Release ComXRef.
End.
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of cathy@...
Sent: Tuesday, December 10, 2013 6:37 PM
To: vantage@yahoogroups.com
Subject: [Vantage] BPM for locking the PORel Lock Quantity
So far I am using a In-Transaction Data Directive to lock the PORel Lock Qty since - there are 2 different ways a PO rel is added - when you add a new line it automatically adds the release and when you create a new release.
I usually start slow since I haven't really programmed for a while.
I put in Displays -
When I add a PO line and save - the display pop up 4 times for the same PO Rel.
However, when I add a new release - it only pops up 1 time.
So it seems when you add a new line - it loops -
First - is this the best way to Lock Quantities on the PO release?
If not, what is the best way to do this?
Below is my code where I have put in the displays -
*******************************************************************
define variable vSubject as character no-undo.
For each ttPORel no-lock.
assign vSubject = "Correct BO ".
{l ib/publishinfomsg.i &infomsg = vSubject} .
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."