10-24-2007 3:15 PM
hi,
I have to convert date in finantial year format
e.g if the date range is 01.01.2007 to 31.03.2008 then o/p -
> 2007-2008
if the date range is 01.04.2006 to 31.03.2007 then o/p----
>2006-2007
is there any FM to convert this.......
10-24-2007 3:29 PM
GET_CURRENT_YEAR Get the current fiscal year.
Example:
CALL FUNCTION 'GET_CURRENT_YEAR'
EXPORTING
BUKRS = '1000' " Company Code
DATE = SY-DATUM " Date to find fiscal year for
IMPORTING
CURRM = w_currm " Current Fiscal Month
CURRY = w_curry " Current Fiscal Year
PREVM = w_prevm " Previous Fiscal Month
PREVY = w_prevy. " Previous Fiscal Year
===================================
Try out below as well
GM_GET_FISCAL_YEAR
ME_DETERMINE_GJAHR
Thanks & Regards
ilesh 24x7
10-24-2007 3:21 PM
Hello Sagar,
Use FM GM_GET_FISCAL_YEAR
You need to give:
I_DATE = your date
I_FYV = 'V3' .......... this is the fiscal year variant for April to March months.
FM will return fiscal year in E_FY
You need to use the FM 2 times to get both years.
Regards,
Naimesh.
10-24-2007 3:29 PM
Hi,
Try like this:
select-options: v_date for sy-datum.
data: d1yy(4) type N,
d2yy(4) type N,
fyy(10) type C.
d1yy = v_date-low+0(4).
d2yy = v_date-high+0(4).
concatenate d1yy '-' d2yy into fyy.
write: d1yy,
d2yy,
fyy.
Regards,
Bhaskar
10-24-2007 3:29 PM
GET_CURRENT_YEAR Get the current fiscal year.
Example:
CALL FUNCTION 'GET_CURRENT_YEAR'
EXPORTING
BUKRS = '1000' " Company Code
DATE = SY-DATUM " Date to find fiscal year for
IMPORTING
CURRM = w_currm " Current Fiscal Month
CURRY = w_curry " Current Fiscal Year
PREVM = w_prevm " Previous Fiscal Month
PREVY = w_prevy. " Previous Fiscal Year
===================================
Try out below as well
GM_GET_FISCAL_YEAR
ME_DETERMINE_GJAHR
Thanks & Regards
ilesh 24x7