Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

function module to get the posting period based on date

Former Member
0 Kudos

Hi to all,

Is there any function module to get the posting period based on date?

Regards,

Nagesh

7 REPLIES 7

Former Member
0 Kudos

go to SE37 and do DATE_TO_PERIOD_CONVERT

agnihotro_sinha2
Active Contributor
0 Kudos

hi,



CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
      EXPORTING
        I_GJAHR        = GV_GJHAR
        I_PERIV        = GC_24
        I_POPER        = GV_POPER
      IMPORTING
        E_DATE         = S_FKDAT-LOW
      EXCEPTIONS
        INPUT_FALSE    = 1
        T009_NOTFOUND  = 2
        T009B_NOTFOUND = 3
        OTHERS         = 4.
    IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.



    CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
      EXPORTING
        I_GJAHR        = GV_GJHAR
        I_PERIV        = GC_24
        I_POPER        = GV_POPER
      IMPORTING
        E_DATE         = S_FKDAT-HIGH
      EXCEPTIONS
        INPUT_FALSE    = 1
        T009_NOTFOUND  = 2
        T009B_NOTFOUND = 3
        OTHERS         = 4.
    IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

ags.

Former Member
0 Kudos

use DATE_TO_PERIOD_CONVERT.

Former Member
0 Kudos

Try this function module : " HR_HCP_GET_POSTING_PERIODS "

Former Member
0 Kudos

DATE_TO_PERIOD_CONVERT and check the field BUPER

Former Member
0 Kudos

Try this FM,

call function 'FI_PERIOD_DETERMINE'

exporting

i_budat = p_datum

i_bukrs = p_bukrs

importing

e_gjahr = year

e_poper = period.

Regards,

Joan

Former Member
0 Kudos

Hi,

use these FM's

FI_PERIOD_DETERMINE AND

FI_PERIOD_CHECK

Regards,

Jyothi CH.