Escolar Documentos
Profissional Documentos
Cultura Documentos
Introduction.......................................................................................................................... 2
Oracle Views...................................................................................................................... 13
Oracle Packages................................................................................................................. 13
Tables to be created........................................................................................................... 13
10
References...................................................................................................................... 18
11
By Ishaq Baig
ishaqbaig@yahoo.com
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
SELECT ret.retirement_id,
ret.book_type_code,
ret.asset_id,
ret.transaction_header_id_in,
ret.date_retired,
ret.date_effective,
ret.cost_retired,
ret.status,
ret.last_update_date,
ret.last_updated_by,
ret.retirement_prorate_convention,
ret.transaction_header_id_out,
ret.units,
ret.cost_of_removal,
ret.nbv_retired,
ret.gain_loss_amount,
ret.proceeds_of_sale,
ret.gain_loss_type_code,
FROM fa_retirements ret,
fa_additions_b ad,
fa_books bks,
fa_book_controls bc,
fa_fiscal_year fy,
fa_asset_history ah,
fa_additions_b trade_in,
fa_additions_tl adt,
fa_transaction_headers th
WHERE ad.asset_id = ret.asset_id
AND bks.book_type_code = ret.book_type_code
AND bks.asset_id = ret.asset_id
AND bks.transaction_header_id_out =
ret.transaction_header_id_in
AND bks.date_ineffective > ah.date_effective
AND bks.date_ineffective <= NVL
(ah.date_ineffective, SYSDATE)
AND ah.asset_id = ret.asset_id
AND trade_in.asset_id(+) = ret.trade_in_asset_id
AND th.transaction_header_id =
ret.transaction_header_id_in
AND bc.book_type_code = ret.book_type_code
AND fy.fiscal_year_name = bc.fiscal_year_name
AND fy.fiscal_year = bc.current_fiscal_year
AND adt.asset_id(+) = trade_in.asset_id
AND adt.language(+) = USERENV ('LANG');
To_NUMBER(Ltrim(Rtrim(Apps_FA_Util_API.Get_Deprn_Perio
d_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_Perio
d_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
Asset Distribution Row of The Report Month
Filter to get rows active at a particular point of
time
Get_Deprn_End_Date (Book_type_code of asset,
Period_Prompt)
Between date_effective and date_ineffective
Where is Based on the Oracle Asset Register query
as explained below
(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_INEFFEC
TIVE,SYSDATE+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_Perio
d_Param
(APPS_APPL.FA_DISTRIBUTION_HISTORY.book_type_code,
@Prompt('Enter Period Name:','A','Depreciation\Period
Name',mono,free,persistent), 'UPC')))) )
Get Retirements Between a Period Range
Filter gets the retirement done between a Period
Range
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_RETI
REMENTS_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_RETI
REMENTS_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
Get Reclassification Between a Period Range
Filter gets the FA Reclassifications done between a
Period Range
Get Adjustments Between a Period Range
Filter gets the FA Adjustments 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
_ADJUSTMENTS.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
_ADJUSTMENTS.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_FINT
RANS_INQUIRY_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_FINT
RANS_INQUIRY_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
Apps_FA_Util_API
APPS_GL_CODE_COMB_UTIL_API
Apps_HR_Util_Api.Get_Person_Name
Apps_INV_Util_Api.Get_User_Name
6 Tables to be created
SAV_FA_BOOK_ACCESS
BOOK_TYPE_CODE VARCHAR2(15 BYTE),
USER_ID
VARCHAR2(30 BYTE)
SAV_FA_BO_RECONCILE_BY_CAT
Table to populate data using a procedure. The table is
populated with data by category and year.
BEGIN
--Apps_FA_Util_API.Calc_BO_EBS_Tot_For_CatGrp (
book_type_code_, year_ );
--Populated the SAV_FA_BO_RECONCILE_BY_CAT
table with Data for trend purpose in the reports
Apps_FA_Util_API.Calc_BO_EBS_Tot_For_CatGrp (
'HQ BOOK', 2012 );
END
Book Name
Upper Period Counter DATE (UCD) is the period close
date from the fa_deprn_periods table. For the requested
query period.
Upper Period Counter (UPC) is period close counter
from fa_deprn_periods table. For the requested query
period.
Minimum period open Date of the year.
Minimum Period Counter of the year. Of the requested
query period
In the above Query the requested query period is Nov-12
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
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_
The filters in the above BO report are derived/based on the Oracle Asset Register query as
explained above.
FA Reclassification
FA Retirements Report
FA Transfers
10 References
www.apps2fusion.com
http://knoworacle.wordpress.com/2010/03/08/oracle-fixed-assets-useful-tables/
User.sql
Fa_Temp_Tables.SQL
Fa_Temp_Tables.SQL