CM_PERPAVGS_VW(SQL View) |
Index Back |
---|---|
Avg Cost Adj Unit Cost Deltas04/02 tw R-TWONG-MF9PX Used %decdiv, %decmult for all platforms. |
SELECT A.BUSINESS_UNIT , A.CM_BOOK , A.INV_ITEM_ID , A.COST_ELEMENT , A.CM_DT_TIMESTAMP_P , A.CM_SEQ_NBR_P , %DecDiv(SUM(%DECMULT(A.CM_UNIT_COST_POVO,B.QTY_BASE)),SUM(B.QTY_BASE)) , %DecDiv(SUM(%DECMULT(A.CM_UNIT_COST_VO,B.QTY_BASE)),SUM(B.QTY_BASE)) , SUM(B.QTY_BASE) , A.CM_COST_SOURCE , A.PRODUCTION_ID FROM PS_CM_PERPAVGS_TMP A , PS_TRANSACTION_INV B WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.INV_ITEM_ID = B.INV_ITEM_ID AND A.DT_TIMESTAMP = B.DT_TIMESTAMP AND A.SEQ_NBR = B.SEQ_NBR GROUP BY A.BUSINESS_UNIT , A.CM_BOOK , A.INV_ITEM_ID , A.COST_ELEMENT , A.CM_DT_TIMESTAMP_P , A.CM_SEQ_NBR_P, A.CM_COST_SOURCE, A.PRODUCTION_ID |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL | Business Unit |
2 | CM_BOOK | Character(10) | VARCHAR2(10) NOT NULL | Cost Book |
3 | INV_ITEM_ID | Character(18) | VARCHAR2(18) NOT NULL | Item ID |
4 | COST_ELEMENT | Character(4) | VARCHAR2(4) NOT NULL | Cost Element |
5 | CM_DT_TIMESTAMP_P | DateTime(26) | TIMESTAMP | 07/99 GMG CN800-9.0: |
6 | CM_SEQ_NBR_P | Number(15,0) | DECIMAL(15) NOT NULL | 07/99 GMG CN800-9.0: |
7 | CM_UNIT_COST_POVO | Signed Number(32,15) | DECIMAL(30,15) NOT NULL | 07/99 GMG CN800-9.0: |
8 | CM_UNIT_COST_VO | Signed Number(32,15) | DECIMAL(30,15) NOT NULL | 07/99 GMG CN800-9.0: |
9 | QTY_BASE | Signed Number(17,4) | DECIMAL(15,4) NOT NULL | Base Quantity |
10 | 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 |
11 | PRODUCTION_ID | Character(10) | VARCHAR2(10) NOT NULL | Production ID |