IN_PERPCUR_VW

(SQL View)
Index Back

Current Perp Average Cost

Current Perpetual Average Cost for Inventory Turns

SELECT A.BUSINESS_UNIT , A.INV_ITEM_ID , A.DT_TIMESTAMP , A.CM_UNIT_COST FROM PS_CM_PERPAVG_COST A , PS_BU_ITEMS_INV B , PS_CM_ITEM_LED_VW C WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.INV_ITEM_ID = B.INV_ITEM_ID AND A.COST_ELEMENT = B.COST_ELEMENT AND B.BUSINESS_UNIT = C.BUSINESS_UNIT AND B.INV_ITEM_ID = C.INV_ITEM_ID AND A.CM_BOOK = C.CM_BOOK AND C.DEFAULT_LEDGER_GRP = 'Y' AND C.PRIMARY_LEDGER = 'Y' AND A.DT_TIMESTAMP = ( SELECT MAX(D.DT_TIMESTAMP) FROM PS_CM_PERPAVG_COST D WHERE D.BUSINESS_UNIT = A.BUSINESS_UNIT AND D.INV_ITEM_ID = A.INV_ITEM_ID AND D.CM_BOOK = A.CM_BOOK) AND A.SEQ_NBR = ( SELECT MAX(P.SEQ_NBR) FROM PS_CM_PERPAVG_COST P WHERE P.BUSINESS_UNIT = A.BUSINESS_UNIT AND P.INV_ITEM_ID = A.INV_ITEM_ID AND P.CM_BOOK = A.CM_BOOK AND P.DT_TIMESTAMP = A.DT_TIMESTAMP )

# 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: