Versions Compared

Key

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

Table of Contents

isValidKFSAccounts(List of (kfsChartCode,

...

kfsAcctNumber, effectiveDate))

This service is used to validate KFS account codes. Returns an XML result set with a value of true or false (example isValidKFSAccounts result) for each chart and account

  • This is NOT recommended to pass in same value of (kfsChartCode, kfsAccountCodekfsAcctNumber) but with different effectiveDate.  An unexpected result maybe returned.
  • The order of kfsChartCode, kfsAccountCodekfsAcctNumber, effectiveDate CANNOT be swapped.
  • effectiveDate has to be valid.  Null will be returned otherwise.

...

Code Block
Old:
select distinct
case when not exists (select * FROM dwhs_ods..ca_account_t a  where a.account_nbr= '<kfsAccountCode><kfsAcctNumber>' AND  a.fin_coa_cd= '<kfsChartCode>' 
                       AND a.ACCT_CLOSED_IND <> 'Y' AND ( a.ACCT_EXPIRATION_DT >= getdate() or a.ACCT_EXPIRATION_DT IS NULL)
                       AND (a.ACCT_EFFECT_DT <= <effectiveDate> ) )
then 'false'
else 'true'
end
 
New: 
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= '1000768'
	 AND a.fin_coa_cd= 'IR'
	 AND a.ACCT_EFFECT_DT <= convert(datetime,'20100701',112)) OR
	(a.account_nbr= '1000767' 
	 AND a.fin_coa_cd= 'IR'
	 AND a.ACCT_EFFECT_DT <= getdate())
);

...

Code Block
DWHServerService dss = new DWHServerService();
DWHServer ds = dss.getDWHServerPortCustom();
 
StringArray sa20 = new StringArray();
sa20.getItem().add("IR");
sa20.getItem().add("1000766");
StringArray sa21 = new StringArray();
sa21.getItem().add("IR");
sa21.getItem().add("1000767");
StringArray sa22 = new StringArray();
sa22.getItem().add("IR");
sa22.getItem().add("1000768");
sa22.getItem().add("20090701");
StringArray sa23 = new StringArray();
sa23.getItem().add("XX");
sa23.getItem().add("1234");
sa23.getItem().add("20130321");
		
List<AccountValidation> resultList2 = ds.isValidKFSAccounts(Arrays.asList(sa20, sa21, sa22, sa23));
if (resultList2 != null) {
	for (Iterator i = resultList2.iterator(); i.hasNext();) {
		AccountValidation element = (AccountValidation)i.next();
		System.out.println("\t" + element.getKfsChartCode() + "/" + element.getKfsAcctNumber() + " : " + element.isValid());
	}
} else {
	System.out.println("something bad happened...please check your query");
}

 

...

isValidKFSExpenseAccounts(List of (kfsChartCode,

...

kfsAcctNumber, effectiveDate))

This service is used to validate KFS chart and expense account codes. Returns an XML result set with a value of true or false for each chart/account

  • This is NOT recommended to pass in same value of (kfsChartCode, kfsAccountCodekfsAcctNumber) but with different effectiveDate.  An unexpected result maybe returned.
  • The order of kfsChartCode, kfsAccountCodekfsAcctNumber, effectiveDate CANNOT be swapped.
  • effectiveDate has to be valid.  Null will be returned otherwise.

...

Code Block
Old:
select distinct
case when not exists (select * FROM dwhs_ods..ca_account_t a  where a.account_nbr= '<kfsAccountCode><kfsAcctNumber>' AND  a.fin_coa_cd= '<kfsChartCode>'
                       AND a.ACCT_CLOSED_IND <> 'Y' AND ( a.ACCT_EXPIRATION_DT >= getdate() or a.ACCT_EXPIRATION_DT IS NULL)
                       AND (a.ACCT_EFFECT_DT <= <effectiveDate> ) AND a.ACCT_TYP_CD = 'EX')
then 'false'
else 'true'
end
 
New: 
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.ACCT_TYP_CD = 'EX' AND 
(
	(a.ACCOUNT_NBR= '1000766' AND 
	 a.FIN_COA_CD= 'IR' AND 
	 a.ACCT_EFFECT_DT <= convert(datetime,'20100701',112)) OR 
	(a.ACCOUNT_NBR= '1008543' AND 
	 a.FIN_COA_CD= 'IR' AND 
	 a.ACCT_EFFECT_DT <= getdate())
);

...

Code Block
DWHServerService dss = new DWHServerService();
DWHServer ds = dss.getDWHServerPortCustom();

