You are on page 1of 130

ABAP Workshop (V.

4)

Programming in HR

Introductions
Your instructor. You !
Name Experience ( SAP / HR ) Expectations - Objectives

Course Objectives
By the end of this course you will be :
Familiar with the special features of programming in HR Able to use HR specific commands and function modules to query and report information from Personnel Administration and Personnel Development Able to report on the results from a Payroll run.

Agenda
Introduction / HR Overview Logical database PNP Views - JOIN & PROJECTION Reading Infotypes Time data Repetitive structures Evaluating Payroll Results Logical database PCH Infotype enhancement Other features (inc. Logical DB PAP)

Chapter 1
HR Overview

HR Components
PA - Personnel Management
Personnel Administration Time Management Payroll Benefits Recruitment Business Trip Management

HR Components
PD - Personnel Development & Planning
Organisational Management Training & Event Management Personnel Development Shift Planning Qualifications / Skills Catalogue Personnel Costs

Organisational Management
Organisational Plan
Organisational Unit (O) Position (S) Job (C) Task (T) Person (P)

Other Object Types


Work Centres Cost Centres Qualifications

Organisational Structure
Organisational Unit

Positions

Position Position Position Finance Financial Director Accountant Advisor

Tasks

Jobs

People

SAP HR Concepts
Infotype
Grouping of related data fields Facilitates data entry Allows time dependant data storage Provides information structure

Infogroup
Collection of related infotypes

Action
Execution of an Infogroup ( eg. Hiring )

Sample Action Hiring an Employee


Relevant Infotypes :
Actions (Infotype 0000) Personal Data (Infotype 0002) Organisational Assignment (Infotype 0001) Addresses (Infotype 0006) Planned Working Time (Infotype 0007) Basic Pay (Infotype 0008) Leave Entitlement (Infotype 0005) Bank Details (Infotype 0009) Tax Data (Infotype 0065) National Insurance (Infotype 0069)

Chapter 1: Exercise
Objective:
Become familiar with Infotype navigation & contents

Chapter 1: Summary
The main components of the SAP HR module are:
PA - Personnel Management PD - Personnel Development & Planning

HR data is held in structures known as Infotypes.

Chapter 2
Logical database PNP

Chapter 2 - Objectives
By the end of this chapter you will be able to:
Explain the function of the Logical Database PNP Use reports to select from the PA Database according to :
A specific selection period Data for specific individuals A specified sort sequence

Define and use your own Report Categories.

Logical Databases for HR

PNP - Personnel Administration

PCH - Personnel Planning


PAP - Recruitment ( v.4.0 only )

Functions of a Logical Database

Data Retrieval

SAP DB

PNP

Screening

Authorisation Checking

PA : Structures & Tables


Logical Structures Pnnnn
PAnnnn

Database Tables

PSnnnn

PBnnnn

Qnnnn

PCLn

Data Retrieval
Create an internal table for each Infotype :
REPORT Zxxxxxxx. TABLES pernr. INFOTYPES : 0001, 0002.

Fill data structures with the infotype records :


GET pernr.

Reading Master Data


REPORT Zxxxxxxx. TABLES: pernr. INFOTYPES:0001, . . , nnnn.
GET pernr. PROVIDE * from Pnnnn BETWEEN PN-BEGDA AND PN-ENDDA. . . ENDPROVIDE.

Period Related Data


Current / Period Related Data
Selection
Period Personal Data Basic Pay

Jan

July

Current
Period

PROVIDE / RP-PROVIDE-FROM-LAST

Sorting
The standard sort sequence lists personnel numbers in ascending order. The sort function allows you to sort report data by organisational criteria. The sort functionality is provided as part of the logical database engine

Chapter 2: Exercise 2.1


Employee List Report. ZDEG240_xx_021.

Default Values on the Selection Screen


INITIALIZATION.
PNPTIMED = D.

PNPPERNR-LOW PNPPERNR-HIGH PNPPERNR-OPTION PNPPERNR-SIGN APPEND PNPPERNR.


GET PERNR. . . .

= = = =

1. 9999999. BT. I.

Report Categories

