× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This might be a start for you. I used this SQL to create a view to attach to the item revision file with the standard hours summed from the routing file.

select A.ITNBR, A.ITRV, A.STID,
sum(dec(case when sucsz = 0 then 0
when tbcod = 'M' then sulhr/60/sucsz else sulhr/sucsz
end,20,5)
+ dec(case when tbcod = 'H' then runmc else 0 end,10,5)
)
as StdSetupHours,
sum(dec(g.stdqt*(DLEN1*DCAP1+DLEN2*DCAP2+DLEN3*DCAP3)/(MAX(DCAP1,DCAP2,DCAP3)) ,20,5))
as StdQueueHours,
sum(dec(case
when runmc = 0 then 0
when tbcod = 'C' then 0
when tbcod = 'P' then
(1000)/runmc
when tbcod = 'M' then
(1000)*runmc/60
when tbcod = '' then
(1000)*runmc
when tbcod = '1' then
(1000)*runmc/10
when tbcod = '2' then
(1000)*runmc/100
when tbcod = '3' then
(1000)*runmc/1000
when tbcod = '4' then
(1000)*runmc/10000 else 0
end,20,5) )
as StdRunHoursPer1000Foot,
sum(dec(case when sucsz = 0 then 0
when tbcod = 'M' then sulhr/60/sucsz else sulhr/sucsz
end/(DLEN1*DCAP1+DLEN2*DCAP2+DLEN3*DCAP3)/(MAX(DCAP1,DCAP2,DCAP3)),20,5)
+ dec(case when tbcod = 'H' then runmc else 0 end/(DLEN1*DCAP1+DLEN2*DCAP2+DLEN3*DCAP3)/(MAX(DCAP1,DCAP2,DCAP3)),10,5)
)
as StdSetupDays,
sum(g.stdqt )
as StdQueueDays,
sum(dec(case
when runmc = 0 then 0
when tbcod = 'C' then 0
when tbcod = 'P' then
(1000)/runmc
when tbcod = 'M' then
(1000)*runmc/60
when tbcod = '' then
(1000)*runmc
when tbcod = '1' then
(1000)*runmc/10
when tbcod = '2' then
(1000)*runmc/100
when tbcod = '3' then
(1000)*runmc/1000
when tbcod = '4' then
(1000)*runmc/10000 else 0
end/(DLEN1*DCAP1+DLEN2*DCAP2+DLEN3*DCAP3)/(MAX(DCAP1,DCAP2,DCAP3)) ,20,5))
as StdRunDaysPer1000Foot

from amflib.itmrva A join amflib.itmrel H on A.stid = H.stid and A.itnbr = H.itnbr and A.itrv = H.itrv
join amflib.itmprc B on A.stid = B.stid and A.itnbr = B.itnbr and A.itrv = B.itrv
join amflib.rtghdr C on B.stid = C.stid and B.rtid = C.rtid and B.rtvr = C.rtvr
join amflib.rtgopr D on C.stid = D.stid and C.rtid = D.rtid and C.rtvr = D.rtvr
join amflib.facmst G on D.wkctr = G.wkctr
where a.itcls in ('100','110')
group by A.STID, A.ITNBR, A.ITRV, A.ITDSC
;

This could then be used in a recursive CTE to traverse the BOM and get top level and bottom level hours. If you want an example of this let me know. I can't seem to find it right now.


-Tom Stieger
IT Manager
California Fine Wire


-----Original Message-----
From: mapics-l-bounces@xxxxxxxxxxxx [mailto:mapics-l-bounces@xxxxxxxxxxxx] On Behalf Of Connie Webb
Sent: Wednesday, January 09, 2013 8:04 AM
To: mapics-l@xxxxxxxxxxxx
Subject: [MAPICS-L] Total labor hours per assembly

We need the labor hours that are associated with the top level and lower levels dollars that are broken out in ITMRVB (ITEMASB). Has anyone developed a program to do this?

Connie Webb | Database Administrator | 540.387.5600 x272 Graham-White Manufacturing Co.<http://www.grahamwhite.com/> | Providing Reliable Transportation Solutions℠



This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom they are addressed. If you are not the intended recipient, be aware that disclosing, copying, distributing, or taking any action in reliance on the contents of this information is strictly prohibited. Please notify the sender immediately by email if you have received this email in error and delete this email from your system.
--
This is the MAPICS ERP System Discussion (MAPICS-L) mailing list To post a message email: MAPICS-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/mapics-l
or email: MAPICS-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/mapics-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.