Hi,
We are currently on Vantage 8.03. I am trying to write a bpm to copy fields from QuoteDtl to OrderDtl when paste-inserting lines into a sales order.
Can anyone help me with this non-working bpm 4GL code?
My bpm for SalesOrder.GetNewOrderDtl. It doesn't work:
For each ttOrderDtl:
Find first QuoteDtl no-lock where QuoteDtl.Company = cur-comp and QuoteDtl.QuoteNum = ttOrderDtl.QuoteNum and QuoteDtl.QuoteLine = ttOrderDtl.QuoteLine no-error.
If available QuoteDtl then do:
ttOrderDtl.Character01 = QuoteDtl.Character01.
Find first OrderDtl no-lock where RowID(OrderDtl) = to-RowID (ttOrderDtl.RowIdent) no-error.
If available OrderDtl then do:
run lib\updateTableBuffer.p (input buffer OrderDtl:handle, input "Character01", input QuoteDtl.Character01).
end.
end.
end.
My bpm for Quote.CreateOrder. It works perfectly:
for each ttquotedtl:
find first orderdtl no-lock where OrderDtl.Company = CUR-COMP and OrderDtl.OrderNum = OrderNum and OrderDtl.QuoteNum = ttQuoteDtl.QuoteNum and OrderDtl.QuoteLine = ttQuoteDtl.QuoteLine no-error.
if available OrderDtl then do:
run lib\updateTableBuffer.p (input buffer OrderDtl:handle, input "Character01", input ttQuoteDtl.Character01).
end.
end.
<div id="ygrps-yiv-658037136yiv0682188917ygrp-text">
<div></div><div style="margin-top:0px;margin-bottom:0px;font-family:Arial;">Hi,<br clear="none"><br clear="none">We are currently on Vantage 8.03. I am trying to write a bpm to copy fields from QuoteDtl to OrderDtl when paste-inserting lines into a sales order.</div><div style="margin-top:0px;margin-bottom:0px;font-family:Arial;"><br clear="none"></div><div style="margin-top:0px;margin-bottom:0px;font-family:Arial;">Can anyone help me with this non-working bpm 4GL code?</div><div style="margin-top:0px;margin-bottom:0px;font-family:Arial;"><br clear="none"></div><div style="margin-top:0px;margin-bottom:0px;font-family:Arial;"><span style="text-decoration:underline;"><strong>My bpm for SalesOrder.GetNewOrderDtl. It doesn't work:</strong></span></div><div style="margin-top:0px;margin-bottom:0px;font-family:Arial;">For each ttOrderDtl:</div><div style="margin-top:0px;margin-bottom:0px;font-family:Arial;"> Find first QuoteDtl no-lock where QuoteDtl.Company = cur-comp and QuoteDtl.QuoteNum = ttOrderDtl.QuoteNum and QuoteDtl.QuoteLine = ttOrderDtl.QuoteLine no-error.</div><div style="margin-top:0px;margin-bottom:0px;font-family:Arial;"> If available QuoteDtl then do:</div><div style="margin-top:0px;margin-bottom:0px;font-family:Arial;"> ttOrderDtl.Character01 = QuoteDtl.Character01.</div><div style="margin-top:0px;margin-bottom:0px;font-family:Arial;"> Find first OrderDtl no-lock where RowID(OrderDtl) = to-RowID (ttOrderDtl.RowIdent) no-error.</div><div style="margin-top:0px;margin-bottom:0px;font-family:Arial;"> If available OrderDtl then do:</div><div style="margin-top:0px;margin-bottom:0px;font-family:Arial;"> run lib\updateTableBuffer.p (input buffer OrderDtl:handle, input "Character01", input QuoteDtl.Character01).</div><div style="margin-top:0px;margin-bottom:0px;font-family:Arial;"> end.</div><div style="margin-top:0px;margin-bottom:0px;font-family:Arial;"> end.</div><div style="margin-top:0px;margin-bottom:0px;font-family:Arial;">end.</div><div style="margin-top:0px;margin-bottom:0px;font-family:Arial;"><br clear="none"></div><div style="margin-top:0px;margin-bottom:0px;font-family:Arial;"><span style="text-decoration:underline;"><strong><br clear="none"></strong></span></div><div style="margin-top:0px;margin-bottom:0px;font-family:Arial;"><br clear="none"></div><div><span></span></div><div style="margin-top:0px;margin-bottom:0px;font-family:Arial;"><br clear="none"><span style="text-decoration:underline;"><strong>My bpm for Quote.CreateOrder. It works perfectly:</strong></span><br clear="none">for each ttquotedtl:<br clear="none"><span class="ygrps-yiv-658037136yiv0682188917Apple-tab-span" style="white-space:pre;"> </span>find first orderdtl no-lock where OrderDtl.Company = CUR-COMP and OrderDtl.OrderNum = OrderNum and OrderDtl.QuoteNum = ttQuoteDtl.QuoteNum and OrderDtl.QuoteLine = ttQuoteDtl.QuoteLine no-error.<br clear="none"><span class="ygrps-yiv-658037136yiv0682188917Apple-tab-span" style="white-space:pre;"> </span>if available OrderDtl then do:<br clear="none"><span class="ygrps-yiv-658037136yiv0682188917Apple-tab-span" style="white-space:pre;"> </span>run lib\updateTableBuffer.p (input buffer OrderDtl:handle, input "Character01", input ttQuoteDtl.Character01).<br clear="none"><span class="ygrps-yiv-658037136yiv0682188917Apple-tab-span" style="white-space:pre;"> </span>end.<br clear="none">end.</div><div><span><br clear="none" class="ygrps-yiv-658037136yiv0682188917yui-cursor"></span></div>
</div>
<div style="color:#fff;height:0;"></div></div>
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-mkp hr {
border:1px solid #d8d8d8;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-mkp #ygrps-yiv-658037136yiv0682188917hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-mkp #ygrps-yiv-658037136yiv0682188917ads {
margin-bottom:10px;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-mkp .ygrps-yiv-658037136yiv0682188917ad {
padding:0 0;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-mkp .ygrps-yiv-658037136yiv0682188917ad p {
margin:0;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-mkp .ygrps-yiv-658037136yiv0682188917ad a {
color:#0000ff;text-decoration:none;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-sponsor #ygrps-yiv-658037136yiv0682188917ygrp-lc {
font-family:Arial;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-sponsor #ygrps-yiv-658037136yiv0682188917ygrp-lc #ygrps-yiv-658037136yiv0682188917hd {
margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-sponsor #ygrps-yiv-658037136yiv0682188917ygrp-lc .ygrps-yiv-658037136yiv0682188917ad {
margin-bottom:10px;padding:0 0;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917actions {
font-family:Verdana;font-size:11px;padding:10px 0;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917activity {
background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917activity span {
font-weight:700;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917activity span:first-child {
text-transform:uppercase;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917activity span a {
color:#5085b6;text-decoration:none;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917activity span span {
color:#ff7900;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917activity span .ygrps-yiv-658037136yiv0682188917underline {
text-decoration:underline;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 .ygrps-yiv-658037136yiv0682188917attach {
clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 .ygrps-yiv-658037136yiv0682188917attach div a {
text-decoration:none;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 .ygrps-yiv-658037136yiv0682188917attach img {
border:none;padding-right:5px;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 .ygrps-yiv-658037136yiv0682188917attach label {
display:block;margin-bottom:5px;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 .ygrps-yiv-658037136yiv0682188917attach label a {
text-decoration:none;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 blockquote {
margin:0 0 0 4px;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 .ygrps-yiv-658037136yiv0682188917bold {
font-family:Arial;font-size:13px;font-weight:700;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 .ygrps-yiv-658037136yiv0682188917bold a {
text-decoration:none;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 dd.ygrps-yiv-658037136yiv0682188917last p a {
font-family:Verdana;font-weight:700;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 dd.ygrps-yiv-658037136yiv0682188917last p span {
margin-right:10px;font-family:Verdana;font-weight:700;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 dd.ygrps-yiv-658037136yiv0682188917last p span.ygrps-yiv-658037136yiv0682188917yshortcuts {
margin-right:0;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 div.ygrps-yiv-658037136yiv0682188917attach-table div div a {
text-decoration:none;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 div.ygrps-yiv-658037136yiv0682188917attach-table {
width:400px;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 div.ygrps-yiv-658037136yiv0682188917file-title a, #ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 div.ygrps-yiv-658037136yiv0682188917file-title a:active, #ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 div.ygrps-yiv-658037136yiv0682188917file-title a:hover, #ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 div.ygrps-yiv-658037136yiv0682188917file-title a:visited {
text-decoration:none;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 div.ygrps-yiv-658037136yiv0682188917photo-title a, #ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 div.ygrps-yiv-658037136yiv0682188917photo-title a:active, #ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 div.ygrps-yiv-658037136yiv0682188917photo-title a:hover, #ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 div.ygrps-yiv-658037136yiv0682188917photo-title a:visited {
text-decoration:none;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 div#ygrps-yiv-658037136yiv0682188917ygrp-mlmsg #ygrps-yiv-658037136yiv0682188917ygrp-msg p a span.ygrps-yiv-658037136yiv0682188917yshortcuts {
font-family:Verdana;font-size:10px;font-weight:normal;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 .ygrps-yiv-658037136yiv0682188917green {
color:#628c2a;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 .ygrps-yiv-658037136yiv0682188917MsoNormal {
margin:0 0 0 0;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 o {
font-size:0;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917photos div {
float:left;width:72px;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917photos div div {
border:1px solid #666666;height:62px;overflow:hidden;width:62px;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917photos div label {
color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917reco-category {
font-size:77%;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917reco-desc {
font-size:77%;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 .ygrps-yiv-658037136yiv0682188917replbq {
margin:4px;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-actbar div a:first-child {
margin-right:2px;padding-right:5px;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-mlmsg {
font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-mlmsg table {
font-size:inherit;font:100%;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-mlmsg select, #ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 input, #ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 textarea {
font:99% Arial, Helvetica, clean, sans-serif;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-mlmsg pre, #ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 code {
font:115% monospace;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-mlmsg * {
line-height:1.22em;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-mlmsg #ygrps-yiv-658037136yiv0682188917logo {
padding-bottom:10px;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-msg p a {
font-family:Verdana;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-msg p#ygrps-yiv-658037136yiv0682188917attach-count span {
color:#1E66AE;font-weight:700;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-reco #ygrps-yiv-658037136yiv0682188917reco-head {
color:#ff7900;font-weight:700;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-reco {
margin-bottom:20px;padding:0px;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-sponsor #ygrps-yiv-658037136yiv0682188917ov li a {
font-size:130%;text-decoration:none;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-sponsor #ygrps-yiv-658037136yiv0682188917ov li {
font-size:77%;list-style-type:square;padding:6px 0;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-sponsor #ygrps-yiv-658037136yiv0682188917ov ul {
margin:0;padding:0 0 0 8px;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-text {
font-family:Georgia;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-text p {
margin:0 0 1em 0;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-text tt {
font-size:120%;}
#ygrps-yiv-658037136 #ygrps-yiv-658037136yiv0682188917 #ygrps-yiv-658037136yiv0682188917ygrp-vital ul li:last-child {
border-right:none !important;}
#ygrps-yiv-658037136