JA Australian Assets Revaluation Report - draft - draft

Description
Categories: BI Publisher
Application: Asia/Pacific Localizations
Source: Australian Assets Revaluation Report (XML) - Not Supported: Reserved For Future Use - Not Supported: Reserved For Future Use
Short Name: JAAUFREV_XML
DB package: JA_JAAUFREV_XMLP_PKG
SELECT 	&CAT_FLEX_ALL_SEG Category,
	th.transaction_header_id TH_ID,
	th.mass_transaction_id  Reval_Id,
	th.asset_id  Asset_Id,
	ad.asset_number Asset_Number,
	ad.asset_category_id  Asset_Class, 
	ad.description,
	bkold.cost  Old_Cost,
	bknew.cost  New_Cost,
	bknew.cost - bkold.cost  Adj_Cost,
	mrevr.reval_percent,
	mrev.book_type_code,
	JA_JAAUFREV_XMLP_PKG.C_OLD_REVAL_RSVFORMULA (th.asset_id,th.book_type_code,th.transaction_header_id) C_OLD_REVAL_RSV,
    JA_JAAUFREV_XMLP_PKG.C_OLD_DEP_RSVFORMULA (th.asset_id,th.book_type_code,th.transaction_header_id) C_OLD_DEP_RSV,
    JA_JAAUFREV_XMLP_PKG.C_NEW_DEP_RSVFORMULA(th.transaction_header_id,mrev.book_type_code,th.asset_id) C_NEW_DEP_RSV,
    JA_JAAUFREV_XMLP_PKG.C_CATEGORYFORMULA(ad.asset_category_id) C_CATEGORY
FROM	fa_transaction_headers th,
	fa_additions ad,
	fa_books bknew,
	fa_books bkold,
	fa_mass_revaluations mrev,
	fa_mass_revaluation_rules mrevr,
	fa_categories cat
WHERE	th.mass_transaction_id = :P_MASS_REVAL_ID
and	th.book_type_code = :P_BOOK_TYPE_CODE
and	th.transaction_type_code = 'REVALUATION'
and	th.asset_id = ad.asset_id
and	cat.category_id  =  ad.asset_category_id
and	ad.asset_category_id  like decode(:P_ASSET_CLASS,null,'%',:P_ASSET_CLASS)
and	th.mass_transaction_id = mrev.mass_reval_id
and	mrev.status = 'COMPLETED'
and	th.mass_transaction_id  =  mrevr.mass_reval_id
and	th.transaction_header_id  = bkold.transaction_header_id_out 
and	th.transaction_header_id  = bknew.transaction_header_id_in
and	(th.asset_id  =  mrevr.asset_id or cat.category_id = mrevr.category_id)
ORDER BY	ad.asset_category_id,
		ad.asset_number
Parameter Name SQL text Validation
FND_NUMBER
 
Number
Category
 
Asset Book
 
LOV Oracle
Transaction Number
 
LOV Oracle