CM_OHPRR_INQ_VW

(SQL View)
Index Back

On hand value

11/13/02 lee: Changed cm_perpavg_cost to cm_pav2_cost_vw. Perpavg had two new keys added. This view sums the costs for each book. 09/02/99 RML Added cm_method to display in inquiry grid Created on 06/04/99 RML CM800-9.0 View to show on hand value by business unit, item, and book. This view depends on CM_OH_INQ_VW1 for on hand quantity. 10/01 dmw change build seq nbr from 1 to 3

SELECT A.OPRID , A.BUSINESS_UNIT , A.INV_ITEM_ID , A.CM_BOOK , C.CM_METHOD , D.CM_ONHAND_QTY , %Round(SUM(%DecMult(A.CM_ONHAND_QTY,B.CM_UNIT_COST)),6) FROM PS_CM_OH_INQ_TMP1 A , PS_CM_PER2_COST_VW B , PS_CM_ITEM_METH_VW C , PS_CM_OH_INQ_VW1 D WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.INV_ITEM_ID = B.INV_ITEM_ID AND A.CM_BOOK = B.CM_BOOK AND A.BUSINESS_UNIT = C.BUSINESS_UNIT AND A.INV_ITEM_ID = C.INV_ITEM_ID AND A.CM_BOOK = C.CM_BOOK AND C.CM_METHOD = '9' AND A.OPRID = D.OPRID AND A.BUSINESS_UNIT = D.BUSINESS_UNIT AND A.INV_ITEM_ID = D.INV_ITEM_ID AND A.CM_BOOK = D.CM_BOOK AND A.CONSIGNED_FLAG = 'N' GROUP BY A.OPRID, A.BUSINESS_UNIT, A.INV_ITEM_ID, A.CM_BOOK, C.CM_METHOD, D.CM_ONHAND_QTY

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 OPRID Character(30) VARCHAR2(30) NOT NULL A user's ID (see PSOPRDEFN).
2 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
3 INV_ITEM_ID Character(18) VARCHAR2(18) NOT NULL Item ID
4 CM_BOOK Character(10) VARCHAR2(10) NOT NULL Cost Book
5 CM_METHOD Character(2) VARCHAR2(2) NOT NULL 8/20/02 lee: added xlate 9 for retroactive perp average 01/18/99 RML Created for CN800-9.0 FIFO/LIFO Enhancements
0=Non Cost
1=Actual Cost
6=Perpetual Weighted Average
7=Periodic Weighted Average
8=Value at Current Standard
9=Retroactive Perpetual Average
6 CM_ONHAND_QTY Signed Number(17,4) DECIMAL(15,4) NOT NULL 08/30/99 RML Changed from "onhand" to "on hand"
7 CM_ONHAND_VALUE Number(19,6) DECIMAL(18,6) NOT NULL 08/30/99 RML Changed from "onhand" to "on hand"