Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

getKFSActiveFiscalPeriodAccounts(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.

  • date has to be valid.  Null will be returned otherwise.

Input Specifications

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

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())
);

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

ParameterDescriptionData TypeExample
kfsFiscalYearKFS Fiscal YearInteger2014
kfsFiscalPeriodKFS Fiscal PeriodString (2)

'01'

WS Example

Request
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
	<S:Body>
		<ns2:getKFSActiveFiscalPeriod xmlns:ns2="http://www.adcom.uci.edu">
			<date>20130625</date>
		</ns2:getKFSActiveFiscalPeriod>
	</S:Body>
</S:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
	<soap:Body>
		<ns2:getKFSActiveFiscalPeriodResponse xmlns:ns2="http://www.adcom.uci.edu">
			<return>
				<kfsFiscalPeriod>01</kfsFiscalPeriod>
				<kfsFiscalYear>2014</kfsFiscalYear>
			</return>
		</ns2:getKFSActiveFiscalPeriodResponse>
	</soap:Body>
</soap:Envelope>

Java Client Example

DWHServerService service = new DWHServerService();
DWHServer server = service.getDWHServerPort();
FiscalPeriodDetails fpDetails = server.getKFSActiveFiscalPeriod("20130625");
if (fpDetails != null) {
	System.out.println(fpDetails.getKfsFiscalYear() + " " + fpDetails.getKfsFiscalPeriod());
}
else {
	System.out.println("something bad happened...please check your query");
}

 


  • No labels