Post on 04-Jan-2016
description
HR ABAP
Contents Day 1 - HR Basics Day 2 - Overview of PA module Day 3 - Overview of OM module Day 4 - Overview of PY module Day 5 - Others
HR Basicsi. Over view of HR moduleii. Time constraints in HRiii. Working with Infotypes and LDBiv. Macros in HR ABAPv. Repetitive structures
Different modules in HCM
Over view of HR module
Contd….
How different from other modules
Usage of Infotypes Accessing data from LDB’s 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 What is Infotype
The information units used to enter the data of an employee are called Infotypes.
The Infotypes are used to group related data fields together.
Examples
0002 - Personal data 0006 - Address0009 - Bank details
Working with Infotypes and LDB Why Infotype
As HR is related to time, we require old data as well as new data. The data we enter into the Infotypes are 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 and LDB• Infotypes range• • 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 – Main program • MPXXXX10 – Declarations and includes• MPXXXX20 – PBO for the screen• MPXXXX30 – PAI for the screen • MPXXXX40 – Subroutines
• Infotype creation demo •
• 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 LDB’s for HR module
Organizational Management - PCH Personnel Administration - PNP or PNPCE Recruitment - PAP Personnel Development - PCH Time Management - PNP Training and Event Management - 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 area which controls all aspects of HR objects in SAP
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
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
Each company has one local currency in which its transaction figures are recorded
Company code
which is a legally independent entity is created according to
– tax law – commercial law and – other financial accounting criteria
ABC Manufacturing
Industry
ABCUSA Operations
ABCIndia Operations
ABCUK Operations
California New York
HR Dept
Marketing Dept
Client
Company Code
Personnel Area
Personnel Subarea
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
Employee Group
Full Time
Part Time
Union
International
Hourly Wage Earner
Daily Wage Earner
Employee Subgroup
Salaried Employee
Personnel structure Example
Enterprise and Personal structure
OM Overview Introduction
Organization Management allows analyzing and creating organizational plan for the organization
Organization Management allows creating a complete model of the organization and its reporting
structure for a valid period
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 relationshipsbetween 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
Finance Department
Admin Recruitment Payroll Benefits
Organization units classified according to functions
OM Overview
Steps for creating organizational plan
• Create root organizational unit• Create subordinate organizational units• Create jobs• Create positions• Assign tasks• Create relationships• Assign other attributes
OM Overview
OM Objects :
Each work entity in OM module is termed as Object
Objects Object Key
Organizational Unit
O
Position S
Job C
Task T
Work Center A
Cost Center K
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
JobManager
PositionHR Manager
PositionFinance Manager
PositionPurchaseManager
Position will inherit the tasks from the job object that it is assigned to
OM Overview ---- Data Model
Position
Organizational
Unit
Work CenterJob
Task
Person
Cost Center Belongs to
Incorporates
Cost center allocation
is described by
Describes
is described byHolds
Occupies
Belongs to
Incorporates
OM Overview
Example – Relation between Objects
O
S O
S
S
S
C
S
SS S
OM Overview
Demo on OM Relations
Using PNP LDB generate report consists of PA data and the supervisor details of the employee