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: 

FM to find payroll period, based on start and end dates.

Former Member
0 Kudos
3,593

Hi All,

My requirement is to find payroll period, based on the start and end dates entered on the selection screen.

Is there any FM available for this?

Thank you.

1 ACCEPTED SOLUTION

former_member226519
Active Contributor
0 Kudos
842

infotype 0001 of a personnel number provides the payroll area (ABKRS).

with ABKRS you have to read table T549A to get PERMO

with PERMO, start date and end date you will get the periods from table T549Q

4 REPLIES 4

Former Member
0 Kudos
842

HI,

Please check the FM HR_PAYROLL_PERIODS_GET .

Thanks.

peter_ruiz2
Active Contributor
0 Kudos
842

Hi,

You may use any of these FMs.

HRAR_GET_PAYROLL_PERIOD

HR_PAYROLL_PERIODS_GET

HR_MX_GET_PAYROLL_PERIOD

HR_PAYROLL_PERIOD_GET

Regards,

Peter

Former Member
0 Kudos
842

Hi Sagar,

CALL FUNCTION HR_PT_GET_PAYROLL_RESULTS:

PARAMETERS: P_PERNR TYPE P0000-PERNR,
            P_STDATE TYPE PC261-FPBEG,
            P_ENDATE TYPE PC261-FPEND.


CALL FUNCTION 'HR_PT_GET_PAYROLL_RESULTS'
  EXPORTING
    p_pernr                    = P_PERNR
   FPPER_BEGDA                 = P_STDATE
   FPPER_ENDDA                 = P_ENDATE
  tables
    result_tab                  = IT_RESTAB
* EXCEPTIONS
*   NO_RESULTS                  = 1
*   NO_READ_AUTHORITY           = 2
*   IMPORT_MISMATCH_ERROR       = 3
*   T500L_ENTRY_NOT_FOUND       = 4
*   OTHERS                      = 5
          .
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

ENDIF.

Thanks

Sri

former_member226519
Active Contributor
0 Kudos
843

infotype 0001 of a personnel number provides the payroll area (ABKRS).

with ABKRS you have to read table T549A to get PERMO

with PERMO, start date and end date you will get the periods from table T549Q