Bpm 4gl Blank Title 70328

Dale, I put a simple example in one of my messages:

Get the part's partdescription field in the Character01 field of the Job Head table


For Each ttJobHead no-lock:
Find Part where Part.Partnum = ttJobHead.JobNum no-lock no-error.
If Available Part then
Assign ttJobHead.Character 01 = Part.PartDescriptio n.
End.




________________________________
From: Dale R. Kalsow <dale.r.kalsow@...>
To: vantage@yahoogroups.com
Sent: Friday, October 31, 2008 1:04:42 PM
Subject: [Vantage] bpm 4gl


Does anyone have an example of a BMP that uses 4GL to set a field equal
to a different field in a different table?

Thanks in advance!

Dale

[Non-text portions of this message have been removed]






[Non-text portions of this message have been removed]
We are looking for a Vantage Consultant to be utilized on an 'as-needed' basis , in the New England area.

We're a small-to-medium manufacturer ( 100 or so employees with over-seas sales locations) located in southeastern Massachusetts.
We are currently running Vantage 6.10.541 , multi-company, and would like someone to advise us on solutions to system / business challenges.

Reply to this group, and/or:

bjackson@...

Thank you,
Bill Jackson
Does anyone have an example of a BMP that uses 4GL to set a field equal
to a different field in a different table?



Thanks in advance!



Dale



[Non-text portions of this message have been removed]
I have a BPM that pulls the cost of a (purchased, not manufactured)
Part and works out the margin, whenever a new line is entered onto a
Sales Order. It might give you somewhere to start.

The BPM is a Pre-Processing Directive created against the
SalesOrder.Update BO. There's no conditions, and the only action is
to "synchronously execute 4GL ( as below...) record nothing".

4GL Code:

Find first ttOrderDtl where ttOrderDtl.RowMod = 'A' or
ttOrderDtl.RowMod = 'U' NO-LOCK NO-ERROR.
If available ttOrderDtl then do:
DEFINE VARIABLE UnitCost AS DECIMAL NO-UNDO.
DEFINE VARIABLE Margin as DECIMAL NO-UNDO.
DEFINE VARIABLE UnitDisc as DECIMAL NO-UNDO.
UnitCost=0.
Margin=0.
UnitDisc=0.
Find PartCost WHERE ttOrderDtl.Company = PartCost.Company AND
ttOrderDtl.PartNum = PartCost.PartNum NO-LOCK.
if available PartCost then do:
UnitCost = PartCost.AvgLaborCost +
PartCost.AvgBurdenCost + PartCost.AvgMaterialCost +
PartCost.AvgSubContCost + PartCost.AvgMtlBurCost.
UnitDisc = ttOrderDtl.Discount / ttOrderDtl.OrderQty.
Margin = (ttOrderDtl.UnitPrice - UnitCost -
UnitDisc) / (ttOrderDtl.UnitPrice - UnitDisc) * 100.
Assign ttOrderDtl.Number01 = UnitCost.
Assign ttOrderDtl.Number02 = Margin.
end.
end.




--- In vantage@yahoogroups.com, "Dale R. Kalsow" <dale.r.kalsow@...>
wrote:
>
> Does anyone have an example of a BMP that uses 4GL to set a field
equal
> to a different field in a different table?
>
>
>
> Thanks in advance!
>
>
>
> Dale
>
>
>
> [Non-text portions of this message have been removed]
>