Chapter 2: Exercise 2.2


Report Categories. Selection Screen Modification. ZDEG240_nn_022

Chapter 2: Summary In this chapter we have discussed :


The basic purpose of the Logical Database PNP How to read current and related data How to read data for specific individuals How to create and use new report categories containing the user defined selection fields.

Chapter 3
Join & Projection

Chapter 3 - Objectives
By the end of this chapter you will be able to :
Process more than one infotype within a PROVIDE ENDPROVIDE loop Process an infotype according to whether changes have been made to specific fields Read time-dependent table entries

Views - Join & Projection


Join - Creating Intervals
Personal Data Org Assignment

Join

Coding a Join
INFOTYPES: 0001, 0002.

GET PERNR.
PROVIDE * FROM P0001 * FROM P0002 BETWEEN PN-BEGDA AND PN-ENDDA.

. . . ENDPROVIDE.

Time Constraints
Hired

2 3
TIME -->

Projection
Employee : Bob. Position Programmer.

Hired Jan 1996 Personnel Area 1

Jan 1997 Personnel Area 2

Jan 1998 Personnel Area 2

Dec 1998

Requirement - How long has Bob been a programmer?.

Jan 1996

Dec 1998

Coding a Projection

INFOTYPES:

0001.

GET PERNR.
PROVIDE STELL FROM P0001 BETWEEN PN-BEGDA AND PN-ENDDA. . . . ENDPROVIDE.

Join & Projection Combined


Infotype 0001 - Organisational assignment
Jan 1998 ( Hired ) Dec1998

Infotype 0002 - Personal details


Jan 1998 ( Single ) Apr 1998 ( Married ) Dec1998

Result :
Jan 1998

Job (0001), NI Num (0002).


Dec1998

Reading Time Dependent Table Entries


SELECT * FROM T513S WHERE . . . AND BEGDA LE P0001-BEGDA AND ENDDA GE P0001-ENDDA. ENDSELECT.

I/Type 0001 T513S

Chapter 3: Exercises
Exercise 3.1
Employee Name & Address Report ZDEG240_xx_031

Exercise 3.2
Employee Job Report ZDEG240_xx_032

Views - Join & Projection : Summary


A JOIN enables the user to see the relationships between Infotypes through time A PROJECTION is used to query data dependent on changes to specified fields only JOIN and PROJECTION are logical database operations, and can be used together Some HR control tables contain time dependent data these must be queried for the value that is valid at the required point in time

Chapter 4
Reading Infotypes

Chapter 4 - Objectives
By the end of this chapter you will be able to : Use macros to process HR data Read Infotypes without using a Logical Database

RMAC Macros

Selecting a Specific Infotype Record


Data Selection Period Jan Infotype nnnn Dec

RP-PROVIDE-FROM-FRST Pnnnn SPACE PN-BEGDA PN-ENDDA RP-PROVIDE-FROM-LAST PnnnnSPACE PN-BEGDA PN-ENDDA

RP_SET_DATA_INTERVAL
Data Selection Period July Infotype nnnn Dec

START-OF-SELECTION. RP_SET_DATA_INTERVAL Pnnnn PN-BEGDA PN-ENDDA.

Result

RP-READ-T001P
Table : T001P - Personnel Area / Subarea
AREA SUB AREA COUNTRY GROUPING PAY SCALE AREA PAY SCALE TYPE

REPORT Zxxxxxxx. TABLES: PERNR, T001P. . GET PERNR. RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA. RP-READ-T001P P0001-WERKS P0001-BTRTL SPACE.

Reading Infotypes without the Logical DB


INFOTYPES: 0001. PARAMETERS: P_PERNR LIKE P0001-PERNR. CALL FUNCTION HR_READ_INFOTYPE EXPORTING PERNR = P_PERNR INFTY = 0001 BEGDA = start date ENDDA = end date IMPORTING SUBRC = return value TABLES INFTY_TAB = P0001 EXCEPTIONS INFTY_NOT_FOUND = 1 OTHERS = 2.

Chapter 4: Exercise
Employee Payments & Deductions Report ZDEG240_xx_041

