How to get fiscal year end date in Oracle HRMS Payroll
PL-SQL Function to get end date of fiscal year, in the provided date parameter.
CREATE OR REPLACE FUNCTION APPS.CUST_GET_FISCAL_YEAR_END (P_SYSDATE IN DATE)
RETURN DATE
IS
/*
PROGRAM ID :
APPS.CUST_GET_FISCAL_YEAR_END
DESCRIPTION :
RETURN FISCAL END DATE OF THE DATE PROVIDED
*******************************************************************************************
*/
RESULT DATE;
BEGIN
SELECT TO_DATE ('30-JUN-' || TO_CHAR (ADD_MONTHS (TRUNC (P_SYSDATE), +6),
'YYYY')) AS FY_END
INTO RESULT
FROM DUAL;
RETURN RESULT;
EXCEPTION
WHEN OTHERS
THEN
RETURN NULL;
END;
/
0 comments: