cancel
Showing results for 
Search instead for 
Did you mean: 

Display Financial Year using system date

Former Member
0 Kudos

Dear All,

I am trying to display fiscal year based on system date.For this I am using FM:get_current_year.This not giving expected result.Please suggest!

Thanks,

Reddy.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sudhir,

This is not webdynpro related question.

I Think try by using this FM.. GM_GET_FISCAL_YEAR

data: lv_sydt type sy-datum,

lv_fisc type char4.

*lv_sydt = sy-datum.

call function 'GM_GET_FISCAL_YEAR'

exporting

i_date = sy-datum

i_fyv = 'V3'

importing

e_fy = lv_fisc.

Cheers,

Kris.

Former Member
0 Kudos

Dear Kris,

Thanks for ur reply.I tried this FM GM_GET_FISCAL_YEAR,but it is giving 2011 as fiscal year for the current system date(25-May-2011).My requirement is to output fiscal year as 2011-2012 as fiscal year according to the current system date.

Thanks,

Sudheer.

former_member184578
Active Contributor
0 Kudos

Hi.,

For this no need function module., you can create one.,

data: year(4) type c,

year1(4) type c,

date(10) type c,

fis_year type string.

date = sy-datum.

year = date+0(4).

year1 = year + 1.

concatenate year year1 into fis_year seperated by '-'.

now fis_year contains the fiscal year.

hope this helps u.,

Thanks & Regards,

Kiran

Former Member
0 Kudos

Thanks for qucik reply.but to handle all the scnarios I made the changes in the code like below.Let me know any corrections needed.

data: year(4) type c,

year0(4) type c,

year1(4) type c,

date(10) type c.

fis_year type string.

date = sy-datum.

year = date+0(4).

if date+4(2) gt 03.

year1 = year + 1.

concatenate year year1 into fis_year separated by '-'.

else.

year0 = year - 1.

concatenate year0 year intofis_year separated by '-'.

ENDIF.

Thanks,

Sudheer.

Edited by: ksr_sudhir on May 25, 2011 4:25 PM

former_member184578
Active Contributor
0 Kudos

Hi.,

Yes it is write., in case of any errors reply us.,

Thanks & Regards

Kiran