Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

getKFSActiveFiscalPeriod(date)

This service is used to determine the active fiscal period for a given date. Returns an XML result set with the fiscal period and fiscal year.

...

IndexParameterDescriptionRequired?Data Type (max length)Example
0dateThe date to search for active fiscal periodNo (default is today's date)String(8) YYYYMMDD'20120701'

DB Query

Code Block
SELECT a.FIN_COA_CD, a.ACCOUNT_NBR, 'true' AS VALID FROM dwhs_ods..ca_account_t a WHERE 
a.ACCT_CLOSED_IND <> 'Y' 
AND ( a.ACCT_EXPIRATION_DT >= getdate() or a.ACCT_EXPIRATION_DT IS NULL)
AND (
	(a.account_nbr= '1000766' 
	 AND a.fin_coa_cd= 'IR'
	 AND a.ACCT_EFFECT_DT <= getdate()) OR 
	(a.account_nbr= '1008543'
	 AND a.fin_coa_cd= 'IR'
	 AND a.ACCT_EFFECT_DT <= convert(datetime,'20100701',112)) OR
	(a.account_nbr= '1234' 
	 AND a.fin_coa_cd= 'XX'
	 AND a.ACCT_EFFECT_DT <= getdate())
); TOP 1 univ_fiscal_yr, univ_fiscal_prd_cd
FROM sh_acct_period_t
WHERE row_actv_ind <> 'N'
	AND univ_fiscal_prd_cd <= '12'
	AND univ_fscpd_end_dt >= convert(DATETIME, '20130625', 112)
ORDER BY univ_fiscal_yr, univ_fiscal_prd_cd

Result Schema: A list of following elements (AccountValidation.java)

...