SF_COMP_COST_VW(SQL View) |
Index Back |
---|---|
CompList Cost View |
SELECT C.BUSINESS_UNIT , C.PRODUCTION_ID , C.NEW_PRDN_QTY , A.OP_SEQUENCE , A.COMPONENT_ID , E.COST_ELEMENT , A.SF_QTY_PER , A.QTY_CODE ,A.YIELD , 1 , CASE WHEN A.QTY_CODE = 'ASY' THEN %Round(%DecMult((SUM(E.TL_COST) + SUM(E.LL_COST)), %DecDiv(A.SF_QTY_PER, %DECDIV(A.YIELD, 100))), 8) ELSE %Round(%DecMult((SUM(E.TL_COST) + SUM(E.LL_COST)) / C.ORIG_PRDN_END_QTY, %DecDiv(A.SF_QTY_PER, %DECDIV(A.YIELD, 100))), 8) END , 1 FROM PS_SF_COMP_LIST A , PS_BU_ITEMS_INV B , PS_SF_PRDNID_HEADR C , PS_CE_HR_CONV D , PS_CM_PRODCOST E WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.COMPONENT_ID = B.INV_ITEM_ID AND A.BUSINESS_UNIT = C.BUSINESS_UNIT AND A.PRODUCTION_ID = C.PRODUCTION_ID AND D.CE_SOURCE = 'MAT' AND A.QTY_CODE = D.QTY_CODE AND B.PHANTOM_ITEM_FLAG = 'N' AND (A.NON_OWN_FLAG = 'N' OR B.CONSIGNED_FLAG = 'Y') AND A.BUSINESS_UNIT = E.BUSINESS_UNIT AND A.COMPONENT_ID = E.INV_ITEM_ID AND E.EFFDT=( SELECT MAX(EFFDT) FROM PS_CM_PRODCOSTH PRD WHERE PRD.BUSINESS_UNIT=E.BUSINESS_UNIT AND PRD.INV_ITEM_ID=E.INV_ITEM_ID AND PRD.EFFDT<=%CurrentDateIn) GROUP BY C.BUSINESS_UNIT ,C.PRODUCTION_ID, C.NEW_PRDN_QTY , A.OP_SEQUENCE , A.COMPONENT_ID , E.COST_ELEMENT , A.SF_QTY_PER ,A.QTY_CODE ,A.YIELD ,D.CE_PERASSY_FLG , E.TL_COST, E.LL_COST, A.SF_QTY_PER, A.YIELD, C.ORIG_PRDN_END_QTY, D.CE_PERORD_FLG, A.CURR_SCHED_QTY |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL | Business Unit |
2 | PRODUCTION_ID | Character(10) | VARCHAR2(10) NOT NULL | Production ID |
3 | NEW_PRDN_QTY | Number(12,4) | DECIMAL(11,4) NOT NULL | Production Start Qty |
4 | OP_SEQUENCE | Number(4,0) | SMALLINT NOT NULL | Operation Sequence |
5 | COMPONENT_ID | Character(18) | VARCHAR2(18) NOT NULL | 04/10/00 (Internet Architecture) SCC: Uppercase label Id. |
6 | COST_ELEMENT | Character(4) | VARCHAR2(4) NOT NULL | Cost Element |
7 | SF_QTY_PER | Number(16,10) | DECIMAL(15,10) NOT NULL | 07/06/99 SCC CN# SF800-9.0: Added label Quantity |
8 | QTY_CODE | Character(3) | VARCHAR2(3) NOT NULL |
Per
ASY=Assembly ORD=Order |
9 | YIELD | Number(8,4) | DECIMAL(7,4) NOT NULL | Component Yield |
10 | EXPL_QTY1 | Number(16,7) | DECIMAL(15,7) NOT NULL | Required Qty |
11 | TLP_LLP_COST | Signed Number(20,8) | DECIMAL(18,8) NOT NULL | This/Lower Level Costs |
12 | EXT_QPA_COST | Signed Number(16,4) | DECIMAL(14,4) NOT NULL | Extended Cost |