Reading Infotypes : Review


Macros are a common feature of HR reports. Code for macros is stored in the table TRMAC or explicitly defined using the DEFINE keyword. HR data can be read from a report that does not use a Logical Database by using the function module HR_READ_INFOTYPE.

Chapter 5 Time data

Chapter 5 - Objectives
By the end of this chapter you will be able to :
Explain the dependency of Time Data on the Validity Period Use a macro to import Time Data Process the imported Time Data by using an internal table

Time Data
Data Selection Period
20th April 10th May

Leave 15 days

Result from PROVIDE

15 days

Importing Time Data


GET PERNR will not fill this infotype table when it is specified with Mode N.

TABLES: PERNR. INFOTYPES: 2001 MODE N.

GET PERNR.
RP-READ-ALL-TIME-ITY PN-BEGDA PN-ENDDA. LOOP AT P2001. . . . ENDLOOP.

Importing Time Data into an Internal Table


INFOTYPES : 0001, 2001 MODE N. DATA : BEGIN OF ITAB OCCURS 0, BUKRS LIKE P0001-BUKRS, WERKS LIKE P0001-WERKS, AWART LIKE P2001-AWART, ABWTG LIKE P2001-ABWTG, END OF ITAB. GET PERNR. RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PNENDDA. MOVE-CORRESPONDING P0001 TO ITAB. RP-READ-ALL-TIME-ITY PN-BEGDA PN-ENDDA. LOOP AT P2001. MOVE-CORRESPONDING P2001 TO ITAB. COLLECT ITAB. ENDLOOP.

Chapter 5: Exercises
Exercise 5.1
Absence Data Report ZDEG240_xx_051

Exercise 5.2
Cumulated Absences ZDEG240_xx_052

Time Data: Review Time data :


Is stored in Infotypes in the range 2001 - 2999 Is dependent upon the validity period Should not be accessed by using the PROVIDE statement, but via use of the special macro RP-READ-ALL-TIME-ITY. This will allow time data to be imported according to the given data selection period.

Chapter 6 Repeat Structures & Displaying Lists

Chapter 6 - Objectives
By the end of this chapter you will be able to :
Identify and evaluate Infotypes that use repetitive structures within your ABAP code Output a list using Table Control

Identifying Infotypes with Repeat Structures

Processing Repeat Structures I

* Define Work Area. DATA: BEGIN OF WAGETYPES, LGA LIKE P0008-LGA01, BET LIKE P0008-BET01, ANZ LIKE P0008-ANZ01, EIN LIKE P0008-EIN01, OPK LIKE P0008-OPK01, END OF WAGETYPES.

Processing Repeat Structures II


GET PERNR. RP-PROVIDE-FROM-LAST P0008 SPACE PN-BEGDA PN-ENDDA. DO 20 TIMES VARYING WAGETYPES FROM P0008-LGA01 NEXT P0008-LGA02. IF WAGETYPES-LGA IS INITIAL. EXIT. ELSE. WRITE: / WAGETYPES-LGA, WAGETYPES-BET. ENDIF. ENDDO.

Chapter 6: Exercise 6.1


Employee Wage Report ZDEG240_xx_061

Function Module: HR_DISPLAY_BASIC_LIST I


END-OF-SELECTION. CALL FUNCTION HR_DISPLAY_BASIC_LIST EXPORTING BASIC_LIST_TITLE = Title here FILE_NAME = File name HEAD_LINE1 = Header TABLES DATA_TAB = <itab> FIELDNAME_TAB = <field names> ERROR_TAB = <errtab> EXCEPTIONS ...

Function Module: HR_DISPLAY_BASIC_LIST II


* data table DATA : BEGIN OF DATATAB OCCURS 20, PERNR LIKE PERNR-PERNR, ENAME LIKE PERNR-ENAME, etc ... END OF DATATAB. * column headers DATA : BEGIN OF FIELDNAMES OCCURS 20, TITLE(60), TABLE(6), FIELD(10), TYPE(1), END OF FIELDNAMES. *errors DATA : BEGIN OF ERRTAB OCCURS 10. INCLUDE STRUCTURE HRERROR. DATA : END OF ERRTAB.

