IN_ACTCUR_VW

(SQL View)
Index Back

Current Weighted Average Cost

Current Weighted Average Cost for Inventory Turns

SELECT A.BUSINESS_UNIT , A.INV_ITEM_ID , A.DT_TIMESTAMP , A.CM_UNIT_COST FROM PS_CM_ACTUAL_COST A , PS_BU_ITEMS_INV B WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.INV_ITEM_ID = B.INV_ITEM_ID AND A.COST_ELEMENT = B.COST_ELEMENT AND A.DT_TIMESTAMP = ( SELECT MAX(C.DT_TIMESTAMP) FROM PS_CM_ACTUAL_COST C WHERE C.BUSINESS_UNIT = A.BUSINESS_UNIT AND C.INV_ITEM_ID = A.INV_ITEM_ID ) AND A.SEQ_NBR = ( SELECT MAX(D.SEQ_NBR) FROM PS_CM_ACTUAL_COST D WHERE D.BUSINESS_UNIT = A.BUSINESS_UNIT AND D.INV_ITEM_ID = A.INV_ITEM_ID AND D.DT_TIMESTAMP = A.DT_TIMESTAMP ) AND A.CM_SEQ_COST = ( SELECT MAX(E.CM_SEQ_COST) FROM PS_CM_ACTUAL_COST E WHERE E.BUSINESS_UNIT = A.BUSINESS_UNIT AND E.INV_ITEM_ID = A.INV_ITEM_ID AND E.DT_TIMESTAMP = A.DT_TIMESTAMP AND E.SEQ_NBR = A.SEQ_NBR)

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 INV_ITEM_ID Character(18) VARCHAR2(18) NOT NULL Item ID
3 DT_TIMESTAMP DateTime(26) TIMESTAMP Date Timestamp
4 CM_UNIT_COST Signed Number(27,15) DECIMAL(25,15) NOT NULL 07/99 GMG CN800-9.0: