Está en la página 1de 98

Overview of HR ABAP for BI Reporting

Objective?
HR Reports Generation using LDB Customer Specific Info types creation.

What we will be discussing today?


DS in PA LDB on PNP/PNPCE Joins, Projections Cluster DB Tables in HR DS in PP LDB PCH Customer Specific Info types
2

HR ABAP Advantages

1
Infotypes, their DS & overview on Check & Control Tables
3

Topics
What

are Infotypes? Why Infotypes? Number ranges Time Constraints Infotypes Structures Enhancement of Infotypes

Infotypes?
What?

Logical group of similar data


Serves

as templates for data entry

They are time dependent


Several

Infotypes exist for each employee Each of these records are valid for a particular period of time.

Infotypes also have subtypes


Example

0006 refers to Address


5

Number Ranges

0000 0999 1000 1990 2000 2999 4000 4999 9000 9999
This

HR Master Data Personnel Planning Time Management Recruitment Customer Specific

is not like a CI, but for new specifics

Org Assignment 0001, Personal Data 0002 Addresses 0006, Family Member/Dependents - 0021
6

DS

in HR are a combination of

Master Data Transactional Data Results Data


Master data of PA,TM & PP is structured the same way.

Examples

0000 Actions 0001 Organizational Assignment 0002 Personal Data 0003 Payroll Status

Subtypes

0006 Address
9

Screen Shot of PA30

10

Infotype 0001 Organizational Assignment

11

Infotype 0002 Personal Data

12

Infotype 0006 Addresses

13

Infotype 0021 Family Member/Dependents

14

Time Constraints
Specified

to show how data records of each infotype react in terms of time

Every

infotype and its subtype has time constraint 7 types of time constraint

15

Time Constraints

Time Constraint #1
Complete Savings No overlaps Only relevant data must exist during the period
Example

: Date of Birth

Time Constraint #2
Incomplete Savings without overlaps Not more than 1 record at any point of time
Example

: Projects Bench Project

Time Constraint #3 N recs can exist @ a time


Overlaps + Incompleteness permitted
Example

: Mobile Number
16

Infotype Time Constraints

17

Other T/cs (Misc.)

Time Constraint A
Infotypes exists just once from Jan.1 1800 to Dec.12 9999

Time Constraint B
Exists for maximum of once from Jan.1 1800 to Dec.12 9999

Time Constraint T
Time constraint is based on subtype or subtype table

Time Constraint Z
Time constraint for time management infotypes - T554Y
18

Infotype Structures
Each

Infotype is associated with a - Transparent Table (PAxxxx) - Structure (Pxxxx) Dummy!

Example: For IT0002, Transparent Table PA0002 Structure P0002


19

Infotype Structure Pnnnn

20

Every

PAnnnn infotype table has three includes:


PAKEY: Key fields PSHD1: Administrative Information PSnnnn: Infotype specific fields

21

Infotype Structure Pnnnn


Fields of Structure P0002

22

Transparent Table PAxxxx


Fields of Transparent Table PA0002

23

Data

records of the Infotypes are stored in the transparent database tables PAnnnn
Example : PA0003 Payroll Status

Each

table has a PK Unique Identifier

24

Every

PAnnnn infotype table has three includes:


PAKEY: Key fields PSHD1: Administrative Information PSnnnn: Infotype specific fields

25

Structure of Transparent Tables

26

Key Fields

Obj. Identification Indicator Lock Indicator

VALID TO Date Valid FROM Date


27

PERNR: Uniquely identifies an employee SUBTY: Subdivisions of infotypes OBJPS: Differentiates records of infotypes with same features SPRPS: Locks and unlocks the data records ENDDA: End period of a record BEGDA: Starting period of a record SEQNR: Differentiates records with same key and Time constraint 3.

28

Administration Fields

29

Administrative information is stored like


AEDTM (date the record was changed) UNAME (name of the person making change) ITXEX (plain text for the infotype) PREAS (reason for changing the master data)
30

Data Fields in Structure PSnnnn

CI for Customer Includes 1. Present within PSnnnn 2. CSF can be added to this include as Ench. To Infotypes

31

Contains infotype specific data fields Customer specific fields can be added through the INCLUDE CI_PXXXX

32

Enhancement of Infotypes
TCODE : PM01 used for the enhancement of infotypes and for the creation of new the standard infotypes

33

Types of Enhancements
Two

Categories

Enhancing the Standard Infotypes Creating new Infotypes

34

Enhancing Standard Infotype

Select Single Screen tab in PM01 Type the infotype no to be enhanced Select Customer Include and click on Edit

35

Give

the necessary fields that has to be enhanced in the standard infotype


36

Click

on Generate Objects
37

In PA30, to view the enhancement, type the infotype and click on create
38

Here,

the enhanced field is displayed along with the standard fields of the infotype
39

40

41

Creating new Infotypes


