CM_OH4_INQ_VW

(SQL View)
Index Back

On hand per receipt - Perp Avg

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. Created on 10/08/99 RML CM800-9.0 View to show quantity on hand, unit cost, on hand value, and total depletion per receipt line. This view is used for on hand inquiry for perpetual average items. (CM_RCPT_LINEDET_SP).

SELECT A.OPRID , A.BUSINESS_UNIT , A.INV_ITEM_ID , A.CM_BOOK , A.DT_TIMESTAMP , A.SEQ_NBR , ' ' , A.STORAGE_AREA , A.INV_LOT_ID , A.SERIAL_ID , A.TRANSACTION_DATE , A.CM_RECEIPT_QTY , A.CM_DEPLETE_QTY , A.CM_ONHAND_QTY , B.CM_UNIT_COST , %Round(%DecMult(A.CM_ONHAND_QTY,B.CM_UNIT_COST),6) FROM PS_CM_OH_INQ_TMP1 A , PS_CM_PAV2_COST_VW B , PS_CM_ITEM_METH_VW C 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 = '6' AND A.CONSIGNED_FLAG = 'N'

# 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 DT_TIMESTAMP DateTime(26) TIMESTAMP Date Timestamp
6 SEQ_NBR Number(15,0) DECIMAL(15) NOT NULL Sequence Number
7 COST_ELEMENT Character(4) VARCHAR2(4) NOT NULL Cost Element
8 STORAGE_AREA Character(5) VARCHAR2(5) NOT NULL Storage Area
9 INV_LOT_ID Character(15) VARCHAR2(15) NOT NULL Lot ID
10 SERIAL_ID Character(20) VARCHAR2(20) NOT NULL Serial ID
11 TRANSACTION_DATE Date(10) DATE Transaction Date
12 CM_RECEIPT_QTY Signed Number(17,4) DECIMAL(15,4) NOT NULL 07/99 GMG CN800-9.0:
13 CM_DEPLETE_QTY Signed Number(17,4) DECIMAL(15,4) NOT NULL Base Quantity Depleted
14 CM_ONHAND_QTY Signed Number(17,4) DECIMAL(15,4) NOT NULL 08/30/99 RML Changed from "onhand" to "on hand"
15 CM_UNIT_COST Signed Number(27,15) DECIMAL(25,15) NOT NULL 07/99 GMG CN800-9.0:
16 CM_ONHAND_VALUE Number(19,6) DECIMAL(18,6) NOT NULL 08/30/99 RML Changed from "onhand" to "on hand"