CM_PERRAVG_S_VW(SQL View) |
Index Back |
---|---|
Avg Cost Adj Totals ViewUsed for summing temp table CM_PERPAVG_TMP which holds the original, POVO, VO, and previous delta costs. |
SELECT A.BUSINESS_UNIT , A.CM_BOOK , A.INV_ITEM_ID , A.DT_TIMESTAMP , A.SEQ_NBR , A.COST_ELEMENT , A.CM_SEQ_COST , SUM(B.CM_UNIT_COST_POVO) , SUM(B.CM_UNIT_COST_VO) FROM PS_CM_PERRADJ_COST A , PS_CM_RETRAVG_TMP B WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.CM_BOOK = B.CM_BOOK AND A.INV_ITEM_ID = B.INV_ITEM_ID AND A.DT_TIMESTAMP = B.DT_TIMESTAMP AND A.SEQ_NBR = B.SEQ_NBR AND A.COST_ELEMENT = B.COST_ELEMENT AND A.POSTED_FLAG IN ('N','A') GROUP BY A.BUSINESS_UNIT , A.CM_BOOK, A.INV_ITEM_ID , A.DT_TIMESTAMP , A.SEQ_NBR , A.COST_ELEMENT , A.CM_SEQ_COST |
# | 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 | DT_TIMESTAMP | DateTime(26) | TIMESTAMP | Date Timestamp |
5 | SEQ_NBR | Number(15,0) | DECIMAL(15) NOT NULL | Sequence Number |
6 | COST_ELEMENT | Character(4) | VARCHAR2(4) NOT NULL | Cost Element |
7 | CM_SEQ_COST | Number(15,0) | DECIMAL(15) NOT NULL | Cost Sequence Number. Incremented each time the actual cost is updated. |
8 | CM_UNIT_COST_POVO | Signed Number(32,15) | DECIMAL(30,15) NOT NULL | 07/99 GMG CN800-9.0: |
9 | CM_UNIT_COST_VO | Signed Number(32,15) | DECIMAL(30,15) NOT NULL | 07/99 GMG CN800-9.0: |