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

Function Module

Hi All,

Is there is any standard function module for getting finacial month and year , if we pass current date as input.

Regards,

Nikhil

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Sep 20, 2007 at 01:53 PM

    Sure, you will need to pass the company code, or a calendar id as well.

    
    report zrich_0001 .
    
    data: period like t009b-poper,
          year like bkpf-gjahr.
    
    call function 'FI_PERIOD_DETERMINE'
         exporting
              i_budat = sy-datum
              i_bukrs = '0010'
         importing
              e_gjahr = year
              e_poper = period.
    
    write:/ period, year.
    
    

    Regards,

    RIch Heilman

    Add a comment
    10|10000 characters needed characters exceeded

    • Unfortunately, if you are looking for FI period, these are always tied to a company code, and/or fiscal year variant. This funciton module works from this, if you provide the company code, it will find the specific fiscal year variant that it needs to determine the fiscal period/year, if you provide the fiscal year variant directly, it will simply use that fiscal year variant to determine the period.

      The fiscal year variants are stored in table T001 specific to the company code.

      Regards,

      RIch Heilman

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 01:52 PM

    FM - 'FI_PERIOD_DETERMINE'

    CALL FUNCTION 'FI_PERIOD_DETERMINE'

    EXPORTING

    I_BUDAT =

    • I_BUKRS = ' '

    • I_RLDNR = ' '

    • I_PERIV = ' '

    • I_GJAHR = 0000

    • I_MONAT = 00

    • X_XMO16 = ' '

    • IMPORTING

    • E_GJAHR =

    • E_MONAT =

    • E_POPER =

    • EXCEPTIONS

    • FISCAL_YEAR = 1

    • PERIOD = 2

    • PERIOD_VERSION = 3

    • POSTING_PERIOD = 4

    • SPECIAL_PERIOD = 5

    • VERSION = 6

    • POSTING_DATE = 7

    • OTHERS = 8

    .

    IF SY-SUBRC <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    Regards

    vasu

    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.