Versions Compared

Key

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

...

IndexParameterDescriptionRequired?Data Type (max length)Example
0kfsChartCodeKFS Chart CodeYesString (2)'IR'
1kfsAcctNumberKFS Account NumberYesString(7)'1234567GF12646'
2effectiveDateDate the KFS account needs to be validNo (default is today's date)String(8) YYYYMMDD'20120701' (begin fiscal year 2012/2013)

...

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.ACCT_TYP_CD =<> 'EXCA' AND 
(
	(a.ACCOUNT_NBR= '1000766FG14577' AND 
	 a.FIN_COA_CD= 'IR' AND 
	 a.ACCT_EFFECT_DT <= convert(datetime,'2010070120120630',112)) OR 
	(a.ACCOUNT_NBR= 'FG11955' AND 
	 a.FIN_COA_CD= 'IR' AND 
	 a.ACCT_EFFECT_DT <= getdate()) OR
	(a.ACCOUNT_NBR= 'GF12646' AND 
	 a.FIN_COA_CD= 'IR' AND 
	 a.ACCT_EFFECT_DT <= getdate()) OR
	(a.ACCOUNT_NBR= '1008543UC00370' AND 
	 a.FIN_COA_CD= 'IR' AND 
	 a.ACCT_EFFECT_DT <= getdate()) OR
);

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

...

ParameterDescriptionData TypeExample
kfsChartCodeKFS Chart CodeString (2)'IR'
kfsAcctNumberKFS Account NumberString (7)

'1234567GF12646'

isValidIs the Chart/Account Active for that effective date (or today)?booleantrue

WS Example

Request
Code Block
<soapenv<?xml version="1.0" ?>
<S:Envelope xmlns:soapenvS="http://schemas.xmlsoap.org/soap/envelope/">
	<S:Body>
		<ns2:isValidKFSExpenseAccounts xmlns:adcns2="http://www.adcom.uci.edu">
			<kfsAccountList>
				<kfsAcctNumber>FG11955</kfsAcctNumber>
 <soapenv:Header/>
   <soapenv:Body>
      <adc:isValidKFSExpenseAccounts>
         <kfsAccountList>
            <kfsAcctNumber>1000766</kfsAcctNumber>
            <kfsChartCode>IR</kfsChartCode>
         </kfsAccountList>
         <kfsAccountList>
            <effectiveDate>20110701</effectiveDate>
            <kfsAcctNumber>1053222</kfsAcctNumber>
            <kfsChartCode>IR</kfsChartCode>
         </kfsAccountList>
         <kfsAccountList>
            <effectiveDate>20110321</effectiveDate>
            <kfsAcctNumber>1234</kfsAcctNumber>
            <kfsChartCode>XX</kfsChartCode>
         </kfsAccountList>
      </adc:isValidKFSExpenseAccounts>
   </soapenv:Body>
</soapenv				<kfsChartCode>IR</kfsChartCode>
			</kfsAccountList>
			<kfsAccountList>
				<kfsAcctNumber>GF12646</kfsAcctNumber>
				<kfsChartCode>IR</kfsChartCode>
			</kfsAccountList>
			<kfsAccountList>
				<effectiveDate>20120630</effectiveDate>
				<kfsAcctNumber>FG14577</kfsAcctNumber>
				<kfsChartCode>IR</kfsChartCode>
			</kfsAccountList>
			<kfsAccountList>
				<kfsAcctNumber>UC00370</kfsAcctNumber>
				<kfsChartCode>IR</kfsChartCode>
			</kfsAccountList>
		</ns2:isValidKFSExpenseAccounts>
	</S:Body>
</S:Envelope>
Response
Code Block
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   	<soap:Body>
      		<ns2:isValidKFSExpenseAccountsResponse xmlns:ns2="http://www.adcom.uci.edu">
         <return>
            <kfsAcctNumber>1053222</kfsAcctNumber>
            <kfsChartCode>IR</kfsChartCode>
            <valid>true</valid>
         </return>
         <return>
            <kfsAcctNumber>1234</kfsAcctNumber>
            <kfsChartCode>XX</kfsChartCode>
            <valid>false</valid>
         </return>
         <return>
            <kfsAcctNumber>1000766</kfsAcctNumber>
            <kfsChartCode>IR</kfsChartCode>
            <valid>false</valid>
         </return>
      </ns2:isValidKFSExpenseAccountsResponse>
   
			<return>
				<kfsAcctNumber>FG14577</kfsAcctNumber>
				<kfsChartCode>IR</kfsChartCode>
				<valid>false</valid>
			</return>
			<return>
				<kfsAcctNumber>FG11955</kfsAcctNumber>
				<kfsChartCode>IR</kfsChartCode>
				<valid>true</valid>
			</return>
			<return>
				<kfsAcctNumber>GF12646</kfsAcctNumber>
				<kfsChartCode>IR</kfsChartCode>
				<valid>true</valid>
			</return>
			<return>
				<kfsAcctNumber>UC00370</kfsAcctNumber>
				<kfsChartCode>IR</kfsChartCode>
				<valid>false</valid>
			</return>
		</ns2:isValidKFSExpenseAccountsResponse>
	</soap:Body>
</soap:Envelope>

...

Code Block
DWHServerService dssservice = new DWHServerService();
DWHServer dsserver = dssservice.getDWHServerPort();
		
List<AccountParameters> apList = new ArrayList<AccountParameters> pl4();
		
AccountParameters ap = new AccountParameters();
ap.setKfsAcctNumber("FG11955");
ap.setKfsChartCode("IR");
apList.add(ap);
		
AccountParameters ap2 = new ArrayList<AccountParameters>();
AccountParameters ap41 AccountParameters();
ap2.setKfsAcctNumber("GF12646");
ap2.setKfsChartCode("IR");
apList.add(ap2);
		
// account effective date 07/01/2012
AccountParameters ap3 = new AccountParameters();
ap41.setKfsChartCode("IR");
ap41ap3.setKfsAcctNumber("1000766FG14577");
AccountParameters ap42 = new AccountParameters();
ap42ap3.setKfsChartCode("IR");
ap42ap3.setKfsAcctNumbersetEffectiveDate("105322220120630");
ap42apList.setEffectiveDateadd("20110701"ap3);
		
AccountParameters ap43ap4 = new AccountParameters();
ap43ap4.setKfsChartCodesetKfsAcctNumber("XXUC00370");
ap43ap4.setKfsAcctNumbersetKfsChartCode("1234IR");
ap43apList.setEffectiveDateadd("20110321"ap4);
pl4.add(ap41);
pl4.add(ap42);
pl4.add(ap43);
List<AccountValidation> resultList4 = ds.isValidKFSExpenseAccounts(pl4);
if (resultList4 != null) {
	for (Iterator i = resultList4.iterator(); i.hasNext();) {
		AccountValidation element = (AccountValidation) i.next(
		
List<AccountValidation> resultList = server.isValidKFSExpenseAccounts(apList);
if (resultList != null) {
	for (AccountValidation av : resultList) {
		System.out.println("kfsChartCode       : " + av.getKfsChartCode());
		System.out.println("kfsAccountNumber   : " + av.getKfsAcctNumber());
		System.out.println("\t" + element.getKfsChartCode() + "/" + element.getKfsAcctNumber() + "isValid            : " + elementav.isValid());
		System.out.println("--------------------------");
	}
}
else {
	System.out.println("something bad happened...please check your query");
} 

 

...

getValidKFSAccounts(List of (kfsChartCode, kfsAcctNumber))

...