Has anyone ever written a Data Directive to write the pegged sales order or job number to a job during an Multi Level Pegging run?
We build all jobs to inventory before shipping but there is always a problem matching the job to what is driving the demand. I have a BPM when you get the job number with Job Entry but I haven’t had any luck with getting the demand numbers written in with a Data Directive on the Peg tables. Thanks,
I tried using PegDmdMst to move info and ended up using PartDtl instead.
Depending on how quickly you need the data on the job, you can use a sql routine once a day or every x minutes. ( below ) or something like.
For Each ttpartDtl.
For each PartDtl fields ( PartNum DueDate JobNum ) where PartDtl.Company = ttPartDtl.Company and PartDtl.Plant = ttPartDtl.Plant and
PartDtl.DueDate >= ttPartDtl.DueDate and PartDtl.PartNum = ttSugPODtl.PartNum and PartDtl.RequirementFlag = true.
For first JobHead fields ( ShortChar20 ) where JobHead.Company = ttSugPODtl.Company and JobHead.Plant = ttPartDtl.Plant and JobHead.JobNum = PartDtl.JobNum.
Assign ShortChar20 = PartDtl.JobNum.
End.
End.
End.
Greg
update JobHead
Set ShortChar20 =
–select top 1000 pd.JobNum,
isnull((select top 1 convert(varchar,pdo.OrderNum) + ‘/’+ convert(varchar,pdo.OrderLine) + ‘/’+convert(varchar,pdo.OrderRelNum) as OrderLineRel
from PartDtl pdo where pdo.PartNum=pd.PartNum and pdo.DueDate>=pd.DueDate
and pdo.SourceFile=‘OR’ and pdo.RequirementFlag=1)
,isnull((select top 1 pdm.JobNum
from PartDtl pdm where pdm.PartNum=pd.PartNum and pdm.DueDate>=pd.DueDate and pdm.SourceFile=‘JM’
and pdm.RequirementFlag=1),’’))
from PartDtl pd
inner join JobHead jh on pd.JobNum=jh.JobNum
where pd.SourceFile=‘jh’
and jh.JobReleased=1 and jh.JobComplete=0
It doesn’t change dates it looks at the next release after the job due date and matches them up. I would not use an outside sql routine to change Epicor dates. You could make a dashboard that had the job and the order/line/release it was calculated to and highlight dates less or more than you want the jobs to finish apart.
Those kind of date changes should show on the Planning Workbench.
I mean if SO 1 demand is pegged to Job A but then the dates of the sales order are pushed back, or SO 2 is moved up would your method now peg Job a to SO 2 demand? My understanding is MLP is running the scheduling engine to link the demand and supply together on a schedule. Thanks,