BPM - Update PORel question

If your procedures require users to open the generated PO in Purchase Order Entry, you may be able to do what is needed on the GETBYID when the PO is retreived, then flag the PO as updated.

I've done similar with the Create Sales Order from Quote Entry. User defined fields that are noramally updated during Sales Order Entry are updated the first time the Sales Order is retreived, then I flag to Sales Order as Updated. Our internal procedures require the Sales Order to be retreived to print the sales order acknowledgement and warehouse paperwork, this forces the update.

--- In vantage@yahoogroups.com, "cooner_55421" <cooner_55421@...> wrote:
>
> Hi,
>
> The example provided by bw2868bond does indeed work for me when I manually created PO's. Thanks for getting me this far!
>
> Unfortunately, I'm still faced with an issue.
> This BPM does not work when using the PO Suggestion Entry screen and "Actions" to automatically "Generate Purchase Orders".
>
> Any ideas? Thanks...
>
> > Don't know about cooner_55421, but we are 8.03.405a - no data directives for me :(
> 8.03.409C
>
What is your action? Modifying fields, sending a warning message or error or something else?



-----Original Message-----
From: cooner_55421 <cooner_55421@...>
Sent: Monday, January 03, 2011 3:57 PM
To: vantage@yahoogroups.com <vantage@yahoogroups.com>
Subject: [Vantage] BPM - Update PORel question



Hi,

I tried adding a BPM method directive to PO - GetNewPORel.
It works on a new manually created PO Release but...

I really wanted it to take effect from the New PO Suggestion screen action "Generate Purchase Orders".

When I tried this, I ran into a problem:
New PO's created by the action are "Approved" and...
PORel can't be updated while the PO is approved.

Any ideas how I might handle this?

Thanks
and this code continues to haunt me.....
When ever a new po line is created, Vantage tries to be helpful and creates the first release without using any of the methods available to be used in a BPM

Normally you would set the field values in a pre process BPM and then they would be set when the data comes back to the UI. But in this case you can't do that because the ttPORel data doesn't exist yet.

So I use the Update Method and perform 2 different checks PreProcess

First condition = number of rows in query not less than than 1 (query = for each ttpodetail where ttpodetail.RowMod = 'A')
or
Second Condition = number of rows in query not less than 1 (query = for each ttporel where ttporel.RowMod = 'A')

Action is enable post process directives

post process directive condition is enabled by pre process directive
and there are 2 Actions
First action: set the PORel.LockQty field of all rows to the True value
Second action: and synchronously execute 4GL for each ttporel. ... record nothing

4GL: for each ttporel.

create COMxref.
assign COMxref.company = "<your company>"
COMxref.file = "PORel_Mapping"
COMxref.Key1 = string(ttporel.PONum)
COMxref.Key2 = string(ttporel.POLine)
COMxref.Key3 = string(ttporel.PORelNum)
COMxref.foreignKey1 = "No"
COMxref.foreignKey2 = "Yes".

end.

--- In vantage@yahoogroups.com, "cooner_55421" <cooner_55421@...> wrote:
>
> And I found this in an old thread:
>
> >Data is stored in ComXRef table
> >COMxref.company = "Your Company"
> >COMxref.file = "PORel_Mapping"
> >COMxref.Key1 = string(ttporel.PONum)
> >COMxref.Key2 = string(ttporel.POLine)
> >COMxref.Key3 = string(ttporel.PORelNum)
> >COMxref.foreignKey1 = "No" (lock date field)
> >COMxref.foreignKey2 = "Yes" (lock qty field)
>
> Not sure how to apply this in a BPM.
>
> Thanks in advance...
>
Have you tried this via a data directive versus a method directive?



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
bw2868bond
Sent: Monday, January 03, 2011 9:48 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: BPM - Update PORel question





and this code continues to haunt me.....
When ever a new po line is created, Vantage tries to be helpful and creates
the first release without using any of the methods available to be used in a
BPM

Normally you would set the field values in a pre process BPM and then they
would be set when the data comes back to the UI. But in this case you can't
do that because the ttPORel data doesn't exist yet.

So I use the Update Method and perform 2 different checks PreProcess

First condition = number of rows in query not less than than 1 (query = for
each ttpodetail where ttpodetail.RowMod = 'A')
or
Second Condition = number of rows in query not less than 1 (query = for each
ttporel where ttporel.RowMod = 'A')

Action is enable post process directives