Chapter 6: Exercise 6.2


Employee Wage Report with Table Control Display ZDEG240_xx_062

Repeat Structures: Review


In certain Infotypes data is entered in a table format and stored on the database as repeating groups of fields. Loop processing can be used to move data block by block to a work area, for further processing within your ABAP program. The function module HR_DISPLAY_BASIC_LIST can be used in your ABAP program to allow data display using the additional features of a Table Control.

Chapter 7

Importing & Exporting Database Tables. Evaluating Payroll Results.

Chapter 7 - Objectives
By the end of this chapter you will be able to :
Import & Export Cluster Data Structures Understand the cluster definition of payroll results Import & Evaluate payroll results using the function modules CU_READ_RGDIR and CD_EVALUATION_PERIODS Understand the function of the Cluster Directory Manager

Database Tables in HR
PAnnnn PCL1 PCL2 PCL3 PCL4 PCL5 HR data DB for HR work areas Accounting results Recruitment data Documents Cost planning

Database Tables PCL1 & PCL2


PCL1
B1
PC TS TX

PCL2
L1 B2
ZL Z1 RX

G1
TE

PS

CU
PT xy

Importing / Exporting Database Tables


Import / Export files in HR
PCLn
RX PC CD B1 TE
IMPORT

Tables : PCLn.

EXPORT

Key definition PCLn : CLIENT 3 Client RELID 2 Relation ID SRTFD 40 Work area key SRTF2 10 Sort field for duplicate key

Exporting Cluster Data


TABLES: PCLn. INCLUDE RPCnxxy0. xx-KEY-FIELD = <Value>. EXPORT TAB TO DATABASE PCLn(xx) ID xx-KEY. IF SY-SUBRC NE 0. WRITE: / Export Failed. ENDIF.

Cluster definition

Importing Cluster Data


TABLES: PCLn. INCLUDE RPCnxxy0. xx-KEY-FIELD = <Value>. IMPORT TAB FROM DATABASE PCLn(xx) ID xx-KEY. IF SY-SUBRC NE 0. WRITE: / Import Failed. ENDIF.

Cluster definition

Chapter 7: Exercises I
Exercise 7.1
Export Database Tables ZDEG240_xx_071

Exercise 7.2
Import Database Tables ZDEG240_xx_072

Importing / Exporting Database Tables


Importing / Exporting using RMAC macros
REPORT ZEXPORT. .. RP-EXP-Cn-xx. .. REPORT ZIMPORT. .. RP-IMP-Cn-xx. ..

RP-EXP-Cn-xx. EXPORT .. RP-IMP-Cn-xx. IMPORT ..

Using the Buffer


Importing / Exporting via the Buffer
INCLUDE RPPPXD00. Buffer Definition DATA: BEGIN OF COMMON PART BUFFER. INCLUDE RPPPXD10. DATA: END OF COMMON PART BUFFER. .. RP-zzz-Cn-xx. .. PERFORM PREPARE_UPDATE USING V. Save (for export) INCLUDE RPPPXM00. Buffer management routines

Chapter 7: Exercises II
Exercise 7.3
Export Database Tables using the buffer ZDEG240_xx_073

Exercise 7.4
Import Database Tables using the buffer ZDEG240_xx_074

Payroll Results Period Evaluations


At (1) For period In period (1) 0199 0199 A P O (2) (3)

(2)
(3)

0199 0299 0199 0299 0399

0299 0299 0399 0399 0399

A A

P P A A A

A = Current Result, P = Previous Result, O = Other results

Retroactive Accounting : Programming Evaluations.


Adjusted results will show the TOTAL corrected amount for the period. Therefore - to calculate only the values paid in a specific period :
Evaluate all sets of results where the In period matches the required period Subtract any previous results for related for periods.

Payroll Results

Payroll Cluster Standard Evaluation Report RPCLSTnn

Reading the Cluster Directory