StringArray sa30 = new StringArray();
sa30.getItem().add("IR");
sa30.getItem().add("1000766");
StringArray sa31 = new StringArray();
sa31.getItem().add("IR");
sa31.getItem().add("1008543");
sa31.getItem().add("20110701");
StringArray sa32 = new StringArray();
sa32.getItem().add("XX");
sa32.getItem().add("1234");
sa32.getItem().add("20110321");
		
List<AccountValidation> resultList3 = ds.isValidKFSExpenseAccounts(Arrays.asList(sa30, sa31,sa32));
if (resultList3 != null) {
	for (Iterator i = resultList3.iterator(); i.hasNext();) {
		AccountValidation element = (AccountValidation)i.next();
		System.out.println("\t" + element.getKfsChartCode() + "/" + element.getKfsAcctNumber() + " : " + element.isValid());
	}
} else {
	System.out.println("something bad happened...please check your query");
} 

 

...

getValidKFSAccounts(List of (kfsChartCode,

...

kfsAcctNumber))

This service is used retrieve valid KFS account and related attributes. Returns an XML result set with a list of accounts (example getAllValidKFSAccounts result). 

...

Code Block
SELECT a.FIN_COA_CD
      ,a.ACCOUNT_NBR
      ,a.ACCOUNT_NM
      ,a.ACCT_FSC_OFC_UID
      ,a.ACCT_SPVSR_UNVL_ID
      ,a.ACCT_MGR_UNVL_ID
      ,a.ORG_CD
      ,a.ACCT_TYP_CD
      ,a.ACCT_PHYS_CMP_CD
      ,a.SUB_FUND_GRP_CD
      ,a.ACCT_FRNG_BNFT_CD
      ,a.FIN_HGH_ED_FUNC_CD
      ,a.ACCT_RSTRC_STAT_CD
      ,a.ACCT_RSTRC_STAT_DT
      ,a.ACCT_CITY_NM
      ,a.ACCT_STATE_CD
      ,a.ACCT_STREET_ADDR
      ,a.ACCT_ZIP_CD
      ,a.RPTS_TO_FIN_COA_CD
      ,a.RPTS_TO_ACCT_NBR
      ,a.ACCT_CREATE_DT
      ,a.ACCT_EFFECT_DT
      ,a.ACCT_EXPIRATION_DT
      ,a.CONT_FIN_COA_CD
      ,a.CONT_ACCOUNT_NBR
      ,a.ENDOW_FIN_COA_CD
      ,a.ENDOW_ACCOUNT_NBR
      ,a.CONTR_CTRL_FCOA_CD
      ,a.CONTR_CTRLACCT_NBR
      ,a.INCOME_FIN_COA_CD
      ,a.INCOME_ACCOUNT_NBR
      ,a.ACCT_ICR_TYP_CD
      ,a.AC_CSTM_ICREXCL_CD
      ,a.FIN_SERIES_ID
      ,a.ICR_FIN_COA_CD
      ,a.ICR_ACCOUNT_NBR
      ,a.ACCT_IN_FP_CD
      ,a.BDGT_REC_LVL_CD
      ,a.ACCT_SF_CD
      ,a.ACCT_PND_SF_CD
      ,a.FIN_EXT_ENC_SF_CD
      ,a.FIN_INT_ENC_SF_CD
      ,a.FIN_PRE_ENC_SF_CD
      ,a.FIN_OBJ_PRSCTRL_CD
      ,a.CG_CFDA_NBR
      ,a.ACCT_OFF_CMP_IND
      ,a.ACCT_CLOSED_IND
      ,CG_ACCT_RESP_ID
      ,b.UC_LOC_CD
      ,b.UC_ACCT_NBR
      ,b.UC_FUND_NBR
      ,b.UCI_CAPITAL_CAT_CD
FROM ca_account_t a
JOIN ca_account_ext_t b on (a.FIN_COA_CD = b.FIN_COA_CD and a.ACCOUNT_NBR = b.ACCOUNT_NBR)
WHERE
  a.ACCT_CLOSED_IND <> 'Y'
  AND (a.ACCT_EXPIRATION_DT >= getdate() or a.ACCT_EXPIRATION_DT IS NULL)
  AND a.ACCT_EFFECT_DT <= GETDATE()
  AND ((a.FIN_COA_CD='<kfsChartCode1>' AND ACCOUNT_NBR='<kfsAccountCode1><kfsAcctNumber1>') OR 
       (a.FIN_COA_CD='<kfsChartCode2>' AND ACCOUNT_NBR='<kfsAccountCode2><kfsAcctNumber2>') OR
       . . . etc
      )
 

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

...