06-13-2009 8:13 AM
My selection screen has select option for date in that it shold take financial year i.e from april to march.
suppose if date-low = dec2008 date-high = feb2008. how shld i write the code for this.validations etc. it should not give error saying lower value is higher than high value.
06-13-2009 10:32 AM
>
> My selection screen has select option for date in that it shold take financial year i.e from april to march.
>
> suppose if date-low = dec2008 date-high = feb2008. how shld i write the code for this.validations etc. it should not give error saying lower value is higher than high value.
It will not show error as you have to give DEC2008 - FEB2009 for fiscal year 2008. Not DEC2008 - FEB2008.
Regards
Karthik D
06-13-2009 8:27 AM
06-13-2009 10:32 AM
>
> My selection screen has select option for date in that it shold take financial year i.e from april to march.
>
> suppose if date-low = dec2008 date-high = feb2008. how shld i write the code for this.validations etc. it should not give error saying lower value is higher than high value.
It will not show error as you have to give DEC2008 - FEB2009 for fiscal year 2008. Not DEC2008 - FEB2008.
Regards
Karthik D
06-13-2009 11:10 AM
06-13-2009 11:17 AM
Hi,
Anyhow you need to be careful with the validations of Fiscal year, i used the below code in one of my reports which gets Date and fiscal year as inputs;
Data : fisYr1(4) TYPE n, fisyr2(4) TYPE n.
CLEAR : fisyr1, fisyr2.
IF S_date-low+4(2) LE 3.
fisyr1 = s_date-low+(4) - 1.
ELSE.
fisyr1 = s_date-low+(4).
ENDIF.
IF S_date-high+4(2) LE 3.
fisyr2 = s_date-high+(4) - 1.
ELSE.
fisyr2 = s_date-high+(4).
ENDIF.
IF fisyr1 NE fisyr2.
invalid_date_Range = 'X'.
ELSEIF fisyr1 NE p_fisyr.
invalid_fiscal_year = 'X'.
ENDIF.
Regards
Karthik D