SalesOrder - update OrderRel.Make BPM

>>License
Now that you mention it...
I had forgotten all about this.

I received the license a while back when looking at ways to lock PO Releases
but... only added the license to a test system.



Thanks

I am trying to update the OrderRel.Make field to FALSE when a new line is created.  I think part of the problem I am having is that the OrderRel is not created until the OrderDtl record is saved.

 

I have tried the following and it's not working:

1.  created method directive, using SalesOrder.Update

2. Pre-Processing: condition - the ttOrderRel.Make field has been changed from any to any

3.  Pre-Processing - action - enable dependent post process directives

4.  Post-Processing - condition - this directive has been enabled from the MakeDirect directive

5.  Post-Processing - action - synchronously execute ABL ....(see below.....) for each record call. 

Here is the ABL:

FOR EACH ttOrderRel no-lock,

EACH OrderRel WHERE (OrderRel.Company = ttOrderRel.Company)

AND (OrderRel.OrderNum = ttOrderRel.OrderNum)

AND (OrderRel.OrderLine = ttOrderRel.OrderLine):

  ASSIGN ttOrderRel.Make = FALSE.

END.

 

When I add a new line to an order and save, the orderrel.make field is still set to TRUE.  I need this to fire on all parts.  We ship some non-stock parts, and we have a problem with unfirm jobs trying to link to a pack, so we want to uncheck this field when we create the sales order.

 

Thanks for your help.

 

I was able to get it working with a Data Directive – In-Transaction on the Orderrel table. 

 

>>I was able to get it working with a Data Directive – In-Transaction on the Orderrel table.
Any idea how to handle something like this in V8?
Unfortunately Data Directives aren't available in that version.
#ygrps-yiv-1998872293 P.ygrps-yiv-1998872293ce387540-7764-462c-979a-97379ccda45c { MARGIN:0cm 0cm 0pt;} #ygrps-yiv-1998872293 LI.ygrps-yiv-1998872293ce387540-7764-462c-979a-97379ccda45c { MARGIN:0cm 0cm 0pt;} #ygrps-yiv-1998872293 DIV.ygrps-yiv-1998872293ce387540-7764-462c-979a-97379ccda45c { MARGIN:0cm 0cm 0pt;} #ygrps-yiv-1998872293 TABLE.ygrps-yiv-1998872293ce387540-7764-462c-979a-97379ccda45cTable { MARGIN:0cm 0cm 0pt;} #ygrps-yiv-1998872293 DIV.ygrps-yiv-1998872293Section1 { }

In Version 8 the BAM can be considered the same as Data directives in version 9.

You can hence call an “alert program” which then actually updates the values as you need.

 

The problem with BAM’s are they are not holistic across all tables but they are available on OrderRel so you are in luck.

 

There is some sample code in the server/ud folder for BAMs have a read over.

 

There are still a few hoops you need to jump though, but that should get you going in the right direction at least.

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: 09 June 2014 23:09
To: vantage@yahoogroups.com
Subject: [Vantage] Re: SalesOrder - update OrderRel.Make BPM

 

 

>>I was able to get it working with a Data Directive – In-Transaction on the Orderrel table.

Any idea how to handle something like this in V8?
Unfortunately Data Directives aren't available in that version.



Stephen Edginton (Beng) | Solutions & Technical Director

Mobile:  +44 7734 858415
Main:  +44 (0) 121 314 1170
Web:  www.dotnetit.co.uk

Dot Net IT Limited, One St Kenelm Court, Steel Park Road, Halesowen, B62 8HD, United Kingdom.

DotNetIT

Epicor Platinum Partner

Epicor Alliance Partner

Hi,

>>BAM
I tried a simple BAM program below on the OrderRel table.
First on an E9 system & it was working.
V8 gives 4GL stop error on this line: Assign OrderRel.WarehouseCode = WhseCode.
Any ideas why this would work on E9 and not V8?

{ud/GlbAlert.i &TableName = "OrderRel"}
Define variable WhseCode as character no-undo.
Define variable WhseCodeDesc as character no-undo.
find first PlantWhse
Where OrderRel.Company  = PlantWhse.Company
And OrderRel.PartNum = PlantWhse.PartNum
/* And PlantWhse.WarehouseCode = "SV" no-lock no-error. */
And PlantWhse.WarehouseCode = "SV".
if avail PlantWhse
THEN DO:
Assign WhseCode = "SV".
Assign OrderRel.WarehouseCode = WhseCode.
end.
else do:
return "Cancel Send":U.
end.
Originally, 8.03 didn't allow you to directly update tables (except temp tables).  You have to use:
 
