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.
- date has to be valid. Null will be returned otherwise.
Input Specifications
Index | Parameter | Description | Required? | Data Type (max length) | Example |
---|---|---|---|---|---|
0 | date | The date to search for active fiscal period | No (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 (AccountValidation.java)
Parameter | Description | Data Type | Example |
---|---|---|---|
kfsFiscalYear | KFS Fiscal Year | Integer | 2014 |
kfsFiscalPeriod | KFS Fiscal Period | String (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"); }