RET_CUR_MC_VW(SQL View) |
Index Back |
---|---|
Asset Retirement - Current |
SELECT A.BUSINESS_UNIT , A.ASSET_ID , A.BOOK , A.DTTM_STAMP , A.TRANS_TYPE , A.TRANS_IN_OUT , A.TRANS_CODE , A.TRANS_DT , A.ACCOUNTING_DT , %subrec(CF12_AN_SBR, A) , A.PROJECT_ID , A.DEPTID , A.CATEGORY , A.COST_TYPE , A.ACTIVITY_SW , A.RETIRE_SW , A.QUANTITY , A.COST , B.RETIREMENT_AMT , B.RETIREMENT_RSV , (CASE WHEN B.RETIREMENT_AMT <> 0 THEN %Round(%DECMULT(B.RETIREMENT_RSV, %DECDIV(A.COST, B.RETIREMENT_AMT)), CD.DECIMAL_POSITIONS) ELSE %Round(%DECDIV(B.RETIREMENT_RSV, D.COUNT_1) ,CD.DECIMAL_POSITIONS)END) , B.PROCEEDS , (CASE WHEN B.RETIREMENT_AMT <> 0 THEN %Round(%DECMULT(B.PROCEEDS, %DECDIV(A.COST, B.RETIREMENT_AMT)), CD.DECIMAL_POSITIONS) ELSE %Round(%DECDIV(B.PROCEEDS, D.COUNT_1) ,CD.DECIMAL_POSITIONS)END) , B.TXN_PROCEEDS , (CASE WHEN B.RETIREMENT_AMT <> 0 THEN %Round(%DECMULT(B.TXN_PROCEEDS, %DECDIV(A.COST, B.RETIREMENT_AMT)), CD.DECIMAL_POSITIONS) ELSE %Round(%DECDIV(B.TXN_PROCEEDS, D.COUNT_1) ,CD.DECIMAL_POSITIONS)END) , B.TXN_CURRENCY_CD , B.RATE_MULT , B.RATE_DIV , B.REMOVAL_COST , (CASE WHEN B.RETIREMENT_AMT <> 0 THEN %Round(%DECMULT(B.REMOVAL_COST, %DECDIV(A.COST, B.RETIREMENT_AMT)), CD.DECIMAL_POSITIONS) ELSE %Round(%DECDIV(B.REMOVAL_COST, D.COUNT_1) ,CD.DECIMAL_POSITIONS)END) , B.TXN_REMOVAL_COST , (CASE WHEN B.RETIREMENT_AMT <> 0 THEN %Round(%DECMULT(B.TXN_REMOVAL_COST, %DECDIV(A.COST, B.RETIREMENT_AMT)), CD.DECIMAL_POSITIONS) ELSE %Round(%DECDIV(B.TXN_REMOVAL_COST, D.COUNT_1) ,CD.DECIMAL_POSITIONS)END) , B.TXN_CURRENCY_CD2 , B.RATE_MULT_2 , B.RATE_DIV_2 , B.GAIN_LOSS , (CASE WHEN B.RETIREMENT_AMT <> 0 THEN %Round(%DECMULT(B.GAIN_LOSS, %DECDIV(A.COST, B.RETIREMENT_AMT)), CD.DECIMAL_POSITIONS) ELSE %Round(%DECDIV(B.GAIN_LOSS, D.COUNT_1) ,CD.DECIMAL_POSITIONS)END) , (CASE WHEN B.RETIREMENT_AMT <> 0 THEN %Round(%DECDIV(A.COST, B.RETIREMENT_AMT), CD.DECIMAL_POSITIONS) ELSE 0 END) , A.FROM_CUR , A.SALVAGE_VALUE , B.FULLY_DEPR_SW FROM PS_COST A , PS_RETIREMENT B , PS_CURRENCY_CD_TBL CD , PS_COST_COUNT_VW D WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.ASSET_ID = B.ASSET_ID AND A.BOOK = B.BOOK AND A.DTTM_STAMP = B.DTTM_STAMP AND A.BUSINESS_UNIT = D.BUSINESS_UNIT AND A.ASSET_ID = D.ASSET_ID AND A.BOOK = D.BOOK AND A.DTTM_STAMP = D.DTTM_STAMP AND B.DTTM_STAMP = ( SELECT MAX(C.DTTM_STAMP) FROM PS_RETIREMENT C WHERE C.DTTM_STAMP < %CurrentDateTimeIn AND C.BUSINESS_UNIT = B.BUSINESS_UNIT AND C.ASSET_ID = B.ASSET_ID AND C.BOOK = B.BOOK) AND A.TRANS_TYPE = 'RET' AND A.FROM_CUR = CD.CURRENCY_CD %Sql(AM_CUR_CD_EFFDT) |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL |
Business Unit
Default Value: OPR_DEF_TBL_FS.BUSINESS_UNIT Prompt Table: SP_BU_AM_NONVW |
2 | ASSET_ID | Character(12) | VARCHAR2(12) NOT NULL |
Asset Identification
Prompt Table: ASSET |
3 | BOOK | Character(10) | VARCHAR2(10) NOT NULL |
Asset Book Name
Prompt Table: BOOK |
4 | DTTM_STAMP | DateTime(26) | TIMESTAMP | Specifies the date and time of the last update to an entry. This field is maintained by PeopleSoft and is used in a variety of contexts. |
5 | TRANS_TYPE | Character(3) | VARCHAR2(3) NOT NULL |
Types of Asset Management Transactions
ACR=Accretion Expense ADD=Asset Addition ADJ=Asset Cost Adjustment BKS=Book Adjustment BUD=Budgeted Depreciation DPR=Depreciation INF=Inflation Adjustment LEX=Lease Expense LPB=Budgeted Lease Payments LPY=Lease Payment PDP=Prior Period Depreciation PLP=Prior Lease Payment RAD=Manual Reserve Adjustment RCT=Asset Recategorization REI=Asset Reinstatement RES=Resume Depreciation RET=Asset Retirement RRC=Retro rate change for grp ast SUS=Suspend Depreciation TRF=Asset Transfer |
6 | TRANS_IN_OUT | Character(1) | VARCHAR2(1) NOT NULL |
Transaction In/Out
I=In M=IUT Proceeds Markup O=Out |
7 | TRANS_CODE | Character(5) | VARCHAR2(5) NOT NULL | Transaction Code |
8 | TRANS_DT | Date(10) | DATE | Transaction Date |
9 | ACCOUNTING_DT | Date(10) | DATE | The accounting entry construction date for a given transaction (a generic field that crosses multiple |
10 | OPERATING_UNIT | Character(8) | VARCHAR2(8) NOT NULL | Operating Unit ChartField |
11 | PRODUCT | Character(6) | VARCHAR2(6) NOT NULL | Product ChartField |
12 | FUND_CODE | Character(5) | VARCHAR2(5) NOT NULL | Fund Code |
13 | CLASS_FLD | Character(5) | VARCHAR2(5) NOT NULL | Class Field |
14 | PROGRAM_CODE | Character(5) | VARCHAR2(5) NOT NULL | Program Code ChartField |
15 | BUDGET_REF | Character(8) | VARCHAR2(8) NOT NULL | Budget Reference |
16 | AFFILIATE | Character(5) | VARCHAR2(5) NOT NULL | Affiliate |
17 | AFFILIATE_INTRA1 | Character(10) | VARCHAR2(10) NOT NULL | IntraUnit Affiliate1 |
18 | AFFILIATE_INTRA2 | Character(10) | VARCHAR2(10) NOT NULL | Operating Unit Affiliate |
19 | CHARTFIELD1 | Character(10) | VARCHAR2(10) NOT NULL | Expansion chartfield 1 |
20 | CHARTFIELD2 | Character(10) | VARCHAR2(10) NOT NULL | Expansion Chartfield 2 |
21 | CHARTFIELD3 | Character(10) | VARCHAR2(10) NOT NULL | Expansion Chartfield 3 |
22 | PROJECT_ID | Character(15) | VARCHAR2(15) NOT NULL | Project Id ChartField |
23 | DEPTID | Character(10) | VARCHAR2(10) NOT NULL | Department |
24 | CATEGORY | Character(5) | VARCHAR2(5) NOT NULL | Asset Category |
25 | COST_TYPE | Character(1) | VARCHAR2(1) NOT NULL | Cost Type |
26 | ACTIVITY_SW | Signed Number(2,0) | DECIMAL(1) NOT NULL | Activity Switch |
27 | RETIRE_SW | Signed Number(2,0) | DECIMAL(1) NOT NULL | Retirement Switch |
28 | QUANTITY | Signed Number(17,4) | DECIMAL(15,4) NOT NULL | Qty Interface |
29 | LINE_AMT | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Cost Retired at Chart |
30 | RETIREMENT_AMT | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Retirement Amount |
31 | RETIREMENT_RSV | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Accum Depr |
32 | LINE_RSV | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Reserve Retired at Chart |
33 | PROCEEDS | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Retirement Proceeds |
34 | LINE_PROCEEDS | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Proceeds at Chart Level |
35 | TXN_PROCEEDS | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Transaction Proceeds |
36 | LINE_TXN_PROCEEDS | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Proceeds at Chart Level |
37 | TXN_CURRENCY_CD | Character(3) | VARCHAR2(3) NOT NULL | Transaction Currency |
38 | RATE_MULT | Signed Number(17,8) | DECIMAL(15,8) NOT NULL | Rate Multiplier |
39 | RATE_DIV | Number(16,8) | DECIMAL(15,8) NOT NULL | Rate Divisor |
40 | REMOVAL_COST | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Removal Cost |
41 | TXN_REMOVAL_COST | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Transaction Removal Cost |
42 | LINE_TXN_REM_COST | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Transaction Line Removal Cost |
43 | LINE_REMOVAL_COST | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Removal Cost at Chart |
44 | TXN_CURRENCY_CD2 | Character(3) | VARCHAR2(3) NOT NULL | Transaction Currency Display |
45 | RATE_MULT_2 | Signed Number(17,8) | DECIMAL(15,8) NOT NULL | Rate Multiplier |
46 | RATE_DIV_2 | Number(16,8) | DECIMAL(15,8) NOT NULL | Rate Divisor |
47 | GAIN_LOSS | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Retirement Gain/Loss |
48 | LINE_GAIN_LOSS | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Gain/Loss at Chartfield |
49 | LINE_FRACTION | Signed Number(17,2) | DECIMAL(15,2) NOT NULL | Fraction of Cost at Chart |
50 | FROM_CUR | Character(3) | VARCHAR2(3) NOT NULL | From Currency Code |
51 | SALVAGE_VALUE | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Salvage Value |
52 | FULLY_DEPR_SW | Character(1) | VARCHAR2(1) NOT NULL |
Retire As Fully Depreciated SW
F=Fully Depr with Future Expense N=Calculate Gain/Loss Y=Fully Depr no Future Expense |