Run lib\UpdateTableBuffer.p(input BUFFER <Table>:HANDLE, '<Field>',<Value>)
 
You can get a new Open Edge license from you CAM that will allow you to directly update tables in v8.   v9 shipped with the Open Edge license that allows you to directly update tables.

Steven G.


On Wednesday, June 11, 2014 1:55 PM, "bruce.d.ordway@... [vantage]" <vantage@yahoogroups.com> wrote:


 
<div id="ygrps-yiv-558168682yiv0377706488ygrp-text" class="ygrps-yiv-558168682" style="">
  
  
  <div class="ygrps-yiv-558168682" style="">Hi,<br clear="none" class="ygrps-yiv-558168682" style=""><br clear="none" class="ygrps-yiv-558168682" style="">&gt;&gt;BAM<br clear="none" class="ygrps-yiv-558168682" style="">I tried a simple BAM program below on the OrderRel table.<br clear="none" class="ygrps-yiv-558168682" style="">First on an E9 system &amp; it was working.<br clear="none" class="ygrps-yiv-558168682" style="">V8 gives 4GL stop error on this line: Assign OrderRel.WarehouseCode = WhseCode.<br clear="none" class="ygrps-yiv-558168682" style="">Any ideas why this would work on E9 and not V8?<br clear="none" class="ygrps-yiv-558168682" style=""><br clear="none" class="ygrps-yiv-558168682" style="">{ud/GlbAlert.i &amp;TableName = &quot;OrderRel&quot;}<br clear="none" class="ygrps-yiv-558168682" style="">Define variable WhseCode as character no-undo.<br clear="none" class="ygrps-yiv-558168682" style="">Define variable WhseCodeDesc as character no-undo.<br clear="none" class="ygrps-yiv-558168682" style="">find first PlantWhse <br clear="none" class="ygrps-yiv-558168682" style="">Where OrderRel.Company&nbsp; = PlantWhse.Company <br clear="none" class="ygrps-yiv-558168682" style="">And OrderRel.PartNum =

PlantWhse.PartNum
/* And PlantWhse.WarehouseCode = "SV" no-lock no-error. */
And PlantWhse.WarehouseCode = "SV".
if avail PlantWhse
THEN DO:
Assign WhseCode = "SV".
Assign OrderRel.WarehouseCode = WhseCode.
end.
else do:
return "Cancel Send":U.
end.

</div>
 