DATA : BEGIN OF RGDIR OCCURS 100. INCLUDE STRUCTURE PC261. DATA : END OF RGDIR. DATA : COUNTRY LIKE T001P-MOLGA. CALL FUNCTION CU_READ_RGDIR EXPORTING PERSNR = PERNR-PERNR IMPORTING MOLGA = COUNTRY TABLES IN_RGDIR = RGDIR EXCEPTIONS NO_RECORD_FOUND = 1 OTHERS = 2.

Importing / Exporting Database Tables


CD_EVALUATION_PERIODS
DATA: BEGIN OF EVPDIR OCCURS 0. INCLUDE STRUCTURE PC261. DATA: END OF EVPDIR. CALL FUNCTION CD_EVALUATION_PERIODS EXPORTING BONUS_DATE = < bonus date > INPER_MODIF = < period par > INPER = < in period > PAY_TYPE = < payroll type > PAY_IDENT = < payroll id > TABLES RGDIR = RGDIR EVPDIR = EVPDIR EXCEPTIONS NO_RECORD_FOUND =1 OTHERS = 2.

Cluster Directory Manager


CD_MANAGER
INCLUDE: RPC2CD00. * selections PARAMETERS: P_PERNR LIKE PERNR-PERNR, personnel number P_FPPER(6), for period - YYYYPP .. PERFORM CD_MANAGER USING P_PERNR SPACE P_FPPER SPACE SPACE SPACE SPACE SPACE SPACE SPACE C_VERSION SPACE 'R' W_RETURN. * fill cluster key RX-KEY-PERNR = P_PERNR. UNPACK RGDIR-SEQNR TO RX-KEY-SEQNO. * import results data from PCL2 RP-IMP-C2-RG.

Cluster Directory Manager


INCLUDE files
* all includes required for the processing of payroll results : INCLUDE:RPPPXD00. " Buffer definition (1) DATA: BEGIN OF COMMON PART BUFFER. INCLUDE: RPPPXD10. " Buffer definition (2) DATA:END OF COMMON PART BUFFER. INCLUDE RPC2CD00. INCLUDE RPC2RX00. INCLUDE RPC2RGG0. INCLUDE RPCMGR00. INCLUDE RPPPXM00. " Data Definition for Cluster CD " Definition Cluster (RX) " Definition Cluster (RG) " INCLUDE for Cluster Dir mngr " Handling of PCL1(2) Buffer

Payroll Tables
Payroll Control Records T549A - Payroll Areas
PERMO - period modifier (ie weekly / monthly)

T569V - Control records


PABRJ / PABRP - Payroll period YYYY / PP

T549Q - Payroll periods


BEGDA / ENDDA - Period Start / End dates

Utility Programs
Transaction PU00 : Delete Payroll Clusters by Employee Utility Programs : RPUPnD00 / D10
n indicates Database Table PCL1 or PCL2 Delete one or more records from any cluster

RPUPDEL20 : Delete Payroll Results RPUAUD00 : Infotype Change Documents RPTEDT00 : Read Time Evaluation Results

Chapter 7: Exercises III


Exercise 7.5
Payroll Results I ZDEG240_xx_075

Exercise 7.6
Payroll Results II ZDEG240_xx_076

Importing / Exporting Database Tables


Some HR data objects are stored in cluster database tables. Macros are used to access the data via the buffer. Stored payroll results are managed via the table RGDIR. Table RGDIR can be imported from the CU cluster using the function module CU_READ_RGDIR. Function module CD_EVALUATION_PERIODS enables you to process table RGDIR. Descriptive data is retrieved from the current (A) and previous (P) result.

Chapter 8
Logical Database PCH: Organisation Management / Personnel Planning.

Chapter 8: Objectives
By the end of this chapter you will be able to:
Explain the function and structure of the Logical Database PCH Create reports for sequential and structural evaluations of the Organisational Structure Evaluate additional data on relationships

Data Model : Organisational Management


Organisational Unit
Incorporates Belongs to Cost Centre Allocation Belongs to

Cost centre
Cost Centre Allocation

Job

Is Described by

Position
Describes

Work Centre
Incorporates

Describes

Holder

Task

Describes

Person

Organisational Management : Relationships