Creation of PS9xxx in DDIC

Create

structure PS9XXX in SE11 with the required fields


42

In PM01

After

creating the DDIC structure, in PM01, select IT tab and give infotype 9xxx and then click on Generate Objects
43

The

following objects will be created automatically


DB table PA9xxx Structure P9xxx Module pool MP9xxx00 3 screens (1000, 2000, 3000 for M P) Interface Status Dialog Module (RP_9xxx)
44

In

this screen, click on the new entries to apply the characteristics of the new infotype
45

Characteristics of Created Infotype

Here,

give all the necessary characteristics of the created infotype and save
46

In

PA30 type the created infotype for the PERNR and click on create
47

Created Infotype

The

new infotype is displayed with field as created in the DDIC structure


48

49

Overview of Changeability

50

Subtype Controls
Remember 0006 Address

51

Additional Infotypes Views!

52

2
ABAP Snippets
53

A Simple Data Retrieval

54

PERNRs Duality
Whenever

you declare TABLES keyword, then PERNR in the declaration has a duality (i.e.) it acts both as Key + I.tab a skeleton structure for all the Infotypes declared as INFOTYPES will be created. PERNR This line will process the entire records for the particular PERNR using the combination of I.types.
55

Now,

GET

Begin & End Date T#3!

56

GET

PERNR

This will make all infotype records to be imported to I.tab Pnnnn. Example
Import

to P0006 : All recs of Infotype 0006

Address

BEGDA : Begin Date 1st January 2008 ENDDA : End Date 31st December 2008
57

Provide .. End Provide

58

Where Clause

59

Used to determine # of filled lines of an Infotype table Subsequent statements are executed only if the conditions are fulfilled

60

Whats Period based Data


Infotype

is period based data

Only valid for a specified periods .:. Each record has a valid date from & date to
Methods

of Data Selection

LOOP.ENDLOOP PROVIDE .. ENDPROVIDE

Macros!
RP_PROVIDE_FROM_LAST RP_PROVIDE_FROM_FIRST
61

Whats Period based Data

62

Time Selection

63

Screening Criteria

64

Date & PERNR Selection Period

65

Sort Order

Ascending Order
66

3
Logical Database LDB
67

Types of LDBs in HR
In

Human Resources (HR), the following logical databases can be used as a data source for HR Info Sets: PNP PNPCE PCH PAP
68

Introduction on LDB
Facilitates

tables It combines + compares contents of certain DB Tables


HR Personnel Administration
This

the process of reading database

has PNP/PNPCE as its LDB

69

Attributes of LDB

70

PNP

HR master data (Infotypes 0000 to 0999). Best suited for selecting persons.

Generate

Reports based on position that an employee occupies using


Working

time Planned compensation

Structure of PNP LDB

71

PNP

Date This

is Std. Selection Screen

Selection Person Selection Also, Sort Data


72

PNP Dynamic Sel. Screen

This is Dynamic Selection Screen

73

Question

Can an employee designated as concurrently employed person can have several simultaneous personnel assignments at the company.

PNP with Concurrent Employment.


74

Understanding PNPCE
Solution

Assign a special PERNR for each Contract


How?

In the report GET PERNR is replaced with


GET

PERAS GET GROUP GET PERSON

PERAS, GROUP, PERSON etc are all NODES

75

The Logical Database PNPCE in PNP Mode

76

PNPCE Structure

HR Master Data

For Infotypes 0000 to 0999

77

Std. Selection Screen of PNPCE

78

PP Module PCH
For

PP Module

Infotypes from 1000 to 1999 only


What How?

to process?

PP Objects

Sequentially or Structurally We must provide Evaluation Path Contd


79

Evaluation Paths

80

Sequential Evaluations

Personnel Planning

For Infotypes 1000 to 1999

81

Code for S/E TABLES: OBJEC

OBJEC

This provides Evaluation Path


82

Structural Evaluation

83

Code for Str. Eval. TABLES: OBJEC, GDSTR

84

4
Specific Commands
85

Scenario
The

board requires lists that display data valid for an employee in a specified date selection period

Solution

Use macros for Personnel Administration logical databases Macros Modularize Source Code 2 types
Process

using Specific Infotype Record RP..LAST Import Specific Infotype Records


86

1st Method Specific I.type Records

87

1st Method Specific I.type Records

88

89

2 Method Import SIR


nd

90

Reading PA/Sub.Area

91

Reading I.types without LDB

92

Reading I.types without LDB


Here we use a FM

93

5
Personnel Planning
94

Personnel Planning

An Object Oriented Design The design has the following concepts


Object Types Relationships Infotypes

Why do we need PP?


Personnel Planning Projections Evaluations

PP Design

Each Element of the Orgn. is Independent Object


95

96

Relationships are usually stored in the database in 2 directions

003

A003

B003

97

Evaluation Paths

98

También podría gustarte