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

« Previous Version 3 Next »

getKFSActiveFiscalPeriods(date)

This service is used to determine the active fiscal period for a given date. Returns an XML result set with a list of (kfsFiscalYear, kfsFiscalPeriod).

  • 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 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 (FiscalPeriodDetails)

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:getKFSActiveFiscalPeriods xmlns:ns2="http://www.adcom.uci.edu">
			<date>20130715</date>
		</ns2:getKFSActiveFiscalPeriods>
	</S:Body>
</S:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
	<soap:Body>
		<ns2:getKFSActiveFiscalPeriodsResponse xmlns:ns2="http://www.adcom.uci.edu">
			<return>
				<kfsFiscalPeriod>13</kfsFiscalPeriod>
				<kfsFiscalYear>2013</kfsFiscalYear>
			</return>
			<return>
				<kfsFiscalPeriod>01</kfsFiscalPeriod>
				<kfsFiscalYear>2014</kfsFiscalYear>
			</return>
		</ns2:getKFSActiveFiscalPeriodsResponse>
	</soap:Body>
</soap:Envelope>

Java Client Example

DWHServerService service = new DWHServerService();
DWHServer server = service.getDWHServerPort();
List<FiscalPeriodDetails> fpDetailsList = server.getKFSActiveFiscalPeriods("20130715");

if (fpDetailsList != null) {
	for (FiscalPeriodDetails fpDetails : fpDetailsList) {
		System.out.println(fpDetails.getKfsFiscalYear() + " " + fpDetails.getKfsFiscalPeriod());
	}
}
else {
	System.out.println("something bad happened...please check your query");
}

 


  • No labels