The Job describes the Position An Organisational Unit may incorporate a number of Positions The Position is assigned to a Person Relationships between objects are reciprocal
C
S
POSITION JOB JOB

S S

POSITION

C T
TASK

S
POSITION

POSITION POSITION

T
TASK

POSITION

Infotypes
The characteristics of objects are stored as Infotypes : INFOTYPE No. Example Object 1000 org unit Relationships 1001 belongs to, reports to Description 1002 general text Work schedule 1011 planned working hours Cost planning 1015 cost elements Address 1028 address 1, address 2

Object Status
Active - can be used Planned - proposed but not active Submitted - currently being checked Approved - object accepted Rejected - object not approved

New objects can be planned or active

PD : Structures & Tables


Logical Structures Pnnnn Database Tables
HRPnnnn

PTnnnn

HRTnnnn

PLOGI

PADnn

Evaluation Paths I
Evaluation Paths :
Describe a set of relationships between objects in a hierarchical structure ( i.e. O-S-P describes relationship between Org unit, Positions and Persons ) Are used to select objects for structural evaluations Are used in all standard reports Can be displayed via report RHWEGID0

Evaluation Paths II
O
ORG UNIT

Evaluation path : O-S-P


No. OT A/B Relationship 003 Incorporates OT S

O
ORG UNIT

S
POSITION

10

S
POSITION

20

008

Holder

P
PERSON

30

002

L.Supervisor of

P
PERSON

Relationships : A - bottom up B - top down

Sequential Evaluations
TABLES : OBJEC. INFOTYPES : 0000, nnnn. GET OBJEC. LOOP AT Pnnnn WHERE BEGDA LE PC-ENDDA AND ENDDA GE PC-BEGDA. ENDLOOP.

Structural Evaluations
TABLES : OBJEC, GDSTR. INFOTYPES : 0000, nnnn.

General structure description - will allow structure parameters to be used on selection screen.

GET OBJEC. LOOP AT Pnnnn WHERE BEGDA LE PC-ENDDA AND ENDDA GE PC-BEGDA. ENDLOOP.

Internal Information
Pnnnn
Internal Infotype Table

OBJEC
Object Information (from Infotype 1000)

GDSTR
Root of Structure (root object, number of objects within the hierarchy)

STRUC
Internal Structure Information

Chapter 8: Exercise 8.1


Creating a list of Staff Position Holders.
Program : ZDEG240_xx_081.

Reading Personnel Planning Data from other Application Areas.


RH_READ_INFTY
INFOTYPES: 1002.

DATA: I_HROBJECT LIKE HROBJECT OCCURS 10.


CALL FUNCTION RH_READ_INFTY EXPORTING INFTY = 1002 BEGDA = <start date> ENDDA = < end date> TABLES INNNN = P1002 OBJECTS = I_HROBJECT EXCEPTIONS ALL_INFTY_WITH_SUBTY = 1 NOTHING_FOUND =2 NO_OBJECTS = 3.

Chapter 8: Exercise 8.2


Finding an Employees Superior.
Function Module : ZDEG240_xx_082.

Chapter 8: Summary
Logical Database PCH can be used to read Personnel Planning and Organisational Management information
Information is retrieved by each organisational object in turn (OBJEC)

Structural evaluations can be used to read data according to the hierarchy of information
Evaluation paths (groups of relationships) are set up in the IMG to specify exactly how the structure should be searched

Chapter 9 Enhancing an Infotype

Chapter 9: Objectives
By the end of this chapter you will be able to:
Add a new field on to a standard SAP Infotype screen Appreciate the tools / steps involved with creating a bespoke Infotype

Enhancing an Infotype

SAP Fields

New Fields

Enhancing an Infotype Dictionary Object


Start Transaction PM01 Click the Enhance IT tab Enter the Infotype in the Infotype field Click the CI Include radio button Click the CREATE button This enters the Data Dictionary to create a customising include CI_Pnnnn. The new fields required may be defined and the structure activated.

Enhancing an Infotype Screen Elements


Once the CI include had been activated go back to the PM01 screen. Enter a screen number in the screen field box. Click the CREATE ALL button. This creates all the flow logic and subscreen for the infotype additional fields.

