FA Financial Adjustments - draft

Description
Categories: BI Publisher
Application: Assets
Source: Financial Adjustments Report (XML) - Not Supported: Reserved For Future Use
Short Name: FASFIADJ_XML
DB package: FA_FASFIADJ_XMLP_PKG
SELECT AD.ASSET_NUMBER                   	ASSET_NO,
      TH.TRANSACTION_HEADER_ID            	THID,
       LU_SUB.MEANING	                	TYPE,
       DECODE (TH.TRANSACTION_HEADER_ID,
               BK.TRANSACTION_HEADER_ID_OUT,
               0, 1) 	                  	FROM_TO,
       BK.DEPRN_METHOD_CODE                 	METHOD,
	BK.LIFE_IN_MONTHS			LIFE,
	BK.ADJUSTED_RATE			ADJUSTED_RATE,
	NVL(DS.BONUS_RATE, 0)			BONUS_RATE,
	BK.PRODUCTION_CAPACITY			PRODUCTION,
       BK.BONUS_RULE                      	BONUS_RULE,
       BK.CEILING_NAME                   	CEIL_NAME,
       BK.SALVAGE_VALUE                   	SAL_VAL,
       BK.COST                            	COST,
       LU.MEANING                         	DEPR, 
	FA_FASFIADJ_XMLP_PKG.d_lifeformula(BK.LIFE_IN_MONTHS, BK.ADJUSTED_RATE, NVL(DS.BONUS_RATE, 0), BK.PRODUCTION_CAPACITY) D_LIFE
	--COMMENTED AS THE QUERY IS REPEATED
/* FROM_TO,
       BK.DEPRN_METHOD_CODE                 	METHOD,
	BK.LIFE_IN_MONTHS			LIFE,
	BK.ADJUSTED_RATE			ADJUSTED_RATE,
	NVL(DS.BONUS_RATE, 0)			BONUS_RATE,
	BK.PRODUCTION_CAPACITY			PRODUCTION,
       BK.BONUS_RULE                      	BONUS_RULE,
       BK.CEILING_NAME                   	CEIL_NAME,
       BK.SALVAGE_VALUE                   	SAL_VAL,
       BK.COST                            	COST,
       LU.MEANING                         	DEPR */
FROM
       FA_ADDITIONS           AD,
       FA_BOOKS               BK,
       FA_LOOKUPS             LU,
	FA_LOOKUPS		LU_SUB,
       FA_TRANSACTION_HEADERS TH,
       FA_DEPRN_SUMMARY       DS
WHERE
       TH.DATE_EFFECTIVE BETWEEN :PERIOD1_POD AND 
	   :PERIOD1_PCD AND 
	   TH.BOOK_TYPE_CODE = :P_BOOK AND
	   TH.TRANSACTION_TYPE_CODE = 'ADJUSTMENT'
AND
	LU_SUB.LOOKUP_TYPE = 'TRANSACTION SUBTYPE' AND
	LU_SUB.LOOKUP_CODE = NVL(TH.TRANSACTION_SUBTYPE,'EXPENSED')
AND
       AD.ASSET_ID              = TH.ASSET_ID
AND
       TH.TRANSACTION_HEADER_ID IN (BK.TRANSACTION_HEADER_ID_IN,
                     BK.TRANSACTION_HEADER_ID_OUT)
AND
	BK.BOOK_TYPE_CODE =:P_BOOK AND
	BK.ASSET_ID = TH.ASSET_ID
AND
       LU.LOOKUP_TYPE           = 'YESNO'          AND
       LU.LOOKUP_CODE           = BK.DEPRECIATE_FLAG
AND
       DS.BOOK_TYPE_CODE(+) = :P_BOOK AND
	   DS.ASSET_ID(+)              = TH.ASSET_ID      AND
       DS.PERIOD_COUNTER(+) = :PERIOD1_PC
	   ORDER BY 1,2,3,4
Parameter Name SQL text Validation
Period
 
LOV Oracle
Book
 
LOV Oracle