CM_ACTBK_EMT_VW(SQL View) |
Index Back |
---|---|
Act Cost for Perp Avg Books01/05/2012 - CreatedThe view will select all perp average books for the item and all the costs by cost element |
SELECT A.BUSINESS_UNIT , A.INV_ITEM_ID , A.DT_TIMESTAMP , A.SEQ_NBR , A.CM_BOOK , A.COST_ELEMENT , A.CM_SEQ_COST , A.CM_COST_SOURCE , A.CM_UNIT_COST , A.CURRENCY_CD , A.EFF_STATUS , A.CM_COST_ELEMNT_OPT FROM PS_CM_ACTCST_BK_VW A WHERE EXISTS ( SELECT 'X' FROM PS_CM_ACT_CELMT_VW B 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.DT_TIMESTAMP = B.DT_TIMESTAMP AND A.SEQ_NBR = B.SEQ_NBR) UNION SELECT C.BUSINESS_UNIT , C.INV_ITEM_ID , C.DT_TIMESTAMP , C.SEQ_NBR , C.CM_BOOK , C.COST_ELEMENT , C.CM_SEQ_COST , C.CM_COST_SOURCE , 0 , C.CURRENCY_CD , ' ' , '2' FROM PS_CM_ACT_CELMT_VW C WHERE NOT EXISTS ( SELECT 'X' FROM PS_CM_ACTCST_BK_VW WHERE C.BUSINESS_UNIT = PS_CM_ACTCST_BK_VW.BUSINESS_UNIT AND C.INV_ITEM_ID = PS_CM_ACTCST_BK_VW.INV_ITEM_ID AND C.CM_BOOK = PS_CM_ACTCST_BK_VW.CM_BOOK AND C.DT_TIMESTAMP = PS_CM_ACTCST_BK_VW.DT_TIMESTAMP AND C.SEQ_NBR = PS_CM_ACTCST_BK_VW.SEQ_NBR AND C.COST_ELEMENT = PS_CM_ACTCST_BK_VW.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 | CM_BOOK | Character(10) | VARCHAR2(10) NOT NULL | Cost Book |
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_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 |
9 | CM_UNIT_COST | Signed Number(27,15) | DECIMAL(25,15) NOT NULL | 07/99 GMG CN800-9.0: |
10 | CURRENCY_CD | Character(3) | VARCHAR2(3) NOT NULL | Currency Code |
11 | EFF_STATUS | Character(1) | VARCHAR2(1) NOT NULL |
Effective Status
A=Active I=Inactive |
12 | CM_COST_ELEMNT_OPT | Character(2) | VARCHAR2(2) NOT NULL |
08/16/02 8.8 Actual Cost Mfg.
Cost Element Option for Average Costed items.
1=Default Cost Element 2=Maintain Avg by Cost Element |