FA Account Reconciliation Reserve Ledger - draft

Description
Categories: BI Publisher
Application: Assets
Source: Account Reconciliation Reserve Ledger Report (XML) - Not Supported: Reserved For Future Use
Short Name: FAS403_XML
DB package: FA_FAS403_XMLP_PKG
SELECT
	&ACCT_FLEX_BAL_SEG	COMP_CODE,
	CB.ASSET_COST_ACCT	GL_ACCOUNT,
	RSV.DEPRN_RESERVE_ACCT	RSV_ACCOUNT,
	&ACCT_FLEX_COST_SEG	COST_CENTER,
	AD.ASSET_NUMBER || '-' || AD.DESCRIPTION		
		ASSET_NUMBER,
	DATE_PLACED_IN_SERVICE	START_DATE,
	METHOD_CODE			METHOD,
	RSV.LIFE				LIFE,
	RSV.RATE			ADJ_RATE,
	DS.BONUS_RATE			BONUS_RATE,
	RSV.CAPACITY			PROD,
	SUM(COST)			COST,
	SUM(RSV.DEPRN_AMOUNT)	    DEPRN_AMOUNT,
	SUM(RSV.YTD_DEPRN)		YTD_DEPRN,
	SUM(RSV.DEPRN_RESERVE)          DEPRN_RESERVE,
	sum(nvl(PERCENT,0))		PERCENT,
	TRANSACTION_TYPE		T_TYPE, 
	fnd_flex_xml_publisher_apis.process_kff_combination_1('d_comp_code', 'SQLGL', 'GL#', cc.CHART_OF_ACCOUNTS_ID, NULL, cc.CODE_COMBINATION_ID, 'GL_BALANCING', 'Y', 'VALUE') d_comp_code, 
	fnd_flex_xml_publisher_apis.process_kff_combination_1('cc_dsp', 'SQLGL', 'GL#', cc.CHART_OF_ACCOUNTS_ID, NULL, cc.CODE_COMBINATION_ID, 'FA_COST_CTR', 'Y', 'VALUE') cc_dsp, 
	/*FA_FAS403_XMLP_PKG.d_cost_centerformula(:ACCT_CC_LPROMPT, cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1 || '.' || cc.segment1) D_Cost_Center, */
FA_FAS403_XMLP_PKG.d_cost_centerformula(:ACCT_CC_LPROMPT,&ACCT_FLEX_COST_SEG) D_Cost_Center,	
	FA_FAS403_XMLP_PKG.d_lifeformula(RSV.LIFE, RSV.RATE, DS.BONUS_RATE, RSV.CAPACITY) D_LIFE, 
	&Comp_Code C_Populate_Co
FROM
	FA_RESERVE_LEDGER_GT	RSV,
	FA_ADDITIONS		AD,
	FA_ASSET_HISTORY	AH,
	FA_CATEGORY_BOOKS	CB,
	GL_CODE_COMBINATIONS	CC,
	FA_DEPRN_SUMMARY	DS
WHERE
	RSV.ASSET_ID		= AD.ASSET_ID
AND
	RSV.DH_CCID		= CC.CODE_COMBINATION_ID
AND
	CB.BOOK_TYPE_CODE = :Book AND 
	CB.CATEGORY_ID		= AH.CATEGORY_ID
AND
	AH.ASSET_ID		= AD.ASSET_ID		AND
	AH.DATE_EFFECTIVE	< RSV.DATE_EFFECTIVE	AND
	nvl(AH.DATE_INEFFECTIVE,SYSDATE) >= RSV.DATE_EFFECTIVE
AND
	DS.PERIOD_COUNTER (+)	= RSV.PERIOD_COUNTER	AND
	DS.BOOK_TYPE_CODE (+) = :Book AND 
	DS.ASSET_ID (+)		= RSV.ASSET_ID
GROUP BY
	&ACCT_FLEX_BAL_SEG,
	CB.ASSET_COST_ACCT,
	RSV.DEPRN_RESERVE_ACCT,
	&ACCT_FLEX_COST_SEG,
	AD.ASSET_NUMBER,
	AD.DESCRIPTION,
	DATE_PLACED_IN_SERVICE,
	METHOD_CODE,
	RSV.LIFE,
 	RSV.RATE,
	RSV.CAPACITY,
	DS.BONUS_RATE, 
	TRANSACTION_TYPE,
	&Comp_Code,
	fnd_flex_xml_publisher_apis.process_kff_combination_1('d_comp_code', 'SQLGL', 'GL#', cc.CHART_OF_ACCOUNTS_ID, NULL, cc.CODE_COMBINATION_ID, 'GL_BALANCING', 'Y', 'VALUE'), 
	fnd_flex_xml_publisher_apis.process_kff_combination_1('cc_dsp', 'SQLGL', 'GL#', cc.CHART_OF_ACCOUNTS_ID, NULL, cc.CODE_COMBINATION_ID, 'FA_COST_CTR', 'Y', 'VALUE') 
ORDER BY
	D_COMP_CODE, GL_ACCOUNT, RSV_ACCOUNT, CC_DSP, ASSET_NUMBER,START_DATE,METHOD,ADJ_RATE,
BONUS_RATE,PROD,LIFE,COST,DEPRN_AMOUNT,YTD_DEPRN,DEPRN_RESERVE,PERCENT,T_TYPE
Parameter Name SQL text Validation
Period
 
LOV Oracle
Book
 
LOV Oracle