Sei sulla pagina 1di 43

HR ABAP

Contents

Day
Day
Day
Day
Day

1
2
3
4
5

HR Basics
Overview of PA module
Overview of OM module
Overview of PY module
Others

HR Basics
i.
ii.
iii.
iv.
v.

Over view of HR module


Time constraints in HR
Working with Infotypes and LDB
Macros in HR ABAP
Repetitive structures

Over view of HR module


Different modules in HCM

Contd.

How different from other modules

Usage of Infotypes
Accessing data from LDBs
Macro to read data
Authorization checks

Time constraints in HR

A time constraint indicates whether more than one


Infotype record may be available at one time.
Different time constraints
1: An Infotype record must be available at all times. This
record may have no time gaps.
Personal Data (0002)
2: Only one record may be available at one time, but time
gaps are permitted.
Travel privileges ( 0017)
3: Any number of records may be valid at one time, and time
gaps are permitted.
Education, Qualifications

Time constraints in HR

Other time constraints


A:

Only one record may ever exist for this Infotype. It is valid
from 01/01/1800 to 12/31/9999. Splitting is not permissible.
View V_T582B Infotypes Which are Created Atomically
controls whether the system automatically creates the
Infotype record for an employee hiring or an applicant data
entry action.
Infotypes with time constraint A may not be deleted.

B: Only one record may ever exist for this Infotype. It is valid
from 01/01/1800 to 12/31/9999. Splitting is not permissible.
Infotypes with time constraint B may be deleted.

T: The time constraint varies depending on the subtype

Z: Refers to time management Infotypes. The time constraint


for these Infotypes depends on the time constraint class
defined in view V_T554S_I Absence: General Control. Collision
checks are defined in view V_T554Y Time Constraint Reaction.

Working with Infotypes and


LDB
The information units used to enter the data of an

What is Infotype

employee are called Infotypes.

The Infotypes are used to group related data fields


together.
Examples
0002 - Personal data
0006 - Address
0009 - Bank details

Working with Infotypes and


As HR is related to time, we require old data as well as
LDB
new data. The data we enter into the Infotypes are

Why Infotype

automatically checked for accuracy and against the table


entries.
In simple, HR data is huge and to access data easily we
require Infotype.
Infotype operations

Create
Delimit
Change
Delete
Lock/unlock
display

Working with Infotypes


and
LDB
Infotype structure

Each Infotype XXXX requires two structures


and one table
PSXXXX Infotype fields
PXXXX Infotype Key fields and the fields from
the structure PSXXXX
PAXXXX/PBXXXX/HRPXXXX data base table

Working with Infotypes


Infotypes range
and
LDB

0000 0999 -> Personal Administration

1000 1999 -> Org Management

2000 2999 -> Time data

4000 4999 -> Applicant Data

9000 9999 -> Customer Name space

Working with Infotypes


and LDB

Infotype screens

An initial screen
Single screen
List screen

Infotype includes

MPXXXX00
MPXXXX10
MPXXXX20
MPXXXX30
MPXXXX40

Infotype creation demo

Main program
Declarations and includes
PBO for the screen
PAI for the screen
Subroutines

Infotype_Creation

Working with Infotypes


and LDB

What is LDB

The LDB is special type of ABAP program that


combines the contents of certain related database tables
and retrieve some related data and make it available to
application programs.

In other words, a LDB is a method by which ABAP


programs read and process the data. The sequence in
which the data is supplied to the program is determined
by a tree structure.

Working with Infotypes


and LDB

LDB Components

Structure
Selections
Database program

Features
Logical databases have a tree structure.

A logical database can contain a maximum of 300


tables

SAPDBPNP is the name of the database program


for the logical database PNP.

SE36 is the Transaction code for the LDB creation

Working with Infotypes


and LDB

LDB Events
GET node
This statement defines an event block whose
result is triggered by the ABAP runtime environment
after submitting an executable program

If the logical database to which the program is


linked, provides data in the work area node. The node
work area must be declared with the NODES statement
(or TABLES).
The data can be processed in the event block.

Working with Infotypes


and LDB

Different LDBs for HR module

Organizational Management
Personnel Administration
Recruitment
Personnel Development
Time Management
Training and Event Management

PCH
PNP or PNPCE
PAP
PCH
- PNP
- PCH

Working with Infotypes


and LDB

Functions of LDB

1. Data retrieval
The personnel data of each employee is loaded
into the main memory where it can be accessed for
processing

2. Screening :
Employees will be filtered as per the data selection
period and the personal selection period from the LDB
selection screen

3. Authorization checks:
This ensures that the person starting the evaluation
Is authorized to access the report data

Working with Infotypes


and LDB

HR Report category

Used for HR reports that use the PNP logical database.


It controls the type and number of fields that appear on
the selection screen of an evaluation report.

HR Report category and the LDB name for an abap


program will be provided as attributes information

Macros in HR ABAP

HR Macros

Macros are one kind of modularization technique

Frequently used HR macros are

RP-READ-ALL-TIME-ITY
RP-PROVIDE-FROM-LAST
RP-PROVIDE-FROM-FRST
RP-READ-INFOTYPE

TRMAC is a table contains the existing macros in HR

Repetitive structures

In some of the Infotypes of master data, features


