FA Responsibility Reserve Ledger - draft

Description
Categories: BI Publisher
Application: Assets
Source: Responsibility Reserve Ledger Report (XML) - Not Supported: Reserved For Future Use
Short Name: FAS401_XML
DB package: FA_FAS401_XMLP_PKG
SELECT
	&ACCT_FLEX_BAL_SEG	COMP_CODE,
	&ACCT_FLEX_COST_SEG	COST_CENTER,
	RSV.DEPRN_RESERVE_ACCT	RSV_ACCOUNT,
	CB.ASSET_COST_ACCT	GL_ACCOUNT,
	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('d_cost_center', 'SQLGL', 'GL#', cc.CHART_OF_ACCOUNTS_ID, NULL, cc.CODE_COMBINATION_ID, 'FA_COST_CTR', 'Y', 'VALUE') D_COST_CENTER, 
	FA_FAS401_XMLP_PKG.d_lifeformula(RSV.LIFE, RSV.RATE, DS.BONUS_RATE, RSV.CAPACITY) D_LIFE
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
	&ACCT_FLEX_COST_SEG_W AND
	CB.CATEGORY_ID 		= AH.CATEGORY_ID		AND
	CB.BOOK_TYPE_CODE = :Book AND
	AH.ASSET_ID 		= AD.ASSET_ID		AND
	AH.DATE_EFFECTIVE <= :Period1_PCD AND 
	nvl(AH.DATE_INEFFECTIVE,SYSDATE) > :Period1_PCD
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,
	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('d_cost_center', 'SQLGL', 'GL#', cc.CHART_OF_ACCOUNTS_ID, NULL, cc.CODE_COMBINATION_ID, 'FA_COST_CTR', 'Y', 'VALUE')
ORDER BY
	1, 2, 3, 4, 5
Parameter Name SQL text Validation
Acct Flex Structure
 
Number
To Cost Center
 
From Cost Center
 
Period
 
LOV Oracle
Book
 
LOV Oracle