AM_WC_BKCLSE_VW

(SQL View)
Index Back

Depreciation Close Indicator


SELECT DISTINCT A.BUSINESS_UNIT, A.BOOK, CASE WHEN A.ACCOUNTING_PERIOD = C.NUMBER_OF_PERIODS THEN A.FISCAL_YEAR + 1 ELSE A.FISCAL_YEAR END , CASE WHEN A.ACCOUNTING_PERIOD = C.NUMBER_OF_PERIODS THEN 1 ELSE A.ACCOUNTING_PERIOD + 1 END FROM PS_BU_BOOK_CLOSE A, PS_SET_CNTRL_REC B , PS_CAL_DEFN_TBL C, PS_BU_BOOK_TBL D WHERE B.SETCNTRLVALUE = A.BUSINESS_UNIT AND B.RECNAME = 'CAL_DEFN_TBL' AND B.SETID = C.SETID AND D.CAL_DEPR_PD = C.CALENDAR_ID AND C.DEPR_CAL_SW = 'Y' AND A.BUSINESS_UNIT = D.BUSINESS_UNIT AND A.BOOK = D.BOOK AND A.FISCAL_YEAR = A.FISCAL_YEAR AND A.FISCAL_YEAR = (SELECT MAX(B.FISCAL_YEAR) FROM PS_BU_BOOK_CLOSE B WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.BOOK = B.BOOK) AND A.ACCOUNTING_PERIOD = (SELECT MAX(B.ACCOUNTING_PERIOD) FROM PS_BU_BOOK_CLOSE B WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.BOOK = B.BOOK AND A.FISCAL_YEAR = B.FISCAL_YEAR)

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 BOOK Character(10) VARCHAR2(10) NOT NULL Asset Book Name
3 FISCAL_YEAR Number(4,0) SMALLINT NOT NULL Fiscal Year
4 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.