can be written repetitively in table form.
Examples
0008- Basic Pay,
0052- Wage maintenance,
0041- Date Specifications
Example
DO 40 TIMES
VARYING gd_lga FROM p0008-lga01
NEXT p0008-lga02.
Data Processing
ENDDO.

HR Basics Contd

Demo using the following

LDB
Macros
HR Report category

HR Basics Contd

Assignment

Generate a report to list the employees with the latest


action in the given date range

Display the following fields

Employee Number p0000-pernr


Employee Last Name - P0002-Nachn
Employee First Name P0002-Vorna
Action Type p0000- MASSN
Action Text T529T-MNTXT
Action Start Date p0000-Begda
Make use of the Macros and LDB(PNP) for this requirement

Enterprise structure

Company

A company is an organizational unit in Accounting


which
represents a business organization according to the
requirements of commercial law in a particular country

Company code

Company code which is a legally independent entity is


created according to

tax law
commercial law and
other financial accounting criteria

Enterprise structure

Personal Area

Constitutes the highest level of the Company structure and is


identified by a four-character alphanumeric code

Sub unit of company code which represents a specific unit in


Personnel Administration

Characteristics

Forms a unit for authorization check


Serves as a selection criteria for reporting
Allows to generate default values for data entry Eg.
Payroll area
Each personnel area has at least one personnel subarea

Enterprise structure

Personal Sub Area

Subdivision of Personnel
aspects of HR objects in SAP

area

which

controls

Identified by a four-character alphanumeric code

Characteristics
Group planned working time and time recording
Define holiday calendar
Define pay scale and wage type structures

all

Enterprise structure
ABC
Manufacturing
Industry

Client

Company

A company is an organizational unit


ABC
in Accounting which
represents a
USA
Operations
business
organization according to the
Company
Code
requirements of commercial law in
a particular country

Each company has oneCalifornia


local
Personnel
currency
in which its transaction
Area
figures are recorded

New York

Company code
HR Dept

which is a legally independent entity


is created according to
Personnel
tax law
Subarea
commercial law and
other financial accounting criteria

ABC
India Operations

Marketing Dept

ABC
UK Operations

Personnel structure

Employee groups (EG) and employee subgroups (ESG) form


the objects of personnel structure

They are divided for the administrative purpose like


assigning
work schedules, remunerations etc.

Helps in describing employee position in an organization


from
employee point of view

Personnel structure
Salaried
Employee
Full Time

Part Time
Employee
Group
Union

International

Employee
Subgroup

Hourly Wage
Earner
Daily Wage
Earner

Personnel structure

Example

Enterprise and Personal


structure

OM Overview

Introduction

Organization Management allows analyzing


creating organizational plan for the organization

Organization Management allows creating a complete


model of the organization and its reporting
structure for a valid period

and

Organization Management is an integral part of R/3


and is integrated with other components of SAP HR

Organization plan provides structural and personnel


model of the organization

OM Overview

Organization plan is created using organization units and


positions

Organization plan helps in


Describing structural relationships
between various organization units
Describing reporting relationships
between the positions

Unlimited number of plan versions can be created

OM Overview

Object Infotype (1000)

Relationships (Infotype 1001)

Description Infotype (1002)

Department/Staff (Infotype 1003)

Character Infotype (1004)

Vacancy (Infotype 1007)

Account Assignment Features (Infotype 1008)

Cost Planning (infotype 1015)

Standard Profiles (infotype 1016)

PD Profiles (infotype 1017)

OM Overview

O represents the object key for Organization units

To define characteristics of an organization unit, we can


store time-specific data for the following areas

Basic data
Account Assignment
Cost Distribution
Address
Work Schedule
Quota planning

Each of the above areas will have validity period which


has to be maintained according to the requirements

OM
Overview
Organizational Units - Example

Executive Board

Human
Resources

Admin

Finance
Department

Recruitment

Payroll

Benefits

Organization units classified according to functions

OM Overview
Steps for creating organizational plan

Create
Create
Create
Create
Assign
Create
Assign

root organizational unit


subordinate organizational units
jobs
positions
tasks
relationships
other attributes

OM Overview

OM Objects :

Objects

Each work entity in OM


module is termed as
Object

Organizational
Unit

Position

Job

Task

Work Center

Cost Center

Object Key

OM Overview

Position

Represents a post which can be occupied by employees of


an organization Eg. CEO, HR Manager etc

Positions can be filled 100% ( fully), partially or can be


vacant

A position which acts as a Head of a organizational unit


can be made as a CHIEF of the respective unit

Job

Job is the collection of tasks designed for creating


positions

OM Overview
Position will inherit the tasks from the job object that it is
assigned to

Job
Manager

Position
HR Manager

Position
Finance
Manager

Position
Purchase
Manager

---- Data Model


OM
Overview

Organizational
Unit

Cost Center

Cost center
allocation

Belongs to

Incorporat
es
Belongs to

is described by

Job

Incorporat
es

Describes

Work Center

Position
Occupies
is described by
Holds

Task

Person

OM Overview

Example Relation between Objects


O

S
O

S
S

C
S

OM Overview

Demo on OM Relations

Using PNP LDB generate report consists of


PA data and the supervisor details of the employee

Potrebbero piacerti anche