AM_PRD_PD_CF_VW(SQL View) |
Index Back |
---|---|
Period wise PDP view with CFs |
SELECT C.BUSINESS_UNIT ,C.ASSET_ID ,C.BOOK , C.CF_SEQNO ,C.DTTM_STAMP ,%subrec(CF12_AN_SBR, C) ,%subrec(AM_CF1_N_SBR, C) ,C.PROJECT_ID ,C.DEPTID ,C.CATEGORY ,C1.FISCAL_YEAR , C1.ACCOUNTING_PERIOD ,C.COST_TYPE ,C.TRANS_DT ,C1.BEGIN_DT ,C1.END_DT , SUM(C.DEPR_ACTUAL) DEPR ,C.CURRENCY_CD ,C.PROFILE_ID FROM ( SELECT C.SETID ,C.CALENDAR_ID , D.BUSINESS_UNIT , D.ASSET_ID , D.BOOK , D.CF_SEQNO ,D.DTTM_STAMP ,%subrec(CF12_AN_SBR, D) ,%subrec(AM_CF1_N_SBR, D) ,D.PROJECT_ID ,D.DEPTID ,D.CATEGORY , C.FISCAL_YEAR YEAR1 , C.ACCOUNTING_PERIOD STARTPD ,D.COST_TYPE ,D.TRANS_DT ,C.BEGIN_DT ,C.END_DT , C.ACCOUNTING_PERIOD +((D.FISCAL_YEAR *NUMBER_OF_PERIODS+D.START_PD) - (C.FISCAL_YEAR*NUMBER_OF_PERIODS+C.ACCOUNTING_PERIOD))-1 ENDPD , CASE WHEN D.DEPR=0 THEN D.DEPR_YTD WHEN D.DEPR<>0 THEN D.DEPR + D.DEPR_YTD ELSE D.DEPR END / ((D.FISCAL_YEAR *NUMBER_OF_PERIODS+D.START_PD) - (C.FISCAL_YEAR*NUMBER_OF_PERIODS+C.ACCOUNTING_PERIOD)) DEPR_ACTUAL ,D.CURRENCY_CD ,A.PROFILE_ID FROM PS_DEPRECIATION D ,PS_CAL_DETP_TBL C , PS_CAL_DEFN_TBL CC , PS_INSTALLATION_AM I , PS_SET_CNTRL_TBL S , PS_BU_BOOK_TBL BB , PS_ASSET A WHERE D.BUSINESS_UNIT=A.BUSINESS_UNIT AND D.ASSET_ID=A.ASSET_ID AND D.TRANS_TYPE = I.TYPE_PRIOR_DEPR AND D.BUSINESS_UNIT=S.SETCNTRLVALUE AND D.BUSINESS_UNIT=BB.BUSINESS_UNIT AND D.BOOK=BB.BOOK AND C.SETID =S.SETID AND C.CALENDAR_ID = BB.CAL_DEPR_PD AND C.SETID = CC.SETID AND C.CALENDAR_ID = CC.CALENDAR_ID AND D.TRANS_DT BETWEEN C.BEGIN_DT AND C.END_DT) C, PS_CAL_DETP_TBL C1 WHERE C.SETID = C1.SETID AND C.CALENDAR_ID= C1.CALENDAR_ID AND C.YEAR1 = C1.FISCAL_YEAR AND C1.ACCOUNTING_PERIOD >=STARTPD AND C1.ACCOUNTING_PERIOD <=ENDPD GROUP BY C.BUSINESS_UNIT,C.ASSET_ID,C.BOOK, C.CF_SEQNO,C.DTTM_STAMP, %subrec(CF12_AN_SBR, C),%subrec(AM_CF1_N_SBR, C),C.PROJECT_ID,C.DEPTID,C.CATEGORY ,C1.FISCAL_YEAR, C1.ACCOUNTING_PERIOD,C.COST_TYPE,C.TRANS_DT,C1.BEGIN_DT,C1.END_DT,C.CURRENCY_CD,C.PROFILE_ID |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL | Business Unit |
2 | ASSET_ID | Character(12) | VARCHAR2(12) NOT NULL | Asset Identification |
3 | BOOK | Character(10) | VARCHAR2(10) NOT NULL | Asset Book Name |
4 | CF_SEQNO | Number(6,0) | INTEGER NOT NULL | Chartfield Sequence Number |
5 | 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. |
6 | OPERATING_UNIT | Character(8) | VARCHAR2(8) NOT NULL | Operating Unit ChartField |
7 | PRODUCT | Character(6) | VARCHAR2(6) NOT NULL | Product ChartField |
8 | FUND_CODE | Character(5) | VARCHAR2(5) NOT NULL | Fund Code |
9 | CLASS_FLD | Character(5) | VARCHAR2(5) NOT NULL | Class Field |
10 | PROGRAM_CODE | Character(5) | VARCHAR2(5) NOT NULL | Program Code ChartField |
11 | BUDGET_REF | Character(8) | VARCHAR2(8) NOT NULL | Budget Reference |
12 | AFFILIATE | Character(5) | VARCHAR2(5) NOT NULL | Affiliate |
13 | AFFILIATE_INTRA1 | Character(10) | VARCHAR2(10) NOT NULL | IntraUnit Affiliate1 |
14 | AFFILIATE_INTRA2 | Character(10) | VARCHAR2(10) NOT NULL | Operating Unit Affiliate |
15 | CHARTFIELD1 | Character(10) | VARCHAR2(10) NOT NULL | Expansion chartfield 1 |
16 | CHARTFIELD2 | Character(10) | VARCHAR2(10) NOT NULL | Expansion Chartfield 2 |
17 | CHARTFIELD3 | Character(10) | VARCHAR2(10) NOT NULL | Expansion Chartfield 3 |
18 | BUSINESS_UNIT_PC | Character(5) | VARCHAR2(5) NOT NULL | PC Business Unit |
19 | ACTIVITY_ID | Character(15) | VARCHAR2(15) NOT NULL | Activity ID |
20 | RESOURCE_TYPE | Character(5) | VARCHAR2(5) NOT NULL | Source Type |
21 | RESOURCE_CATEGORY | Character(5) | VARCHAR2(5) NOT NULL | Category |
22 | RESOURCE_SUB_CAT | Character(5) | VARCHAR2(5) NOT NULL | Subcategory |
23 | ANALYSIS_TYPE | Character(3) | VARCHAR2(3) NOT NULL | Analysis Type |
24 | PROJECT_ID | Character(15) | VARCHAR2(15) NOT NULL | Project Id ChartField |
25 | DEPTID | Character(10) | VARCHAR2(10) NOT NULL | Department |
26 | CATEGORY | Character(5) | VARCHAR2(5) NOT NULL | Asset Category |
27 | FISCAL_YEAR | Number(4,0) | SMALLINT NOT NULL | Fiscal Year |
28 | ACCOUNTING_PERIOD | Number(3,0) | SMALLINT NOT NULL | Identifies a time period to which you post transactions. Typically, an accounting period represents a month, but it can also represent a week, a day, or any user-defined interval. An accounting period has a beginning date and an ending date, and is defined in the calendar table. |
29 | COST_TYPE | Character(1) | VARCHAR2(1) NOT NULL | Cost Type |
30 | TRANS_DT | Date(10) | DATE | Transaction Date |
31 | BEGIN_DT | Date(10) | DATE | Begin Date |
32 | END_DT | Date(10) | DATE | End Date |
33 | DEPR | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Depreciation Amt |
34 | CURRENCY_CD | Character(3) | VARCHAR2(3) NOT NULL | Currency Code |
35 | PROFILE_ID | Character(10) | VARCHAR2(10) NOT NULL | Asset Profile ID |