‎2007 Oct 23 12:22 PM
Hi ,
Is there any function module which will give current year only ??
Regards
rahul
‎2007 Oct 23 12:24 PM
hi
data: var type sy-datum.
var = sy-datum+0(4).
this will give u the current year.
is it necessary for u to use function module?
regards
katrhik
‎2007 Oct 23 12:26 PM
Hi katrhik
Thanks for your reply !
Yes...I need function module only .
Regards
rahul
‎2007 Oct 23 12:29 PM
Hi Sharma..
We can call the FM
<b>GET_CURRENT_YEAR</b>
Reward if Helpful.
‎2007 Oct 23 12:35 PM
Hi All,
I got the function module HR_IN_GET_DATE_COMPONENTS
Thanks for your help ....points rewarded !
Regards
rahul
‎2007 Oct 23 12:26 PM
hi,
i dont think so there is any function which gives u the current year only.but u can easily code it by taking it in string format getting the last 4 characters of string.
regards,
sohi
‎2007 Oct 23 12:27 PM
Hi,
FM MARV_READ with MARV_BUKRS = Your company code.
wmarv-lfgja = Current Year &
wmarv-lfmon = current period.
I hope his helps,
Regards
Raju Chitale
‎2007 Oct 23 12:35 PM
data : a(20).
<b>CALL FUNCTION 'GM_GET_FISCAL_YEAR'</b>
EXPORTING
I_DATE = SY-DATUM
i_fyv = 'V3'
IMPORTING
E_FY = a.
EXCEPTIONS
FISCAL_YEAR_DOES_NOT_EXIST = 1
NOT_DEFINED_FOR_DATE = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write : a.