Function FISCALYEAR
TABLE OF CONTENTS
- What is FISCALYEAR?
- How do I use FISCALYEAR?
- Syntax
- Rules for the syntax
- Examples: FISCALYEAR function in ERF
- Examples: FISCALYEAR function in ECL
What is FISCALYEAR?
FISCALYEAR returns a year based on the fiscal values in the control record defined for the view. This means that different views running in the same batch can have different fiscal dates. By comparison, RUNDAY is the same for all views in a batch.
You can override the fiscal date(s) with the extract job parameters FISCAL_DATE_DEFAULT and FISCAL_DATE_OVERRIDE. See GVBMR95 parameters.
The FISCALYEAR returns a date in CCYY format based on the fiscal settings for the current view.
How do I use FISCALYEAR?
The parameter for FISCALYEAR is a number of years to add or delete from the default FISCALYEAR. For example, FISCALYEAR(-5) provides the year that is five years before the date the view is run.
FISCALYEAR can only be used in Extract-Phase Logic.
Syntax
Rules for the syntax
FISCALYEAR can only be used in Extract Record Filter (ERF) and Extract Column Logic (ECL) text.
See also topic: Rules for all Logic Text
Examples: FISCALYEAR function in ERF
Example logic text | Meaning |
---|---|
IF ({field4} = FISCALYEAR(-1)) THEN SELECT ENDIF |
Select any input records where field4 is the previous fiscal year and skip all other records. The example at left assumes that field4 is a fiscal year number. The code at left can also be written as: SELECTIF({field4} >= FISCALYEAR(-1)) |
Examples: FISCALYEAR function in ECL
Example logic text | Meaning |
---|---|
COLUMN = FISCALYEAR() | Set the current column to the current fiscal year number. |