CM_PRDUC_VW

(SQL View)
Index Back

SELECT B.PROCESS_INSTANCE ,B.BUSINESS_UNIT ,B.CM_BOOK ,B.INV_ITEM_ID ,SUM(A.CM_UNIT_COST) , B.UNIT_MEASURE_STD FROM PS_CM_PERPAVG_COST A , PS_CM_UCDIST_TMP B WHERE %Join(common_fields, CM_PERPAVG_COST A, CM_UCDIST_TMP B, process_instance) AND B.CM_METHOD = '6' AND A.DT_TIMESTAMP = ( SELECT MAX(AA.DT_TIMESTAMP) FROM PS_CM_PERPAVG_COST AA WHERE %Join(COMMON_KEYS, CM_PERPAVG_COST A, CM_PERPAVG_COST AA, PROCESS_INSTANCE, DT_TIMESTAMP) AND AA.DT_TIMESTAMP <= %CurrentDateTimeIn ) AND A.SEQ_NBR = ( SELECT MAX(BB.SEQ_NBR) FROM PS_CM_PERPAVG_COST BB WHERE %Join(COMMON_KEYS, CM_PERPAVG_COST A, CM_PERPAVG_COST BB, PROCESS_INSTANCE, DT_TIMESTAMP) AND A.DT_TIMESTAMP = BB.DT_TIMESTAMP) GROUP BY B.PROCESS_INSTANCE, B.BUSINESS_UNIT, B.CM_BOOK, B.INV_ITEM_ID, B.CM_METHOD, B.UNIT_MEASURE_STD

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 PROCESS_INSTANCE Number(10,0) DECIMAL(10) NOT NULL Process Instance
2 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
3 CM_BOOK Character(10) VARCHAR2(10) NOT NULL Cost Book
4 INV_ITEM_ID Character(18) VARCHAR2(18) NOT NULL Item ID
5 CM_UNIT_COST Signed Number(27,15) DECIMAL(25,15) NOT NULL 07/99 GMG CN800-9.0:
6 UNIT_MEASURE_STD Character(3) VARCHAR2(3) NOT NULL Standard Unit of Measure