Fixed Asset BO Universe For Oracle EBS (12.1.x) : by Ishaq Baig
Fixed Asset BO Universe For Oracle EBS (12.1.x) : by Ishaq Baig
1 Introduction............................................................................................................................................................2
2 Fixed Asset Universe Details....................................................................................................................................2
3 Filters Used in the Universe...................................................................................................................................11
4 Oracle Views..........................................................................................................................................................13
5 Oracle Packages.....................................................................................................................................................13
6 Tables to be created..............................................................................................................................................13
7 Oracle Asset Register Query..................................................................................................................................14
8 BO Asset Register Query........................................................................................................................................17
9 BO Reports and Their Description.........................................................................................................................17
10 References.........................................................................................................................................................18
11 Files in the Document........................................................................................................................................18
By Ishaq Baig
[email protected]
1 Introduction
Fixed Asset Universe is based on Oracle EBS (E-Business Suite) version 12.1.3.
The universe was created to create ad-hoc reports from the fixed assets module. It is directly based on Oracle EBS
tables. The universe extensively uses Functions to get the descriptions and calculations. The scripts provided can be
created in a separate user/schema which have rights to view APPS tables and views or they can be created in the
APPS schema. As I have created the packages and views in a schema called develop which has rights to view the
APPS Objects. The user qualifier is preceded for some objects in the universe. (Like Develop.
Apps_FA_Util_API.Get_Category_Segments)
Access to the Fixed Asset data is restricted by FA Books, using a security table SAV_FA_BOOK_ACCESS. If a Business
Objects user needs to be given access to a particular FA Book, a record needs to be inserted into this table. Example
HQ Book, IBAIG
XYZ Book, IBAIG
Which means IBAIG has access to 2 Fixed Asset Books.
Universe Parameters
Technologies Used –
Business Objects XI 3.1 Sp5
Business Objects Universe designer
Web Intelligence 3.1
Oracle Database 11.2.0.1
PL/SQL
Asset Workbench\Additions
Asset Details
Filter is used to assign security. Users will only be able to see data from
FA books which they are assigned to see. Filter is only to secure the
different asset books.
Apps_FA_Util_Api.Get_Deprn_Period_End_Date
( Apps_FA_Util_API.Get_Asset_Book_Type_Code
( APPS_APPL.FA_ASSET_HISTORY.asset_id ), @Prompt('Enter Period
Name:','A','Depreciation\Period Name',mono,free,persistent) )
BETWEEN APPS_APPL.FA_ASSET_HISTORY.DATE_EFFECTIVE AND
Nvl(APPS_APPL.FA_ASSET_HISTORY.DATE_INEFFECTIVE,SYSDATE+1)
Apps_FA_Util_Api.Get_Deprn_Period_End_Date
( APPS_APPL.FA_BOOKS.book_type_code, @Prompt('Enter Period
Name:','A','Depreciation\Period Name',mono,free,persistent) )
BETWEEN APPS_APPL.FA_BOOKS.DATE_EFFECTIVE AND
Nvl(APPS_APPL.FA_BOOKS.DATE_INEFFECTIVE,SYSDATE+1)
Apps_FA_Util_Api.Get_Deprn_Period_Counter (
APPS_APPL.FA_BOOKS.book_type_code,
Apps_FA_Util_Api.Get_Asset_Entered_Period
( APPS_APPL.FA_BOOKS.asset_id,
APPS_APPL.FA_BOOKS.book_type_code ) ) <=
Apps_FA_Util_Api.Get_Deprn_Period_Counter(APPS_APPL.FA_BOOKS.b
ook_type_code, @Prompt('Enter Period Name:','A','Depreciation\Period
Name',mono,free,persistent) )
NVL (APPS_APPL.FA_BOOKS.period_counter_fully_retired,
To_NUMBER(Ltrim(Rtrim(Apps_FA_Util_API.Get_Deprn_Period_Param
(APPS_APPL.FA_DISTRIBUTION_HISTORY.book_type_code,
@Prompt('Enter Period Name:','A','Depreciation\Period
Name',mono,free,persistent), 'UPC'))))) >=
To_NUMBER(Ltrim(Rtrim(Apps_FA_Util_API.Get_Deprn_Period_Param
(APPS_APPL.FA_DISTRIBUTION_HISTORY.book_type_code,
@Prompt('Enter Period Name:','A','Depreciation\Period
Name',mono,free,persistent), 'TPC'))))
Asset Distribution History Record
APPS_APPL.FA_DISTRIBUTION_HISTORY.DATE_INEFFECTIVE IS NULL
Filter to get active history records from distribution history
(Apps_FA_Util_Api.Get_Deprn_Period_End_Date
( APPS_APPL.FA_DISTRIBUTION_HISTORY.book_type_code,
@Prompt('Enter Period Name:','A','Depreciation\Period
Name',mono,free,persistent) )
BETWEEN APPS_APPL.FA_DISTRIBUTION_HISTORY.DATE_EFFECTIVE
AND
NVL(APPS_APPL.FA_DISTRIBUTION_HISTORY.DATE_INEFFECTIVE,SYSDA
TE+1)
OR
(Apps_FA_Util_Api.Get_Deprn_Period_Start_Date
( APPS_APPL.FA_DISTRIBUTION_HISTORY.book_type_code,
@Prompt('Enter Period Name:','A','Depreciation\Period
Name',mono,free,persistent) ) BETWEEN
APPS_APPL.FA_DISTRIBUTION_HISTORY.DATE_EFFECTIVE AND
APPS_APPL.FA_DISTRIBUTION_HISTORY.DATE_INEFFECTIVE AND
APPS_APPL.FA_DISTRIBUTION_HISTORY.DATE_INEFFECTIVE is not null ))
Active Distribution Rows Less Than and Equal to The Report Date
Filter to get rows active at a particular point of time based on Upper
Period Counter (UPC) of the Report Period from the distribution hist
APPS_APPL.FA_DEPRN_DETAIL.distribution_id =
APPS_APPL.FA_DISTRIBUTION_HISTORY.distribution_id AND
APPS_APPL.FA_DEPRN_DETAIL.period_counter =
(SELECT MAX (dd_sub.period_counter)
FROM APPS_APPL.fa_deprn_detail dd_sub
WHERE dd_sub.book_type_code =
APPS_APPL.FA_DISTRIBUTION_HISTORY.book_type_code
AND dd_sub.asset_id =
APPS_APPL.FA_DISTRIBUTION_HISTORY.asset_id
AND dd_sub.distribution_id =
APPS_APPL.FA_DISTRIBUTION_HISTORY.distribution_id
AND dd_sub.period_counter <=
To_NUMBER(Ltrim(Rtrim(Apps_FA_Util_API.Get_Deprn_Period_Param
(APPS_APPL.FA_DISTRIBUTION_HISTORY.book_type_code,
@Prompt('Enter Period Name:','A','Depreciation\Period
Name',mono,free,persistent), 'UPC')))) )
Apps_FA_Util_Api.Get_Deprn_Period_Counter (
SAV_FA_RETIREMENTS_V.book_type_code,
Apps_FA_Util_API.Get_Deprn_Period_Name_By_Date
(SAV_FA_RETIREMENTS_V.BOOK_TYPE_CODE,
SAV_FA_RETIREMENTS_V.TRANSACTION_DATE_EFFECTIVE) ) Between
Apps_FA_Util_Api.Get_Deprn_Period_Counter(SAV_FA_RETIREMENTS_
V.BOOK_TYPE_CODE, @Prompt('Enter Start Period
Name:','A','Depreciation\Period Name',mono,free,persistent) ) AND
Apps_FA_Util_Api.Get_Deprn_Period_Counter(SAV_FA_RETIREMENTS_
V.BOOK_TYPE_CODE, @Prompt('Enter End Period
Name:','A','Depreciation\Period Name',mono,free,persistent) )
Get Transfers Between a Period Range
Filter gets the FA transfers done between a Period Range
Apps_FA_Util_Api.Get_Deprn_Period_Counter (
APPS_APPL.FA_ADJUSTMENTS.book_type_code,
Apps_FA_Util_API.Get_Deprn_Period_Name_By_Date
(APPS_APPL.FA_ADJUSTMENTS.BOOK_TYPE_CODE,
FA_TRANSACTION_HEADERS2.DATE_EFFECTIVE) ) Between
Apps_FA_Util_Api.Get_Deprn_Period_Counter(APPS_APPL.FA_ADJUST
MENTS.book_type_code, @Prompt('Enter Start Period
Name:','A','Depreciation\Period Name',mono,free,persistent) ) AND
Apps_FA_Util_Api.Get_Deprn_Period_Counter(APPS_APPL.FA_ADJUST
MENTS.book_type_code, @Prompt('Enter End Period
Name:','A','Depreciation\Period Name',mono,free,persistent) )
Get Transactions Between a Period Range
Filter gets the FA transactions done between a Period Range
SAV_FA_FINTRANS_INQUIRY_V.PERIOD_COUNTER Between
Apps_FA_Util_Api.Get_Deprn_Period_Counter(SAV_FA_FINTRANS_INQ
UIRY_V.book_type_code, @Prompt('Enter Start Period
Name:','A','Depreciation\Period Name',mono,free,persistent) ) AND
Apps_FA_Util_Api.Get_Deprn_Period_Counter(SAV_FA_FINTRANS_INQ
UIRY_V.book_type_code, @Prompt('Enter End Period
Name:','A','Depreciation\Period Name',mono,free,persistent) )
4 Oracle Views
View for Reclassifications, Transfers, Retirements,
Financial Inquiry. (View Scripts Enclosed)
5 Oracle Packages
The package scripts are available in the FA_Packages.rar file
6 Tables to be created
SAV_FA_BOOK_ACCESS Table to grant access to the BO user to a particular FA
BOOK_TYPE_CODE VARCHAR2(15 BYTE), Book. Insert records into this table to grant access to FA
USER_ID VARCHAR2(30 BYTE)
books to a BO user.
Example HQ Book, IBAIG
XYZ Book, IBAIG
Which means IBAIG has access to 2 Fixed Asset Books.
SAV_FA_BO_RECONCILE_BY_CAT BEGIN
Table to populate data using a procedure. The table is --Apps_FA_Util_API.Calc_BO_EBS_Tot_For_CatGrp (
populated with data by category and year. book_type_code_, year_ );
--Populated the SAV_FA_BO_RECONCILE_BY_CAT
In the code given here the procedure populates data for table with Data for trend purpose in the reports
HQ BOOK for year 2012. Apps_FA_Util_API.Calc_BO_EBS_Tot_For_CatGrp (
'HQ BOOK', 2012 );
END
SAV_FA_BO_RECONCILE
The Table taken into consideration for the asset register report are
FA_ASSET_HSTORY to get the FA category and Asset account at a particular point of time based on the report
month.
FA_DISTRIBUTION_HIST gets the location and GL segment associated with the distribution record at a particular
point of time.
FA_DEPRN_DETAIL to get the Cost, period depreciation amount, accumulated depreciation, ytd depreciation.
Cost cost
---------------------------------------------------------
---ORACLE ASSET REGISTER QUERY
--Parameters to the Query
--:UPC Upper period counter of the report/query month - period close date counter of the report/query Month
--:UCD Upper period date of the report/query month - period close date of the report/query Month
--:TPC Minimum Period open date counter of the year
--:TOD Minimum Period open date of the year.
---------------------------------------------------------
SELECT dh.asset_id asset_id,
dh.code_combination_id dh_ccid,
APPS_GL_CODE_COMB_UTIL_API.Get_Segment2(dh.code_combination_id) segment2,
cb.deprn_reserve_acct rsv_account,
books.date_placed_in_service start_date,
books.deprn_method_code method,
books.life_in_months life,
books.adjusted_rate rate,
books.production_capacity capacity,
dd_bonus.cost cost,
DECODE (dd_bonus.period_counter, :upc_, dd_bonus.deprn_amount - dd_bonus.bonus_deprn_amount, 0)
deprn_amount,
DECODE (SIGN (:tpc_ - dd_bonus.period_counter), 1, 0, dd_bonus.ytd_deprn - dd_bonus.bonus_ytd_deprn)
ytd_deprn,
dd_bonus.deprn_reserve - dd_bonus.bonus_deprn_reserve deprn_reserve,
DECODE (th.transaction_type_code, NULL, dh.units_assigned / ah.units * 100) percent,
DECODE (th.transaction_type_code,
NULL, DECODE (th_rt.transaction_type_code, 'FULL RETIREMENT', 'F', DECODE (books.depreciate_flag,
'NO', 'N')),
'TRANSFER', 'T',
'TRANSFER OUT', 'P',
'RECLASS', 'R')
t_type,
dd_bonus.period_counter,
NVL (th.date_effective, :ucd_),
''
FROM fa_deprn_detail dd_bonus,
fa_asset_history ah,
fa_transaction_headers th,
fa_transaction_headers th_rt,
fa_books books,
fa_distribution_history dh,
fa_category_books cb
WHERE cb.book_type_code = :book_
AND cb.category_id = ah.category_id
AND ah.asset_id = dh.asset_id
AND ah.date_effective < NVL (th.date_effective, :ucd_)
AND NVL (ah.date_ineffective, SYSDATE) >= NVL (th.date_effective, :ucd_)
AND -- AH.ASSET_TYPE = 'CAPITALIZED'
--AND
dd_bonus.book_type_code = :book_
AND dd_bonus.distribution_id = dh.distribution_id
AND dd_bonus.period_counter =
(SELECT MAX (dd_sub.period_counter)
FROM fa_deprn_detail dd_sub
WHERE dd_sub.book_type_code = :book_
AND dd_sub.asset_id = dh.asset_id
AND dd_sub.distribution_id = dh.distribution_id
AND dd_sub.period_counter <= :upc_)
AND th_rt.book_type_code = :book_
AND th_rt.transaction_header_id = books.transaction_header_id_in
AND books.book_type_code = :book_
AND books.asset_id = dh.asset_id
AND NVL (books.period_counter_fully_retired, :upc_) >= :tpc_
AND books.date_effective <= NVL (th.date_effective, :ucd_)
AND NVL (books.date_ineffective, SYSDATE + 1) > NVL (th.date_effective, :ucd_)
AND th.book_type_code(+) = :book_
AND th.transaction_header_id(+) = dh.transaction_header_id_out
AND th.date_effective(+) BETWEEN :tod_ AND :ucd_
AND dh.book_type_code = :book_
AND dh.date_effective <= :ucd_
AND NVL (dh.date_ineffective, SYSDATE) > :tod_
UNION ALL
SELECT dh.asset_id asset_id,
dh.code_combination_id dh_ccid,
APPS_GL_CODE_COMB_UTIL_API.Get_Segment2(dh.code_combination_id) segment2,
cb.bonus_deprn_reserve_acct rsv_account,
books.date_placed_in_service start_date,
books.deprn_method_code method,
books.life_in_months life,
books.adjusted_rate rate,
books.production_capacity capacity,
0 cost,
DECODE (dd.period_counter, :upc_, dd.bonus_deprn_amount, 0) deprn_amount,
DECODE (SIGN (:tpc_ - dd.period_counter), 1, 0, dd.bonus_ytd_deprn) ytd_deprn,
dd.bonus_deprn_reserve deprn_reserve,
0 percent,
'B' t_type,
dd.period_counter,
NVL (th.date_effective, :ucd_),
cb.bonus_deprn_expense_acct
FROM fa_deprn_detail dd,
fa_asset_history ah,
fa_transaction_headers th,
fa_transaction_headers th_rt,
fa_books books,
fa_distribution_history dh,
fa_category_books cb
WHERE cb.book_type_code = :book_
AND cb.category_id = ah.category_id
AND ah.asset_id = dh.asset_id
AND ah.date_effective < NVL (th.date_effective, :ucd_)
AND NVL (ah.date_ineffective, SYSDATE) >= NVL (th.date_effective, :ucd_)
AND --AH.ASSET_TYPE = 'CAPITALIZED'
--AND
dd.book_type_code = :book_
AND dd.distribution_id = dh.distribution_id
AND dd.period_counter =
(SELECT MAX (dd_sub.period_counter)
FROM fa_deprn_detail dd_sub
WHERE dd_sub.book_type_code = :book_
AND dd_sub.asset_id = dh.asset_id
AND dd_sub.distribution_id = dh.distribution_id
AND dd_sub.period_counter <= :upc_)
AND th_rt.book_type_code = :book_
AND th_rt.transaction_header_id = books.transaction_header_id_in
AND books.book_type_code = :book_
AND books.asset_id = dh.asset_id
AND NVL (books.period_counter_fully_retired, :upc_) >= :tpc_
AND books.date_effective <= NVL (th.date_effective, :ucd_)
AND NVL (books.date_ineffective, SYSDATE + 1) > NVL (th.date_effective, :ucd_)
AND books.bonus_rule IS NOT NULL
AND th.book_type_code(+) = :book_
AND th.transaction_header_id(+) = dh.transaction_header_id_out
AND th.date_effective(+) BETWEEN :tod_ AND :ucd_
AND dh.book_type_code = :book_
AND dh.date_effective <= :ucd_
AND NVL (dh.date_ineffective, SYSDATE) > :tod_
8 BO Asset Register Query
The filters in the above BO report are derived/based on the Oracle Asset Register query as explained above.
FA Asset Monthly Snapshot – Using Function Asset register, The values are calculated using oracle functions.
Depreciation Detail is not used here.
FA Asset Register – Using DeprnDetnHist Detail Asset information
10 References
www.apps2fusion.com
http://knoworacle.wordpress.com/2010/03/08/oracle-fixed-assets-useful-tables/
User.sql
Fa_Temp_Tables.SQL