on 05-24-2011 12:10 PM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.