CM_ACTCUR2_VW(SQL View) |
Index Back |
---|---|
Latest Actual Costs10/10/02 lee: This view captures the latest records, for a business unit/item, from cm_actual_costs 07/03 added COST_CATEGORY from cm_element |
SELECT A.BUSINESS_UNIT , A.INV_ITEM_ID , A.DT_TIMESTAMP , A.SEQ_NBR , A.COST_ELEMENT , A.CM_SEQ_COST , A.CM_UNIT_COST , D.SETID , E.COST_CATEGORY FROM PS_CM_ACTUAL_COST A , PS_SET_CNTRL_REC D , PS_CM_ELEMENT E WHERE A.DT_TIMESTAMP = ( SELECT MAX(B.DT_TIMESTAMP) FROM PS_CM_ACTUAL_COST B WHERE B.BUSINESS_UNIT = A.BUSINESS_UNIT AND B.INV_ITEM_ID = A.INV_ITEM_ID ) AND A.SEQ_NBR = ( SELECT MAX(C.SEQ_NBR) FROM PS_CM_ACTUAL_COST C WHERE C.BUSINESS_UNIT = A.BUSINESS_UNIT AND C.INV_ITEM_ID = A.INV_ITEM_ID AND C.DT_TIMESTAMP = A.DT_TIMESTAMP ) AND D.SETCNTRLVALUE = A.BUSINESS_UNIT AND D.RECNAME = 'CM_ELEMENT' AND D.SETID = E.SETID AND A.COST_ELEMENT = E.COST_ELEMENT |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL | Business Unit |
2 | INV_ITEM_ID | Character(18) | VARCHAR2(18) NOT NULL | Item ID |
3 | DT_TIMESTAMP | DateTime(26) | TIMESTAMP | Date Timestamp |
4 | SEQ_NBR | Number(15,0) | DECIMAL(15) NOT NULL | Sequence Number |
5 | COST_ELEMENT | Character(4) | VARCHAR2(4) NOT NULL | Cost Element |
6 | CM_SEQ_COST | Number(15,0) | DECIMAL(15) NOT NULL | Cost Sequence Number. Incremented each time the actual cost is updated. |
7 | CM_UNIT_COST | Signed Number(27,15) | DECIMAL(25,15) NOT NULL | 07/99 GMG CN800-9.0: |
8 | SETID | Character(5) | VARCHAR2(5) NOT NULL | SetID |
9 | COST_CATEGORY | Character(3) | VARCHAR2(3) NOT NULL |
1/12/99 ebn CN#CM800-2.0 : Added Landed Cost translate value
ATC=Addl Trans COH=Con Ovhd CON=Conversion INB=Inbound LND=Landed MAT=Material OTH=Other OUB=Outbound |