CM_WC_ICUT_VW

(SQL View)
Index Back

Actual Cost Temp Tbl

Used in Cost Tolerance Control Inquiry

SELECT A.OPRID , A.BUSINESS_UNIT , A.CM_BOOK , A.INV_ITEM_ID , A.DT_TIMESTAMP , A.SEQ_NBR , A.CM_COST_SOURCE , A.CM_UNIT_COST4 , B.CM_AVG_UNIT_COST , ( A.CM_UNIT_COST- B.CM_AVG_UNIT_COST) , A.CURRENCY_CD , CASE WHEN B.CM_AVG_UNIT_COST <> 0 THEN %DecDiv(%DecMult(( A.CM_UNIT_COST- B.CM_AVG_UNIT_COST),100 ) , B.CM_AVG_UNIT_COST) ELSE NULL END , A.RECEIVED_QTY , %DecMult( A.CM_UNIT_COST, A.RECEIVED_QTY) , %DecMult( B.CM_AVG_UNIT_COST, A.RECEIVED_QTY) , A.BUSINESS_UNIT_RECV , A.RECEIVER_ID , A.RECV_LN_NBR , A.RECV_SHIP_SEQ_NBR , A.DISTRIB_LINE_NUM , A.CM_ADJ_TYPE , A.VENDOR_ID , A.SOURCE_BUS_UNIT , A.STORAGE_AREA , A.SERIAL_ID , A.INV_LOT_ID , A.TRANSACTION_SOURCE , A.PRODUCTION_ID , C.COST_GROUP_CD , A.CM_UNIT_COST FROM PS_CM_CTC_ACT2_TMP A , PS_CM_CTC_AVG2_VW B , PS_BU_ITEMS_INV C WHERE A.OPRID = B.OPRID AND A.INV_ITEM_ID = B.INV_ITEM_ID AND A.BUSINESS_UNIT = C.BUSINESS_UNIT AND A.INV_ITEM_ID = C.INV_ITEM_ID AND A.RECEIVED_QTY > 0

# 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 CM_BOOK Character(10) VARCHAR2(10) NOT NULL Cost Book
4 INV_ITEM_ID Character(18) VARCHAR2(18) NOT NULL Item ID
5 DT_TIMESTAMP DateTime(26) TIMESTAMP Date Timestamp
6 SEQ_NBR Number(15,0) DECIMAL(15) NOT NULL Sequence Number
7 CM_COST_SOURCE Character(1) VARCHAR2(1) NOT NULL 12/29/2005 dbe ICE 1379942000 - Added "U" Xlat.
0=Depletion
1=PO Receipt
2=Expr Ptway
3=IUTransfer
4=AP Matched
5=User Adj
6=Qty Adjs.
7=Bin to Bin
8=Prelim Cst
9=Prdn Compl
C=NegQty
R=Return
S=Split from
U=75 Upgrade
8 CM_UNIT_COST4 Signed Number(21,4) DECIMAL(19,4) NOT NULL 07/99 GMG CN800-9.0:
9 CM_AVG_UNIT_COST Number(15,4) DECIMAL(14,4) NOT NULL Sample Average Unit Cost
10 CM_COST_DIFF Signed Number(21,4) DECIMAL(19,4) NOT NULL Cost Difference
11 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Currency Code
12 CM_COST_DIFF_PCT Signed Number(21,4) DECIMAL(19,4) NOT NULL % Difference
13 RECEIVED_QTY Number(16,4) DECIMAL(15,4) NOT NULL Qty Received
14 CM_EXTENDED_COST Signed Number(27,10) DECIMAL(25,10) NOT NULL Extended Cost
15 CM_EXTEND_AVG_COST Signed Number(27,10) DECIMAL(25,10) NOT NULL Extended Avg Cost
16 BUSINESS_UNIT_RECV Character(5) VARCHAR2(5) NOT NULL Receiving Business Unit
17 RECEIVER_ID Character(10) VARCHAR2(10) NOT NULL Receiver number
18 RECV_LN_NBR Number(5,0) INTEGER NOT NULL Receipt Line
19 RECV_SHIP_SEQ_NBR Number(3,0) SMALLINT NOT NULL Receiver Shipping Sequence
20 DISTRIB_LINE_NUM Number(5,0) INTEGER NOT NULL Distribution Line
21 CM_ADJ_TYPE Character(1) VARCHAR2(1) NOT NULL 07/99 GMG CN800-9.0:
0=Original Cost
1=Cost Adjustment
2=Value Adjustment
22 VENDOR_ID Character(10) VARCHAR2(10) NOT NULL Vendor Identifier
23 SOURCE_BUS_UNIT Character(5) VARCHAR2(5) NOT NULL Source Bus Unit
24 STORAGE_AREA Character(5) VARCHAR2(5) NOT NULL Storage Area
25 SERIAL_ID Character(20) VARCHAR2(20) NOT NULL Serial ID
26 INV_LOT_ID Character(15) VARCHAR2(15) NOT NULL Lot ID
27 TRANSACTION_SOURCE Character(2) VARCHAR2(2) NOT NULL Transaction Source
28 PRODUCTION_ID Character(10) VARCHAR2(10) NOT NULL Production ID
29 COST_GROUP_CD Character(6) VARCHAR2(6) NOT NULL Standard Cost Group
30 CM_UNIT_COST Signed Number(27,15) DECIMAL(25,15) NOT NULL 07/99 GMG CN800-9.0: