Skip to Content
author's profile photo Former Member
Former Member

Function module for current year

Hi ,

Is there any function module which will give current year only ??

Regards

rahul

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 23, 2007 at 11:24 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 23, 2007 at 11:26 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 23, 2007 at 11:27 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 23, 2007 at 11:35 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.