JE Hungarian Depreciation Analysis - draft

Description
Categories: BI Publisher
Application: European Localizations
Source: Hungarian Depreciation Analysis (XML) - Not Supported: Reserved For Future Use
Short Name: JEHUFDAN_XML
DB package: JE_JEHUFDAN_XMLP_PKG
SELECT
	&ACCT_FLEX_BAL_SEG					COMP_CODE,
	NVL (&ACCT_FLEX_ACCT_SEG, BAL.Category_Books_Account)	ACCOUNT,
	LO.description						C_PROPERTY_TYPE,
	CA.description						C_CATEGORY_DESC,
	NVL(SUM (DECODE (BAL.Source_Type_Code, 
		'CALCULATED', NVL(BAL.Amount,0),
		'TABLE',NVL(BAL.Amount,0), NULL)),0)			STRAIGHT,
	NVL(SUM (DECODE (BAL.Source_Type_Code, 
		'FLAT', NVL(BAL.Amount,0), NULL)),0)			FLAT ,
	NVL(SUM (DECODE (BAL.Source_Type_Code, 
		'DEPRECIATION', NVL(BAL.Amount,0), NULL)),0)		DEPRECIATION,
	NVL(SUM (DECODE (BAL.Source_Type_Code, 
		'PRODUCTION', NVL(BAL.Amount,0), NULL)),0)		PRODUCTION,
	NVL(SUM (DECODE (BAL.Source_Type_Code, 
		'FIRST', NVL(BAL.Amount,0), NULL)),0)			EXPENSE,
	NVL(SUM (DECODE (BAL.Source_Type_Code, 
		'TAX', NVL(BAL.Amount,0), NULL)),0)			TAX,
	NVL(SUM (DECODE (BAL.Source_Type_Code, 
		'STR UNPLANNED', NVL(BAL.Amount,0), NULL)),0)	STR_UNPLANNED,
	NVL(SUM (DECODE (BAL.Source_Type_Code, 
		'NON STR UNPLN', NVL(BAL.Amount,0), NULL)),0)	NON_STR_UNPLANNED,
	NVL(SUM (DECODE (BAL.Source_Type_Code, 
		'FIRST NON STR', NVL(BAL.Amount,0), NULL)),0)	FIRST_NON_STR,
	NVL(SUM (DECODE (BAL.Source_Type_Code, 
		'FIRST STR', NVL(BAL.Amount,0), NULL)),0)	                FIRST_STR, 
	fnd_flex_xml_publisher_apis.process_kff_combination_1('comp_code_dsp', 'SQLGL', 'GL#', dhcc.CHART_OF_ACCOUNTS_ID, NULL, dhcc.CODE_COMBINATION_ID, 'GL_BALANCING', 'Y', 'VALUE') COMP_CODE_DSP, 
	JE_JEHUFDAN_XMLP_PKG.lifeformula(NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'CALCULATED' , NVL ( BAL.Amount , 0 ) , 'TABLE' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'STR UNPLANNED' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'FIRST' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) LIFE, 
	JE_JEHUFDAN_XMLP_PKG.cf_total_depreciationformula(:CF_UNPLANNED, :END) CF_TOTAL_DEPRECIATION, 
	JE_JEHUFDAN_XMLP_PKG.adjustformula(NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'TAX' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'FLAT' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'NON STR UNPLN' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) ADJUST, 
	JE_JEHUFDAN_XMLP_PKG.cf_unplannedformula(NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'FIRST STR' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'STR UNPLANNED' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'NON STR UNPLN' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'FIRST NON STR' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) CF_UNPLANNED, 
	JE_JEHUFDAN_XMLP_PKG.endformula(JE_JEHUFDAN_XMLP_PKG.lifeformula(NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'CALCULATED' , NVL ( BAL.Amount , 0 ) , 'TABLE' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'STR UNPLANNED' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'FIRST' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'FIRST' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 ), JE_JEHUFDAN_XMLP_PKG.adjustformula(NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'TAX' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'FLAT' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'NON STR UNPLN' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'PRODUCTION' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) END, 
	NVL(fnd_flex_xml_publisher_apis.process_kff_combination_1('account_d', 'SQLGL', 'GL#', ajcc.CHART_OF_ACCOUNTS_ID, NULL, ajcc.CODE_COMBINATION_ID, 'GL_ACCOUNT', 'Y', 'VALUE'), BAL.Category_Books_Account) ACCOUNT_D
FROM
	FA_LOOKUPS	LO,
	FA_CATEGORIES	CA,
	GL_CODE_COMBINATIONS	AJCC,
	GL_CODE_COMBINATIONS	DHCC,
	JE_HU_BALANCES_REPORT	BAL
WHERE	LO.lookup_type = 'PROPERTY TYPE'     
AND	LO.enabled_flag = 'Y' 
AND	sysdate between nvl(LO.start_date_active,sysdate)  AND nvl(LO.end_date_active,sysdate)
AND	LO.lookup_code = CA.property_type_code 
AND	CA.category_id = BAL.category_id
AND	AJCC.Code_Combination_ID (+) = BAL.Adjustment_CCID 
AND	:P_COMPANY = fnd_flex_xml_publisher_apis.process_kff_combination_1('comp_code_dsp', 'SQLGL', 'GL#', dhcc.CHART_OF_ACCOUNTS_ID, NULL, dhcc.CODE_COMBINATION_ID, 'GL_BALANCING', 'Y', 'VALUE')
AND	DHCC.Code_Combination_ID = BAL.Distribution_CCID 
AND	:DO_INSERT = 1
GROUP BY
	null,
	NVL (&ACCT_FLEX_ACCT_SEG, BAL.Category_Books_Account),
	LO.description,
	CA.description,
	fnd_flex_xml_publisher_apis.process_kff_combination_1('comp_code_dsp', 'SQLGL', 'GL#', dhcc.CHART_OF_ACCOUNTS_ID, NULL, dhcc.CODE_COMBINATION_ID, 'GL_BALANCING', 'Y', 'VALUE'),
    NVL (fnd_flex_xml_publisher_apis.process_kff_combination_1('account_d', 'SQLGL', 'GL#', ajcc.CHART_OF_ACCOUNTS_ID, NULL, ajcc.CODE_COMBINATION_ID, 'GL_ACCOUNT', 'Y', 'VALUE'), BAL.Category_Books_Account)
ORDER BY
	4
Parameter Name SQL text Validation
Account Flex Structure
 
Number
Report Type
 
Company
 
To Period
 
LOV Oracle
From Period
 
LOV Oracle
Book
 
LOV Oracle
Ask a question