SAP HR ABAP Functions EN
SAP HR ABAP Functions EN
HR ABAP
Abstract
This guide explores the integration of HR processes with SAP ABAP, focusing on customizing and
automating HR functions within the SAP environment. It covers key ABAP concepts and techniques
tailored to HR modules, providing practical examples for enhancing data management and
reporting. The document is designed for professionals looking to optimize HR operations using
SAP’s tools.
Mert Bozkurt
[email protected]
HR ABAP FUNCTIONS
1
Table of contents
Date and Time Functions ........................................................................................................................................... 3
The month on the date entered; First and last days .......................................................................................................... 3
Number of years, months, days between two dates ......................................................................................................... 3
The date of n months later or n months ago .................................................................................................................... 3
Working days in the month on the date entered ............................................................................................................. 4
Last day of the following month ........................................................................................................................................ 4
Last day of the previous month .......................................................................................................................................... 4
HR Process Functions ................................................................................................................................................ 5
Personnel Management ( PA ) ....................................................................................................................................................... 5
Reading personnel information .......................................................................................................................................... 5
Locking down personnel data ............................................................................................................................................. 5
Management of personnel infotypes (read, write, update) ............................................................................................ 5
Unlocking personnel data .................................................................................................................................................... 5
Functions that give dates of entry and exit from work ................................................................................................... 6
Function that returns some types of information .............................................................................................................. 6
Personnel Development (PD) ...................................................................................................................................................................7
Links to the selected Organizational Unit ......................................................................................................................... 7
Information of the selected Organizational Unit ............................................................................................................. 7
Finding the Manager (Hat) of the desired Organization or Upper Organizations ................................................... 8
List of employees in the selected organizational unit ...................................................................................................... 8
Payroll & Salary Calculation ( PY ) ........................................................................................................................................................9
Pulling the Table of Wage Types from the Payroll ........................................................................................................ 9
2
Date and Time Functions
3
"Working days in the month on the date entered
DATA: lt_dates TYPE TABLE OF rke_dat.
4
HR Process Functions
"Personnel information
5
"Functions that give dates of entry and exit from work
6
Personel Development (PD)
7
"Finding the Manager (Hat) of the desired Organization or Upper Organizations
DATA: lt_objec TYPE TABLE OF objec,
lt_manager TYPE TABLE OF objec.
DATA(ls_objec) = lt_objec[ 1 ].
"İstenilen organizasyon alınır veya Tüm organizasyonlar için döngü kurulabilir.
8
Payroll (PY)
DATA(ls_rgdir) = VALUE
#( lt_rgdir[ payty = space srtza = 'P' fpper = lv_fpper ] OPTIONAL ).
IF ls_rgdir IS INITIAL.
ls_rgdir = VALUE
#( lt_rgdir[ payty = space srtza = 'A' fpper = lv_fpper ] OPTIONAL ).
IF sy-subrc <> 0.
RETURN.
ENDIF.
ENDIF.
9
10