BPM for locking the PORel Lock Quantity

Mark,

Data Directives do not exist in your version.  They came in version 9.

Do a search on the UpdateTableBuffer command on this group and you will find your answers.

Hope this helps,
Calvin Dekker
CodaBears

----- Reply message -----
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


Sorry for digging up an old post.

This looks exactly what I need but I cannot get it to work at all, 

Is this Epicor 9 specific code? We are on 803.405a 
What is an In Transaction Data Directive?
When using this in a BPM do you attached it to 4GL in a PreProcess directive against the PO.Update Method.

I have tried that but get errors when I click on Validate

"You may not compile programs that update the database in this version (490)
**  Could not understand line 30. (196)"


Again sorry for all the questions, it would solve a big issue here if we can automatically lock the QTY on the POReleases

Thanks in advance 

Mark Lawrence
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    ".
    {lib/publishinfomsg.i &infomsg = vSubject} .

End.

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.



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."

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."

Hello

Sorry for digging up an old post.

This looks exactly what I need but I cannot get it to work at all, 

Is this Epicor 9 specific code? We are on 803.405a 
What is an In Transaction Data Directive?
When using this in a BPM do you attached it to 4GL in a PreProcess directive against the PO.Update Method.

I have tried that but get errors when I click on Validate

"You may not compile programs that update the database in this version (490)
**  Could not understand line 30. (196)"


Again sorry for all the questions, it would solve a big issue here if we can automatically lock the QTY on the POReleases

Thanks in advance 

Mark Lawrence