post process directive condition is enabled by pre process directive
and there are 2 Actions
First action: set the PORel.LockQty field of all rows to the True value
Second action: and synchronously execute 4GL for each ttporel. ... record
nothing

4GL: for each ttporel.

create COMxref.
assign COMxref.company = "<your company>"
COMxref.file = "PORel_Mapping"
COMxref.Key1 = string(ttporel.PONum)
COMxref.Key2 = string(ttporel.POLine)
COMxref.Key3 = string(ttporel.PORelNum)
COMxref.foreignKey1 = "No"
COMxref.foreignKey2 = "Yes".

end.

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
"cooner_55421" <cooner_55421@...> wrote:
>
> And I found this in an old thread:
>
> >Data is stored in ComXRef table
> >COMxref.company = "Your Company"
> >COMxref.file = "PORel_Mapping"
> >COMxref.Key1 = string(ttporel.PONum)
> >COMxref.Key2 = string(ttporel.POLine)
> >COMxref.Key3 = string(ttporel.PORelNum)
> >COMxref.foreignKey1 = "No" (lock date field)
> >COMxref.foreignKey2 = "Yes" (lock qty field)
>
> Not sure how to apply this in a BPM.
>
> Thanks in advance...
>





[Non-text portions of this message have been removed]
Don't know about cooner_55421, but we are 8.03.405a - no data directives for me :(

--- In vantage@yahoogroups.com, "Kevin Simon" <ksimon@...> wrote:
>
> Have you tried this via a data directive versus a method directive?
>
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> bw2868bond
> Sent: Monday, January 03, 2011 9:48 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: BPM - Update PORel question
>
>
>
>
>
> and this code continues to haunt me.....
> When ever a new po line is created, Vantage tries to be helpful and creates
> the first release without using any of the methods available to be used in a
> BPM
>
> Normally you would set the field values in a pre process BPM and then they
> would be set when the data comes back to the UI. But in this case you can't
> do that because the ttPORel data doesn't exist yet.
>
> So I use the Update Method and perform 2 different checks PreProcess
>
> First condition = number of rows in query not less than than 1 (query = for
> each ttpodetail where ttpodetail.RowMod = 'A')
> or
> Second Condition = number of rows in query not less than 1 (query = for each
> ttporel where ttporel.RowMod = 'A')
>
> Action is enable post process directives
>
> post process directive condition is enabled by pre process directive
> and there are 2 Actions
> First action: set the PORel.LockQty field of all rows to the True value
> Second action: and synchronously execute 4GL for each ttporel. ... record
> nothing
>
> 4GL: for each ttporel.
>
> create COMxref.
> assign COMxref.company = "<your company>"
> COMxref.file = "PORel_Mapping"
> COMxref.Key1 = string(ttporel.PONum)
> COMxref.Key2 = string(ttporel.POLine)
> COMxref.Key3 = string(ttporel.PORelNum)
> COMxref.foreignKey1 = "No"
> COMxref.foreignKey2 = "Yes".
>
> end.
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> "cooner_55421" <cooner_55421@> wrote:
> >
> > And I found this in an old thread:
> >
> > >Data is stored in ComXRef table
> > >COMxref.company = "Your Company"
> > >COMxref.file = "PORel_Mapping"
> > >COMxref.Key1 = string(ttporel.PONum)
> > >COMxref.Key2 = string(ttporel.POLine)
> > >COMxref.Key3 = string(ttporel.PORelNum)
> > >COMxref.foreignKey1 = "No" (lock date field)
> > >COMxref.foreignKey2 = "Yes" (lock qty field)
> >
> > Not sure how to apply this in a BPM.
> >
> > Thanks in advance...
> >
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
That action all takes place in progress code back on the server without involving the BO's that you could fire BPMs on
If you are on 9, then data directives on the PORel table might be an answer. Otherwise, if you have Service Connect, you could do a BAM on PORel and dump an xml file of to service connect to process as needed...
Unapprove, make changes, update, approve again.

--- In vantage@yahoogroups.com, "cooner_55421" <cooner_55421@...> wrote:
>
> Hi,
>
> The example provided by bw2868bond does indeed work for me when I manually created PO's. Thanks for getting me this far!
>
> Unfortunately, I'm still faced with an issue.
> This BPM does not work when using the PO Suggestion Entry screen and "Actions" to automatically "Generate Purchase Orders".
>
> Any ideas? Thanks...
>
> > Don't know about cooner_55421, but we are 8.03.405a - no data directives for me :(
> 8.03.409C
>