ABAP-HRHCM
-
Upload
swati-jain -
Category
Documents
-
view
214 -
download
0
Transcript of ABAP-HRHCM
-
7/24/2019 ABAP-HRHCM
1/60
ABAP HR / HCM
-
7/24/2019 ABAP-HRHCM
2/60
AgendaDay 1
Basics of SAP HR and Why ABAP HR
Logical Databases
PA (Personnel Administration) - Overview
Structure of Database Tables in PA
InfotypesOverview
Macros and Function Modules
Hands On Sessions and Assignments
-
7/24/2019 ABAP-HRHCM
3/60
Basics of SAP HR and Why ABAP HR
Logical Databases
PA (Personnel Administration) - Overview
Structure of Database Tables in PA
InfotypesOverview
Macros and Function Modules
Hands On Sessions and Assignments
Topic List
-
7/24/2019 ABAP-HRHCM
4/60
Basics of SAP HR and Why ABAP HR ?
What is SAP HR / HCM ?
When to use SAP HR / ABAP HR ?
Where is SAP HR / HCM used ?
How is SAP HR / HCM beneficial ?
Why ABAP HR ?
-
7/24/2019 ABAP-HRHCM
5/60
Basics of SAP HR contd
SAP HR or SAP Human Resources Management Systemis one of the largestmodules in the SAP R/3 system which consists of many sub modules like:
Organizational Management
Personnel Administration
Recruitment
Time Management
Payroll
Compensation Management
Personnel Cost Planning
Budget Management
Personnel Development
Training & Event Management
Travel Management
Environmental Health & Safety.
-
7/24/2019 ABAP-HRHCM
6/60
HR as a Function- HR LC
Strategize and Plan
1. HR
Strategy
Acquire
2. Staff Acquisition
Sustain
4. Compensation Management
5. Benefits
Management
3. Organization
and Position
Management
6. Employee Training ,Development and
Performance Management
7. Leave and attendance Mgt
8. Travel Management
Separate
3. Separation Management
Right Job at the
Right Time
Right Person
Performing Welland
Appropriately
Compensated
Timely
Retirement
Processing
-
7/24/2019 ABAP-HRHCM
7/60
Time Management Payroll Accounting
Organisational ManagementPersonnel Management
Core Modules of SAP HR
HR
Master data
-
7/24/2019 ABAP-HRHCM
8/60
HR Structures
Enterprise structure.- Client, Company code, PA, PSA
Organizational structureOrg Unit, Position, Job, Task
Personnel structure.-Emp Group, Emp Sub-Group.
Payroll accounting Area
-
7/24/2019 ABAP-HRHCM
9/60
Personnel Structure
O
O O
O O
S
S
S
S
C
C
Position
Job
P Employee
External
Independant
Contractant ext.I ntrimai re
Retiree
Active
Hourl y Worker
Monthly workerExecutive
Manager
Senior ManagerStudent
Expatri
Sorti
Organizational Structure
Hourly WorkerMonth ly worker
Executive
Manager
Senior ManagerStudent
ExecutiveManager
Senior Manager
Hourly WorkerMonth ly workerExecutive
Manager
Senior ManagerStudent
Organizational Unit
Enterprise StructureWT01
1000WT021100
WT03
1101WT041003
KAR AP WB NDEL
Administration Sales Finance HR
Legal Quality Mkt Engineering
Company Code
Personnel Area
Personnel Sub-Area
-
7/24/2019 ABAP-HRHCM
10/60
Enterprise Structure
-
7/24/2019 ABAP-HRHCM
11/60
-
7/24/2019 ABAP-HRHCM
12/60
Organizational Structure
Job
(C)
Organizational
Unit (O)
Position
(S)
person
(P)
Is managed by
Holder
Incorporates
Is described by
Describes
-
7/24/2019 ABAP-HRHCM
13/60
HR Structures: Employee in the
Personnel Structure
External
Active
Pensioner
Employee Group:Subdivision of employees into variouscategories for management reasons
HR St t E l i th P l
-
7/24/2019 ABAP-HRHCM
14/60
HR Structures: Employee in the Personnel
Structure
Employee SubGroup:Subdivision of an employee subgroup intodifferent employee status for managementreasons
Executive
Active
Student
Workforce
Manager
-
7/24/2019 ABAP-HRHCM
15/60
HR Structures: Payroll A/c Area
-
7/24/2019 ABAP-HRHCM
16/60
IT 0001- Organizational Assignment
-
7/24/2019 ABAP-HRHCM
17/60
Basics of SAP HR contd
-
7/24/2019 ABAP-HRHCM
18/60
What is ABAPHR and Why ABAPHR ?
The aim in the Human Resources component is to beable to process employee related data according to
business requirements in an effective structure.
The Human Resources module uses a system of data
grouped together called Infotypes. The Human Resources module stores bulk data like time
management and Payroll data in Cluster tables
In HR ABAP use of select statements significantly less
than in other areas of ABAP development In addition to the LDB, HR programming also involves the
use of Macros for data extraction cluster tables.
-
7/24/2019 ABAP-HRHCM
19/60
Basics of SAP HR and Why ABAP HR
Logical Databases
PA (Personnel Administration) - Overview
Structure of Database Tables in PA
InfotypesOverview
Macros and Function Modules
Hands On Sessions and Assignments
Topic List
-
7/24/2019 ABAP-HRHCM
20/60
Logical Databases (LDB)
What is a LDB ?
When to use LDB ?
Where to search for LDB ?
How is LDB beneficial ?
Whyuse LDB instead of SQL selects?
-
7/24/2019 ABAP-HRHCM
21/60
LDB contd
What is a LDB ?
Logical databases are special ABAP programs that retrieve data and
make it available to application programs. The most common use of
logical databases is still to read data from database tables and linking
them to executable ABAP programs while setting the program contents
Logical databases contain Open SQL statements that read data from
the database. You do not therefore need to use SQL in your own
programs
A logical database can read the lines of these tables one after the other
into an executable program in a sequence which is normally defined by
the hierarchical structure
-
7/24/2019 ABAP-HRHCM
22/60
LDB contd
-
7/24/2019 ABAP-HRHCM
23/60
LDB contd
STRUCTURE
The structure defines the data view of
the logical database.
SELECTIONS
The selections define a selection
screen, which forms the user interface
of the executable programs that use
the logical database.
DATABASE PROGRAM
The database program contains the
ABAP statements used to read the
data and pass it to the user of the
logical database.
3 Components of an LDB
-
7/24/2019 ABAP-HRHCM
24/60
LDB . contd
Structure of Logical Database The structure of a logical database is
usually based on the foreign key
relationships between hierarchical tables
in the SAP System.
Logical databases have a tree-like
structure
The nodes must be structures defined in
the ABAP Dictionary or data types from a
type group
-
7/24/2019 ABAP-HRHCM
25/60
When to use a LDB ?
It is always worth using logical databases if the structure
of the data that you want to read corresponds to a view
available through a logical database.
To Read the same data for several programs.
Defining the same user interface for several programs.
LDB contd
-
7/24/2019 ABAP-HRHCM
26/60
Where tosearch / view / create / edit LDBs ?
SE36Transaction Code for Logical Database Operations
Logical databases have a tree structure.
A logical database can contain a maximum of 300 tables
SAPDB is the name of the database program for
the logical database.
Ex. SAPDBPNP for PNP - LDB
LDB contd
-
7/24/2019 ABAP-HRHCM
27/60
Linking a LDB to an Executable Program
-
7/24/2019 ABAP-HRHCM
28/60
Advantages of using LDBAn easy-to-use standard user interface
Check functions which check that user input is complete,
correct, and plausible
Meaningful data selection
Central authorization checks for database accesses
You do not have to program a selection screen for user
input since this is created automatically
LDB contd
-
7/24/2019 ABAP-HRHCM
29/60
Events in an LDB
GET Event
GET LATE Event
LDB contd
-
7/24/2019 ABAP-HRHCM
30/60
DEMO
LDB contd
-
7/24/2019 ABAP-HRHCM
31/60
Personnel AdministrationOverview
What is PA Module?
When to use PA Module ?
Where is PA (Specific T-Codes) ?
WhyPA Module ?
-
7/24/2019 ABAP-HRHCM
32/60
Structure of DB tables in PA
Logical structures
Pnnnn
KEY fields
Data fields
PSnnnn
Database tables
PAnnnnPAnnnn PBnnnnPBnnnnScreen
fields
Qnnnn
Selection
fields PNP
PERNR
PCLnPCLn
-
7/24/2019 ABAP-HRHCM
33/60
InfotypesOverview
What is an Infotype ?
When to use Infotype ?
Where are Infotypes present ?
How is Infotype beneficial ?
Whyuse Infotypes in SAP HR?
-
7/24/2019 ABAP-HRHCM
34/60
LDB : Infotype Data Structure
PA0002PA0002
DB structure PAnnnn using infotype 0002 as an example
Infotype structurePnnnn using infotype 0002 as an example
MANDT PAKEY PSHD1 PS0002
PSKEY PSHD1 PS0002
-
7/24/2019 ABAP-HRHCM
35/60
LDBPNP Screening
-
7/24/2019 ABAP-HRHCM
36/60
LDBData Retrieval
1. Create data structures forinfotypes
2. Fill the data structures withthe infotyperecords
"Organizational Assignment"
"PersonalData"
"Planned Working Time"
INFOTYPES:0001,
0002,
0007.
GET PERNR.
LDB Processing Master Data Using
-
7/24/2019 ABAP-HRHCM
37/60
TABLES: PERNR.
INFOTYPES: 0001, "Actions
0002, "Personal Data
0006, "Addresses
....
GET PERNR.
PROVIDE * FROM P0002 BETWEEN PN-BEGDA AND PN-ENDDA.
WRITE...
ENDPROVIDE.
LDBProcessing Master Data Using
Provide
LDB L N ti
-
7/24/2019 ABAP-HRHCM
38/60
LDB - Loop Nesting
GET PERNR.
PROVIDE * FROM P0002 BETWEEN PN-BEGDA
AND PN-ENDDA.
WRITE...
ENDPROVIDE.
PROVIDE * FROM P0006
BETWEEN PN-BEGDA AND PN-ENDDA.
WRITE...
ENDPROVIDE.
END-OF-SELECTION.
Infotype
loop
Infotype
loop
Employee
loop
-
7/24/2019 ABAP-HRHCM
39/60
LDBPeriod Based Data - 1
JANUARY - APRIL
MAY - AUGUST
SEPTEMBER - DECEMBER
Ms YMs Y
LDB P i d B d D t 2
-
7/24/2019 ABAP-HRHCM
40/60
Org.
Assignment
Data
Selection
January December
January December
Org.
Assignment
January December
LDBPeriod Based Data - 2
-
7/24/2019 ABAP-HRHCM
41/60
Data selection
Person selection
PAnnnnPAnnnn
INFOTYPES: ...
GET PERNR.
PROVIDE...
WRITE...
LDBScreening Criteria
-
7/24/2019 ABAP-HRHCM
42/60
LDBPerson Selection
-
7/24/2019 ABAP-HRHCM
43/60
LDBData Selection
-
7/24/2019 ABAP-HRHCM
44/60
Default Values on Selection Screen
-
7/24/2019 ABAP-HRHCM
45/60
...
GET PERNR.
...
190919101899
Pers.areaPerNo. Name
100010001100
Sam HawkinsDavid LindsayKarl May
LDBSort Order
-
7/24/2019 ABAP-HRHCM
46/60
JOIN INFOTYPES
-
7/24/2019 ABAP-HRHCM
47/60
JOIN / CODING
-
7/24/2019 ABAP-HRHCM
48/60
JOIN / SUBTYPES
-
7/24/2019 ABAP-HRHCM
49/60
INFOTYPE JOIN - DEMO
-
7/24/2019 ABAP-HRHCM
50/60
PROJECTION
-
7/24/2019 ABAP-HRHCM
51/60
PROJECTION / CODING
-
7/24/2019 ABAP-HRHCM
52/60
PNPLogical Database DEMO
-
7/24/2019 ABAP-HRHCM
53/60
Basics of SAP HR and Why ABAP HR
Logical Databases
PA (Personnel Administration) - Overview
Structure of Database Tables in PA
InfotypesOverview
Macros and Function Modules
Hands On Sessions and Assignments
Topic List
-
7/24/2019 ABAP-HRHCM
54/60
-
7/24/2019 ABAP-HRHCM
55/60
-
7/24/2019 ABAP-HRHCM
56/60
-
7/24/2019 ABAP-HRHCM
57/60
-
7/24/2019 ABAP-HRHCM
58/60
-
7/24/2019 ABAP-HRHCM
59/60
-
7/24/2019 ABAP-HRHCM
60/60
Thank you