CE_RTG_HRS_VW(SQL View) |
Index Back |
---|---|
Calc rtg hours consumed |
SELECT A.BUSINESS_UNIT ,A.INV_ITEM_ID ,A.RTG_CODE ,A.RTG_TYPE ,A.RTG_STATE ,A.OP_SEQUENCE ,B.WORK_CENTER_CODE ,B.CONVERSION_CODE ,C.DAILY_CAPACITY ,B.CREWSIZE ,B.MACH_RESOURCES ,E.AOQ ,A.TIME_TYPE ,A.OP_TIME ,A.OP_RATE ,A.OP_TIME_UNIT ,A.OP_RATE_UNIT ,(%DecMult( ( (%DecMult(%DecDiv(A.OP_TIME,60),%DecDiv(D.CE_MIN,E.AOQ))) + (%DecMult(A.OP_TIME,%DecMult(C.DAILY_CAPACITY,%DecDiv(D.CE_DAY,E.AOQ)))) + (%DecMult(A.OP_TIME,%DecDiv(D.CE_HR,E.AOQ))) + (%DecDiv(D.CE_INV_MIN,(%DecMult((A.OP_TIME + A.OP_RATE),60)))) + (%DecDiv(D.CE_INV_HR,(A.OP_TIME +A.OP_RATE))) + (%DecMult(%DecDiv(C.DAILY_CAPACITY,(A.OP_TIME+A.OP_RATE)),D.CE_INV_DY)) ),F.CE_AOQ_YES) + (%DecMult(( ( %DecMult(%DecDiv(A.OP_TIME,60),D.CE_MIN)) + (%DecMult(A.OP_TIME, %DecMult(C.DAILY_CAPACITY,D.CE_DAY))) + (%DecMult(A.OP_TIME,D.CE_HR)) + (%DecDiv(D.CE_INV_MIN,(%DecMult((A.OP_TIME + A.OP_RATE),60)))) + (%DecDiv(D.CE_INV_HR,(A.OP_TIME +A.OP_RATE))) + (%DecMult(%DecDiv(C.DAILY_CAPACITY,(A.OP_TIME+A.OP_RATE)),D.CE_INV_DY))) ,F.CE_AOQ_NO )) ) FROM PS_EN_RTG_TIME A , PS_EN_RTG_OPS B , PS_EN_WORK_CENTER C , PS_CE_HR_CONV D , PS_BU_ITEMS_INV E , PS_CE_HR_CONV F WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.INV_ITEM_ID = B.INV_ITEM_ID AND A.RTG_TYPE = B.RTG_TYPE AND A.RTG_CODE = B.RTG_CODE AND A.RTG_STATE = B.RTG_STATE AND A.OP_SEQUENCE = B.OP_SEQUENCE AND A.BUSINESS_UNIT = C.BUSINESS_UNIT AND B.WORK_CENTER_CODE = C.WORK_CENTER_CODE AND A.OP_TIME_UNIT = D.OP_TIME_UNIT AND A.OP_RATE_UNIT = D.OP_RATE_UNIT AND D.CE_SOURCE = 'HOURS' AND A.BUSINESS_UNIT = E.BUSINESS_UNIT AND A.INV_ITEM_ID = E.INV_ITEM_ID AND F.CE_SOURCE = 'CREW' AND A.TIME_TYPE = F.CONVERSION_CODE |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | Character(5) | VARCHAR2(5) NOT NULL | Business Unit | |
2 | Character(18) | VARCHAR2(18) NOT NULL | Item ID | |
3 | Number(2,0) | SMALLINT NOT NULL | Routing Code | |
4 | RTG_TYPE | Character(2) | VARCHAR2(2) NOT NULL |
Routing Type
PR=Production RW=Rework TD=Teardown |
5 | RTG_STATE | Character(2) | VARCHAR2(2) NOT NULL |
Routing State
EN=Engineering PR=Manufacturing |
6 | Number(4,0) | SMALLINT NOT NULL | Operation Sequence | |
7 | WORK_CENTER_CODE | Character(10) | VARCHAR2(10) NOT NULL | Work Center |
8 | CONVERSION_CODE | Character(4) | VARCHAR2(4) NOT NULL | Conversion Code |
9 | DAILY_CAPACITY | Number(5,2) | DECIMAL(4,2) NOT NULL | Average Daily Hours |
10 | CREWSIZE | Number(7,2) | DECIMAL(6,2) NOT NULL | Crew Size |
11 | MACH_RESOURCES | Number(7,2) | DECIMAL(6,2) NOT NULL | Machine Resources |
12 | AOQ | Signed Number(17,4) | DECIMAL(15,4) NOT NULL | Average Order Qty |
13 | TIME_TYPE | Character(4) | VARCHAR2(4) NOT NULL |
Time / Resource Type
0100=Planning Labor Setup 0200=Planning Labor Fixed Run 0300=Planning Labor Run 0400=Planning Labor Post Prod 0500=Planning Machine Setup 0600=Planning Machine Fixed Run 0700=Planning Machine Run 0800=Planning Machine Post Prod 1100=Costing Labor Setup 1200=Costing Labor Fixed Run 1300=Costing Labor Run 1400=Costing Labor Post Prod 1500=Costing Machine Setup 1600=Costing Machine Fixed Run 1700=Costing Machine Run 1800=Costing Machine Post Prod 2000=Queue Time 3000=Intransit Time |
14 | OP_TIME | Number(9,2) | DECIMAL(8,2) NOT NULL | Op Time |
15 | OP_RATE | Number(9,2) | DECIMAL(8,2) NOT NULL | Op Rate |
16 | OP_TIME_UNIT | Character(2) | VARCHAR2(2) NOT NULL |
Time Unit
DY=Days HR=Hours MN=Minutes |
17 | OP_RATE_UNIT | Character(2) | VARCHAR2(2) NOT NULL |
Op Rate Unit
UD=Units/Day UH=Units/Hour UM=Units/Min |
18 | CE_HOURS_SPENT | Signed Number(33,15) | DECIMAL(31,15) NOT NULL | Hours Spent |