Enhancing an Infotype
SAP Fields

Standard Screen

New fields added to a subscreen area

Enhancing an Infotype

SUBSCREEN

Within Customer Name Range

Screen

PBO Module
PAI Modules

Enhancing an SAP infotype


Zpxxxxyy screenno PBO Module_PBO_xxxx PAI Module_PAI_xxxx

xxxx = Infotype yy,nn,mm 2 digits

ZPxxxxnn ZPxxxxmm

Enhancing a SAP Infotype

Regenerating the screen via PM01 may cause any amendments to be overwritten

Enhancements

PBAS

0001

Chapter 9: Exercise
Add a new field to a Standard Infotype
Enhance a standard Infotype within Personnel Administration

Chapter 9: Summary
The Infotype enhancement concept allows us to :
Add enhancements to standard Infotypes Create new bespoke Infotypes Perform additional customer validations Infotype Enhancement :
Uses the development tool - PM01 Is available in the areas of Personnel Administration & Recruitment

Chapter 10
Other Features

Data Transfer Utilities


RPUSTD00
Program for transferring HR Master Data Creates batch input for transaction PA30

RHALTD00
Program for transferring PD data

RPULKT00
Program for transferring payroll accounts

Recruitment Logical Database PAP


Access via transactions PB20/PB30 Use Logical Database PAP Table APPLICANT Database Tables PBnnnn Example development :
Additional fields for Recruitment Correspondence

Training and Event Management


Dynamic menu for Bookings / Cancellations Training Correspondence : Function Modules for recipients
HR_EVENT_TRAINING_NOTIFICATION RH_GET_ADDR_ATTE

Reading Object Texts (Infotype 1002)


REPORT RHDEM081. TABLES : OBJEC, GDSET. INFOTYPES : 1002. DATA: IPT1002 LIKE PT1002 OCCURS 0 WITH HEADER LINE.

Macro for reading Table Data

GET OBJEC. WRITE : / OBJEC-OTYPE, OBJEC-OBJID, OBJEC-STEXT. LOOP AT P1002. RH-GET-TBDAT P1002-INFTY P1002-TABNR IPT1002. LOOP AT IPT1002. WRITE : / IPT1002-TLINE. ENDLOOP. SKIP 2. ENDLOOP.

Reading Object Texts (Infotype 1002)


CALL FUNCTION RH_OBJECT_DESCRIPTION_READ EXPORTING PLVAR = <plan version> OTYPE = <object type> OBJID = <object id> STTAG = <object date> SUBTY = <subtype from 1002> LANGU = SY-LANGU TABLES PTXT1002 = <pt1002>.

Business Trip Accounting


Data Cycle :
Trip Entry Approval (manually, or via a workflow) Accounted Transfer to PAY (external systems only)

Example : Employee Car Scheme letters.


Function Modules :
TRIPS_LIST_PERIO_HEAD WORD_OLE_FORMLETTER

Infotype Customising
Changes to standard Infotype screens may be configured according to customer requirements. Infotype Screen Control. IMG path :

Personnel Management > Personnel Admin > Customising User Interfaces > Determine screen modification

Table - T77S0 - Switches

Structural Authorisation
HR Authorisations :
User Groups / Transactions According to position in the organisation

Tables
T77PR - Definition of Authorisation Profiles T77UA - User Authorisations

Function Module
ie. RH_GET_ORG_ASSIGNMENT

ABAP Query for HR


Create a new Query with reference to Logical Database PNP / PAP Select from list of available Infotypes Extra coding required for control tables / screen fields (Qnnnn) Remember - HR data will generally be dependent upon a time period !

HR IDocs - ALE
Interfaces to other applications
HR system as a separate component HR -> AC, HR -> LO, HR -> HR

Master Data
IDoc type HRMD_A03 Select desired infotypes as filter objects within the distribution model OSS note 105148 (enhancement of standard IDoc to include extra Infotype segments)

HR ABAP Features
Dynamic Actions (Table T588Z)

Further Utilities
Selection reports for fast entry Accessing subroutines for specific periods Features

Course Evaluation

You might also like