<div style="color:#fff;height:0;" class="ygrps-yiv-558168682"></div></div>
#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488 -- #ygrps-yiv-558168682yiv0377706488ygrp-mkp { border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-mkp hr {
border:1px solid #d8d8d8;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-mkp #ygrps-yiv-558168682yiv0377706488hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-mkp #ygrps-yiv-558168682yiv0377706488ads {
margin-bottom:10px;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-mkp .ygrps-yiv-558168682yiv0377706488ad {
padding:0 0;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-mkp .ygrps-yiv-558168682yiv0377706488ad p {
margin:0;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-mkp .ygrps-yiv-558168682yiv0377706488ad a {
color:#0000ff;text-decoration:none;}
#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-sponsor #ygrps-yiv-558168682yiv0377706488ygrp-lc {
font-family:Arial;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-sponsor #ygrps-yiv-558168682yiv0377706488ygrp-lc #ygrps-yiv-558168682yiv0377706488hd {
margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-sponsor #ygrps-yiv-558168682yiv0377706488ygrp-lc .ygrps-yiv-558168682yiv0377706488ad {
margin-bottom:10px;padding:0 0;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488actions {
font-family:Verdana;font-size:11px;padding:10px 0;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488activity {
background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488activity span {
font-weight:700;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488activity span:first-child {
text-transform:uppercase;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488activity span a {
color:#5085b6;text-decoration:none;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488activity span span {
color:#ff7900;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488activity span .ygrps-yiv-558168682yiv0377706488underline {
text-decoration:underline;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 .ygrps-yiv-558168682yiv0377706488attach {
clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 .ygrps-yiv-558168682yiv0377706488attach div a {
text-decoration:none;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 .ygrps-yiv-558168682yiv0377706488attach img {
border:none;padding-right:5px;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 .ygrps-yiv-558168682yiv0377706488attach label {
display:block;margin-bottom:5px;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 .ygrps-yiv-558168682yiv0377706488attach label a {
text-decoration:none;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 blockquote {
margin:0 0 0 4px;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 .ygrps-yiv-558168682yiv0377706488bold {
font-family:Arial;font-size:13px;font-weight:700;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 .ygrps-yiv-558168682yiv0377706488bold a {
text-decoration:none;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 dd.ygrps-yiv-558168682yiv0377706488last p a {
font-family:Verdana;font-weight:700;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 dd.ygrps-yiv-558168682yiv0377706488last p span {
margin-right:10px;font-family:Verdana;font-weight:700;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 dd.ygrps-yiv-558168682yiv0377706488last p span.ygrps-yiv-558168682yiv0377706488yshortcuts {
margin-right:0;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 div.ygrps-yiv-558168682yiv0377706488attach-table div div a {
text-decoration:none;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 div.ygrps-yiv-558168682yiv0377706488attach-table {
width:400px;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 div.ygrps-yiv-558168682yiv0377706488file-title a, #ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 div.ygrps-yiv-558168682yiv0377706488file-title a:active, #ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 div.ygrps-yiv-558168682yiv0377706488file-title a:hover, #ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 div.ygrps-yiv-558168682yiv0377706488file-title a:visited {
text-decoration:none;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 div.ygrps-yiv-558168682yiv0377706488photo-title a, #ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 div.ygrps-yiv-558168682yiv0377706488photo-title a:active, #ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 div.ygrps-yiv-558168682yiv0377706488photo-title a:hover, #ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 div.ygrps-yiv-558168682yiv0377706488photo-title a:visited {
text-decoration:none;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 div#ygrps-yiv-558168682yiv0377706488ygrp-mlmsg #ygrps-yiv-558168682yiv0377706488ygrp-msg p a span.ygrps-yiv-558168682yiv0377706488yshortcuts {
font-family:Verdana;font-size:10px;font-weight:normal;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 .ygrps-yiv-558168682yiv0377706488green {
color:#628c2a;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 .ygrps-yiv-558168682yiv0377706488MsoNormal {
margin:0 0 0 0;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 o {
font-size:0;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488photos div {
float:left;width:72px;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488photos div div {
border:1px solid #666666;height:62px;overflow:hidden;width:62px;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488photos div label {
color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488reco-category {
font-size:77%;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488reco-desc {
font-size:77%;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 .ygrps-yiv-558168682yiv0377706488replbq {
margin:4px;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-actbar div a:first-child {
margin-right:2px;padding-right:5px;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-mlmsg {
font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-mlmsg table {
font-size:inherit;font:100%;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-mlmsg select, #ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 input, #ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 textarea {
font:99% Arial, Helvetica, clean, sans-serif;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-mlmsg pre, #ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 code {
font:115% monospace;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-mlmsg * {
line-height:1.22em;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-mlmsg #ygrps-yiv-558168682yiv0377706488logo {
padding-bottom:10px;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-msg p a {
font-family:Verdana;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-msg p#ygrps-yiv-558168682yiv0377706488attach-count span {
color:#1E66AE;font-weight:700;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-reco #ygrps-yiv-558168682yiv0377706488reco-head {
color:#ff7900;font-weight:700;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-reco {
margin-bottom:20px;padding:0px;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-sponsor #ygrps-yiv-558168682yiv0377706488ov li a {
font-size:130%;text-decoration:none;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-sponsor #ygrps-yiv-558168682yiv0377706488ov li {
font-size:77%;list-style-type:square;padding:6px 0;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-sponsor #ygrps-yiv-558168682yiv0377706488ov ul {
margin:0;padding:0 0 0 8px;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-text {
font-family:Georgia;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-text p {
margin:0 0 1em 0;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-text tt {
font-size:120%;}

#ygrps-yiv-558168682 #ygrps-yiv-558168682yiv0377706488 #ygrps-yiv-558168682yiv0377706488ygrp-vital ul li:last-child {
border-right:none !important;}
#ygrps-yiv-558168682