Professional Documents
Culture Documents
Introduction to Human Resources Module Basic elements of HR Lets recap the ABAP
Personnel Management Time Management Payroll Benefits Organizational Management Training & Event Management Travel Management Information System
Basic Elements of HR
Company Code
Personnel area
Cost Center
Payroll area
Personnel Sub-area
Employee Group
Organizational unit
Job
Employee Subgroup
Position
ABAP RECAP
Generally in ABAP the following are done :
1) Table development via SE11 2) Data Processing through internal tables 3) Report development through SELECT statements 4) Data base updation through BDC / BAPI 5) SAP Queries 6) Scripts and smart forms
Programming with Info types Logical Data Base Macros Dealing with the Repetitive structures Cluster Programming for Payroll / Time aspects Storage and access of data Special programming commands Authorization checks Ad-hoc queries HR Forms Interface Toolbox
Concepts of Infotypes
8
What is an Infotype?
A group of related data fields Appears as an entry screen for the user Time dependent storage. Identifiable through a four character numerical string Database table associated with it PAnnnn for transparent tables in Personnel Administration PBnnnn for transparent tables in Recruitment HRPnnnn for transparent tables in Personnel Planning
Number Ranges
9
0000 0999 1000 1990 2000 2999 4000 4999 9000 9999
Examples
Org Assignment 0001, Personal Data 0002 Addresses 0006, Family Member/Dependents - 0021
Logical Databases in HR
14
To reduce programming efforts, HR often make use of the logical databases when creating reports. Logical databases are special ABAP Programs that provides Standard selection screen, Data retrieval and Authorization check. Logical Databases used In HR
1. 2. 3.
4. 5.
PAP ( Applicant administration ) PNP ( Personnel Management ) PNPCE - Enhanced version of PNP available form SAP Enterprise version onwards ( Personnel Management ) PCH ( Organisational Management ) PTRVP ( Travel Management )
Macros in HR
15
Like subroutines and function modules, macro modules can be used to modularize programs. Macro modules are frequently used in HR. These macros are defined in program SAPDBPNP (include DBPNPMAC) with the keyword DEFINE. They can be used in any program that uses the logical database PNP. If you want to use these macros in reports that do not use the logical database PNP, you must include program DBPNPMAC with the keyword INCLUDE. You can also define your own macros. In accordance with the naming convention, the first two letters stand for the application. Some macros are also stored in the Macros in ABAP Programs table (TRMAC)
It is not necessary to include logical database PNP in your program when you are using the macro like RP-READ-INFOTYPE A B C D E , where A corresponds to PERNR which describes for which personnel number you require records. B corresponds to INFOTYPE which describes from which infotype you require records. C corresponds to data structure of the declared infotype (internal table like p0000 for infotype 0000) where all the records of the particular personnel number will be stored.
PCLn
A1
A2
A3
17
PCL4 PCL5
P2 U1
STXL
TX
TX TA
RU ID
PY CP
2.
3.
IMPORT / EXPORT
19
Various scenarios
IT-0025 (Appraisals)
DO 20 TIMES VARYING s_wagetypes FROM p0008-lga01 NEXT p0008lga02. IF s_wagetypes-wage type IS INITIAL. EXIT. ELSE. WRITE: / s_wagetypes-wagetype, s_wagetypes-amount. ENDIF. ENDDO.
Hamburg
Munich
The ABAP syntax for the provide is as follows: PROVIDE * FROM Pmmmm * FROM Pnnnn BETWEEN PN-BEGDA AND PN-ENDDA.
Hamburg / programmer Hamburg / course instructor
July - December
Program
Export UPDATE
PCLn
Import
Buffer
To minimize the number of times that the database is accessed, import and export data is buffered in the main memory. If a test run is performed, the database is not updated. However, the payroll results of the previous period form the basis of the calculation used to determine the results of the subsequent period. For this reason, a difference arises between the results of a live payroll run and the results of a test run if test runs are performed for several periods. Using the buffer enables you to access the required results from the previous period.
26
I ) The clusters can be called from macros. RP-IMP-Cn-xx ( n = 1,2,3,4 and xx is cluster) RP-EXP-Cn-xx ( n = 1,2,3,4 and xx is cluster) II) Use the following code in your ABAP programs to import data from a cluster. IMPORT ITAB1 ITAB2 STRUC1............. FROM DATABASE TABNAME(CLUSTER_ID) ID KEY EXPORT ITAB1 ITAB2 STRUC1 TO DATABASE TABNAME(CLUSTER_ID) ID KEY.
HR Form editor
HR form editor is a Customizing tool used for designing payroll related forms in HR.
4. Other Statements
28
?
Questions
Thank You