SlideShare a Scribd company logo
1 of 27
Download to read offline
SAP R/3 HR Programming
Overview
Prepared by
Mohd Misnan
mmisnan@melayu.plus.com
03/12/2004
HR Data Structure
PAnnnn PCL1
Master data /
Time data
Database
work fields
PCL2
Payroll
result
HRPnnnn Personnel
Planning
PCL3
Application
management
PCL4 Documents
PCL5
HR cost
planning
Transparent Tables Data Clusters
Master Data (PA)
• Infotypes :
– Business definition: grouping of fields with related contents
based on business requirement.
– Technical definition: grouping of attributes (basically, a
screen with underlying transparent table) .
– E.g. : IT0002, personnel details infotype which contains
person unique characteristics like Forename, Surname, Title,
Date of Birth, also specific to the country like NI number etc.
Master Data (PA)
Example of IT0002 - personnel details infotype (Transaction PA30)
Master Data (PA)
• Infotypes number ranges
• List of infotypes is available in table V_T582A.
• Infotype can be subdivided into subtype which also controls the
actions of the infotype. E.g. Family/Related Person (IT0021).
• Infotype can be subdivided further by object identification. E.g.
Family/Related Person (IT0021), subtype Child.
Number range Reserved for
0000-0999 HR Master Data
1000-1999 Organisational management/personnel planning
2000-2999 Time management
4000-4999 Recruitment
9000-9999 Customer-developed enhancements
Master Data (PA)
• Time and time constraints in infotypes
– validity start (BEGDA) and end date (ENDDA) of a record
– time constraint class 1
• information that must exist. E.g. the name of an employee. Creation of
new record will automatically delimits the previous data record.
– time constraint class 2
• information that can exist at any time but not required. It may occur
only once. E.g. spouse information in IT0021.
– time constraint class 3
• information that can occur as often as necessary. E.g. child information.
Master Data (PA)
Example of IT0021 for time constraints
Master Data (PA)
• Technical data structure of Infotypes
– structure PAKEY, contains the primary key of an infotype.
• PERNR - Personnel number
• SUBTY - Subtype
• OBJPS - Object identifier
• SPRPS - Lock & release record
• ENDDA - End date of the validity period
• BEGDA - Start date of the validity period
– structure PSHD1
• other basic information for each infotype
• Records of infotype nnnn are stored in the transparent table
PAnnnn.
Payroll Result Data (PCL2)
• Stored in the transparent table PCL2.
• Example of some clusters available in PCL2:
– CU - Cluster directory
– RG - Payroll results (GB)
– B2 - Time management results
– ZL - Personal shift plan
– PS - Generated schema
– PT - Texts for generated schema
• Data is stored in CLUSTD field.
Payroll Result Data (PCL2)
• Cluster Directory
– Payroll directory is created for every employee.
– Specific payroll results from an individual payroll period can only be
accessed later via this cluster directory.
– Structure of cluster directory:
• SEQNR - contains a sequence number
• ABKRS - contains the payroll group in which the employee’s wages are
calculated.
• FPPER - for period of the payroll run
• FPBEG & FPEND - start and end date of the payroll period.
• IABKRS, IPERM, INPER, IPEND - contain the in period information.
– To optimise data selection, RGDIR table of cluster CU is replicated
into HRPY_RGDIR.
Payroll Result Data (PCL2)
• Deep data structure for reporting. PAYGB_RESULT.
PAYGB_RESULT EVP
INTER
NAT
Cluster directory
information:
SEQNR, ABKRS, ...
WPBP, RT, CRT,
STATUS, ...
SV, ST, SCRT, ...
Payroll Result Data
Use transaction PC_PAYRESULT to display payroll result
HR Programming - Logical Database
• Why use LDB in HR Programming?
– To reduce programming efforts - events driven, selection screen
and data extraction provided by LDB.
– Centralised authorisation checking.
– Improved performance.
• LDB for master data and payroll reporting
– Master data (PA) reporting - PNP
– Payroll reporting - PNP / selection screen: 900
• Report categories
– Determines which function keys are available, which selection
parameters appear and the properties of the selection parameters.
HR Programming - Logical Database
HR Programming - Logical Database
• INFOTYPES statement
– Creates internal tables which are populated at the GET PERNR
event. E.g:
• GET PERNR.
– Populates PERNR structure and all infotypes declared in the
INFOTYPES statement.
– Infotypes declared with MODE N will not be populated during this
event.
INFOTYPES: 0002. DATA BEGIN OF p0002 OCCURS 10.
INCLUDE STRUCTURE p0002.
DATA END OF p0002 VALID BETWEEN begda AND endda.
HR Programming - Logical Database
• PROVIDE .. ENDPROVIDE.
– Evaluates the infotype records which validity interval intersects with
the interval given in the data selection period.
PROVIDE * FROM P0006
BETWEEN PN-BEGDA AND PN-ENDDA
WHERE P0006-SUBTY = ‘1’.
* additional processing
ENDPROVIDE.
HR Programming - Logical Database
• PNP LDB - important variables to remember:
– PN-BEGDA / PN-ENDDA - end/start of DATA selection period.
– PN-BEGPS / PN-ENDPS - end/start of PERSON selection period
and used to determine the selection of personnel numbers to be
processed.
– Table PERNR needs to be declared.
– After GET PERNR event, structure PERNR contains the most
important information (IT0000 and IT0001).
– Example program available in Development client 010/020 =
ZHRPATRAINING.
HR Programming - Logical Database
HR Programming - LDB - PY
• Using LDB for HR-PY programming:
– Available from SAP R/3 4.6c and above.
– Screen 900 is assigned as the selection-screen at the program
attribute.
– PYORGSCREEN and PYTIMESCREEN need to be declared in
TABLES statement for the extra payroll related selection-screen.
– PAYROLL node to be declared in the NODE statement with
reference type to PAYGB_RESULT for UK or PAY99_RESULT for
international.
– HR report category can be changed to use Payroll Results (Cluster)
for selection screen customisation.
HR Programming - LDB - PY
HR Programming - LDB - PY
• GET PAYROLL.
– PAYROLL structure will be populated. If more than one payroll
period is specified at the selection screen, this event will be
executed for each period.
– Payroll results internal table may contains more than one result
depending on the ‘status of result’ selection.
– To evaluate payroll result, LOOP through the PAYROLL-INTER-RT
internal table.
HR Programming - LDB - PY
• Things to remember when doing HR-PY programming:
– PYBEGDA / PYENDDA - end/start of PAYROLL DATA selection
period.
– Data evaluation will be based on HRPY_RGDIR (Payroll directory
information) rather than from HR-PA master data.
– Example program available in Development client 010/020 -
ZHRPYTRAINING.
HR Programming - LDB - PY
HR Programming - Using macros
• Macros are widely used in HR programming.
• Methods:
– Using RMAC macros declared in TRMAC table (older method)
– Using macros in the include program DBPNPCOM (for PNP LDB -
newer method)
• Some important macros:
– RP-LOWDATE-HIGHDATE (TRMAC)
• defines the constants LOW-DATE (01/01/1800) and HIGH-DATE
(31/12/9999)
– RP-SEL-EIN-AUS-INIT (TRMAC)
• exclude employee with employment status NE 0.
HR Programming - Using macros
• Some important macros:
– RP_PROVIDE_FROM_FRST (PNP)
• reads the first record of an internal table in the specified selection
period. The infotype table must be sorted in ascending order.
– RP_PROVIDE_FROM_LAST (PNP)
• reads the last valid record of an internal table in the specified selection
period.
Example:
rp_provide_from_frst p0002 SPACE pn-begda pn-endda.
Example:
rp_provide_from_last p0002 SPACE pn-begda pn-endda.
HR Programming w/o LDB
• All master data infotypes are available with a PA prefix. E.g.
IT0000 is directly assessable from transparent table PA0000.
• If authorisation checks are important, SAP provides two other
methods of accessing the infotypes:
– Using function module ‘HR_READ_INFOTYPES’
– Using macro ‘RP_READ_INFOTYPE’ (include DBPNPCOM in the
program)
HR Programming w/o LDB
• Payroll results can be extracted using the following methods:
– If there is a need to do processing at individual steps:
• Read cluster directory using ‘CU_READ_RGDIR’
• Read valid period from cluster directory using ‘CU_READ_LAST’
• Read payroll results using ‘PYXX_READ_PAYROLL_RESULT’ using
SEQNO returned by ‘CU_READ_LAST’.
– Otherwise:
• Using function module ‘PYXX_GET_EVALUATION_PERIODS’ or
• Using function module ‘HR_GET_PAYROLL_RESULTS’ to import
current payroll results.
– Examples:
• RPMUST01 - Model report for monthly payroll results
• RPMUST02 - Model report for monthly payroll results - more than one
period.

More Related Content

What's hot

Sap hcm payroll concept - Best SAP HR Training Institute in Pune
Sap hcm payroll concept - Best SAP HR Training Institute in PuneSap hcm payroll concept - Best SAP HR Training Institute in Pune
Sap hcm payroll concept - Best SAP HR Training Institute in PuneAspire Techsoft Academy
 
Organizational Management in SAP HCM
Organizational Management in SAP HCMOrganizational Management in SAP HCM
Organizational Management in SAP HCMDivyasri_G
 
Sap hcm overview
Sap hcm overviewSap hcm overview
Sap hcm overviewJoyce Maina
 
TallyPayroll
TallyPayrollTallyPayroll
TallyPayrollmagiee
 
Travel management configuration steps
Travel management configuration stepsTravel management configuration steps
Travel management configuration stepsAbhijeet Walke
 
SAP ABAP HR TRAINING
SAP ABAP HR TRAININGSAP ABAP HR TRAINING
SAP ABAP HR TRAININGJoshiRavin
 
SAP HR AND HCM Interview questions
SAP HR AND HCM Interview questionsSAP HR AND HCM Interview questions
SAP HR AND HCM Interview questionsIT LearnMore
 
SAP HCM Overview - ITChamps Software Private Limited
SAP HCM Overview - ITChamps Software Private LimitedSAP HCM Overview - ITChamps Software Private Limited
SAP HCM Overview - ITChamps Software Private LimitedITChamps Software Pvt. Ltd
 
ABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.infoABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.infosapdocs. info
 
Understanding processing classes in sap
Understanding processing classes in sapUnderstanding processing classes in sap
Understanding processing classes in sapMrityunjoy Roy
 
SAP HCM Consultant
SAP HCM ConsultantSAP HCM Consultant
SAP HCM ConsultantIT LearnMore
 
How HR ABAP is difference with ABAP ?
How HR ABAP is difference with ABAP ?How HR ABAP is difference with ABAP ?
How HR ABAP is difference with ABAP ?JoshiRavin
 
Organizational Management-SAP HR
Organizational Management-SAP HROrganizational Management-SAP HR
Organizational Management-SAP HRdeepti_arora25
 
Sap Hr Presentation 08052002
Sap Hr Presentation 08052002Sap Hr Presentation 08052002
Sap Hr Presentation 08052002Anand Shanmugam
 
Payroll configuration
Payroll configurationPayroll configuration
Payroll configurationgayathri166
 

What's hot (20)

Sap hcm payroll concept - Best SAP HR Training Institute in Pune
Sap hcm payroll concept - Best SAP HR Training Institute in PuneSap hcm payroll concept - Best SAP HR Training Institute in Pune
Sap hcm payroll concept - Best SAP HR Training Institute in Pune
 
Organizational Management in SAP HCM
Organizational Management in SAP HCMOrganizational Management in SAP HCM
Organizational Management in SAP HCM
 
Pre DME
Pre DMEPre DME
Pre DME
 
SAP HR Part 1.pptx
SAP HR Part 1.pptxSAP HR Part 1.pptx
SAP HR Part 1.pptx
 
Sap hcm overview
Sap hcm overviewSap hcm overview
Sap hcm overview
 
TallyPayroll
TallyPayrollTallyPayroll
TallyPayroll
 
Saphcm presentation
Saphcm presentationSaphcm presentation
Saphcm presentation
 
Travel management configuration steps
Travel management configuration stepsTravel management configuration steps
Travel management configuration steps
 
SAP ABAP HR TRAINING
SAP ABAP HR TRAININGSAP ABAP HR TRAINING
SAP ABAP HR TRAINING
 
SAP HR AND HCM Interview questions
SAP HR AND HCM Interview questionsSAP HR AND HCM Interview questions
SAP HR AND HCM Interview questions
 
SAP HCM Overview - ITChamps Software Private Limited
SAP HCM Overview - ITChamps Software Private LimitedSAP HCM Overview - ITChamps Software Private Limited
SAP HCM Overview - ITChamps Software Private Limited
 
ABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.infoABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.info
 
Understanding processing classes in sap
Understanding processing classes in sapUnderstanding processing classes in sap
Understanding processing classes in sap
 
SAP HCM Consultant
SAP HCM ConsultantSAP HCM Consultant
SAP HCM Consultant
 
How HR ABAP is difference with ABAP ?
How HR ABAP is difference with ABAP ?How HR ABAP is difference with ABAP ?
How HR ABAP is difference with ABAP ?
 
Organizational Management-SAP HR
Organizational Management-SAP HROrganizational Management-SAP HR
Organizational Management-SAP HR
 
Sap Hr Presentation 08052002
Sap Hr Presentation 08052002Sap Hr Presentation 08052002
Sap Hr Presentation 08052002
 
Abap hr programing
Abap hr programingAbap hr programing
Abap hr programing
 
SAP Time Management
SAP Time Management SAP Time Management
SAP Time Management
 
Payroll configuration
Payroll configurationPayroll configuration
Payroll configuration
 

Similar to Sap hr-programming

Abaphrprograming 121218001552-phpapp02 (2)
Abaphrprograming 121218001552-phpapp02 (2)Abaphrprograming 121218001552-phpapp02 (2)
Abaphrprograming 121218001552-phpapp02 (2)IT
 
Abaphrprograming 121218001552-phpapp02 (2)
Abaphrprograming 121218001552-phpapp02 (2)Abaphrprograming 121218001552-phpapp02 (2)
Abaphrprograming 121218001552-phpapp02 (2)IT
 
Sap Payroll Cluster Repair Whitepaper V1.0
Sap Payroll Cluster Repair   Whitepaper V1.0Sap Payroll Cluster Repair   Whitepaper V1.0
Sap Payroll Cluster Repair Whitepaper V1.0amau2000
 
Sap hr features
Sap hr featuresSap hr features
Sap hr featuressivsamba
 
When Apache Spark Meets TiDB with Xiaoyu Ma
When Apache Spark Meets TiDB with Xiaoyu MaWhen Apache Spark Meets TiDB with Xiaoyu Ma
When Apache Spark Meets TiDB with Xiaoyu MaDatabricks
 
Track 2 session 4 db2 for z os optimizer- what’s new in db2 11 and exploiti...
Track 2 session 4   db2 for z os optimizer- what’s new in db2 11 and exploiti...Track 2 session 4   db2 for z os optimizer- what’s new in db2 11 and exploiti...
Track 2 session 4 db2 for z os optimizer- what’s new in db2 11 and exploiti...IBMSystemzEvents
 
Adaptive Query Optimization
Adaptive Query OptimizationAdaptive Query Optimization
Adaptive Query OptimizationAnju Garg
 
Oracle 122 partitioning_in_action_slide_share
Oracle 122 partitioning_in_action_slide_shareOracle 122 partitioning_in_action_slide_share
Oracle 122 partitioning_in_action_slide_shareThomas Teske
 
Sap S4 HANA PM Online training +918660816919
Sap S4 HANA PM Online training +918660816919Sap S4 HANA PM Online training +918660816919
Sap S4 HANA PM Online training +918660816919Senthil kumar
 
Dynamic Actions On Steroids
Dynamic Actions On SteroidsDynamic Actions On Steroids
Dynamic Actions On Steroidswendlidl
 
Understanding IBM Tivoli OMEGAMON for DB2 Batch Reporting, Customization and ...
Understanding IBM Tivoli OMEGAMON for DB2 Batch Reporting, Customization and ...Understanding IBM Tivoli OMEGAMON for DB2 Batch Reporting, Customization and ...
Understanding IBM Tivoli OMEGAMON for DB2 Batch Reporting, Customization and ...Cuneyt Goksu
 
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdf
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdfNOCOUG_201311_Fine_Tuning_Execution_Plans.pdf
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdfcookie1969
 
sappresentation- By Prithwijit
sappresentation- By Prithwijit sappresentation- By Prithwijit
sappresentation- By Prithwijit PRITHWIJIT PAL
 

Similar to Sap hr-programming (20)

Abaphrprograming 121218001552-phpapp02 (2)
Abaphrprograming 121218001552-phpapp02 (2)Abaphrprograming 121218001552-phpapp02 (2)
Abaphrprograming 121218001552-phpapp02 (2)
 
Abaphrprograming 121218001552-phpapp02 (2)
Abaphrprograming 121218001552-phpapp02 (2)Abaphrprograming 121218001552-phpapp02 (2)
Abaphrprograming 121218001552-phpapp02 (2)
 
Pi pcs interface
Pi pcs interfacePi pcs interface
Pi pcs interface
 
Abap hr programing
Abap hr programingAbap hr programing
Abap hr programing
 
Sap Payroll Cluster Repair Whitepaper V1.0
Sap Payroll Cluster Repair   Whitepaper V1.0Sap Payroll Cluster Repair   Whitepaper V1.0
Sap Payroll Cluster Repair Whitepaper V1.0
 
Sap hr features
Sap hr featuresSap hr features
Sap hr features
 
When Apache Spark Meets TiDB with Xiaoyu Ma
When Apache Spark Meets TiDB with Xiaoyu MaWhen Apache Spark Meets TiDB with Xiaoyu Ma
When Apache Spark Meets TiDB with Xiaoyu Ma
 
Track 2 session 4 db2 for z os optimizer- what’s new in db2 11 and exploiti...
Track 2 session 4   db2 for z os optimizer- what’s new in db2 11 and exploiti...Track 2 session 4   db2 for z os optimizer- what’s new in db2 11 and exploiti...
Track 2 session 4 db2 for z os optimizer- what’s new in db2 11 and exploiti...
 
Adaptive Query Optimization
Adaptive Query OptimizationAdaptive Query Optimization
Adaptive Query Optimization
 
Oracle 122 partitioning_in_action_slide_share
Oracle 122 partitioning_in_action_slide_shareOracle 122 partitioning_in_action_slide_share
Oracle 122 partitioning_in_action_slide_share
 
Sap S4 HANA PM Online training +918660816919
Sap S4 HANA PM Online training +918660816919Sap S4 HANA PM Online training +918660816919
Sap S4 HANA PM Online training +918660816919
 
Sap pp org
Sap pp orgSap pp org
Sap pp org
 
Dynamic Actions On Steroids
Dynamic Actions On SteroidsDynamic Actions On Steroids
Dynamic Actions On Steroids
 
Understanding IBM Tivoli OMEGAMON for DB2 Batch Reporting, Customization and ...
Understanding IBM Tivoli OMEGAMON for DB2 Batch Reporting, Customization and ...Understanding IBM Tivoli OMEGAMON for DB2 Batch Reporting, Customization and ...
Understanding IBM Tivoli OMEGAMON for DB2 Batch Reporting, Customization and ...
 
Do You Know The 11g Plan?
Do You Know The 11g Plan?Do You Know The 11g Plan?
Do You Know The 11g Plan?
 
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdf
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdfNOCOUG_201311_Fine_Tuning_Execution_Plans.pdf
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdf
 
sappresentation- By Prithwijit
sappresentation- By Prithwijit sappresentation- By Prithwijit
sappresentation- By Prithwijit
 
How about now
How about nowHow about now
How about now
 
sssss
ssssssssss
sssss
 
ttfhy
ttfhyttfhy
ttfhy
 

Recently uploaded

SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 

Recently uploaded (20)

SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 

Sap hr-programming

  • 1. SAP R/3 HR Programming Overview Prepared by Mohd Misnan mmisnan@melayu.plus.com 03/12/2004
  • 2. HR Data Structure PAnnnn PCL1 Master data / Time data Database work fields PCL2 Payroll result HRPnnnn Personnel Planning PCL3 Application management PCL4 Documents PCL5 HR cost planning Transparent Tables Data Clusters
  • 3. Master Data (PA) • Infotypes : – Business definition: grouping of fields with related contents based on business requirement. – Technical definition: grouping of attributes (basically, a screen with underlying transparent table) . – E.g. : IT0002, personnel details infotype which contains person unique characteristics like Forename, Surname, Title, Date of Birth, also specific to the country like NI number etc.
  • 4. Master Data (PA) Example of IT0002 - personnel details infotype (Transaction PA30)
  • 5. Master Data (PA) • Infotypes number ranges • List of infotypes is available in table V_T582A. • Infotype can be subdivided into subtype which also controls the actions of the infotype. E.g. Family/Related Person (IT0021). • Infotype can be subdivided further by object identification. E.g. Family/Related Person (IT0021), subtype Child. Number range Reserved for 0000-0999 HR Master Data 1000-1999 Organisational management/personnel planning 2000-2999 Time management 4000-4999 Recruitment 9000-9999 Customer-developed enhancements
  • 6. Master Data (PA) • Time and time constraints in infotypes – validity start (BEGDA) and end date (ENDDA) of a record – time constraint class 1 • information that must exist. E.g. the name of an employee. Creation of new record will automatically delimits the previous data record. – time constraint class 2 • information that can exist at any time but not required. It may occur only once. E.g. spouse information in IT0021. – time constraint class 3 • information that can occur as often as necessary. E.g. child information.
  • 7. Master Data (PA) Example of IT0021 for time constraints
  • 8. Master Data (PA) • Technical data structure of Infotypes – structure PAKEY, contains the primary key of an infotype. • PERNR - Personnel number • SUBTY - Subtype • OBJPS - Object identifier • SPRPS - Lock & release record • ENDDA - End date of the validity period • BEGDA - Start date of the validity period – structure PSHD1 • other basic information for each infotype • Records of infotype nnnn are stored in the transparent table PAnnnn.
  • 9. Payroll Result Data (PCL2) • Stored in the transparent table PCL2. • Example of some clusters available in PCL2: – CU - Cluster directory – RG - Payroll results (GB) – B2 - Time management results – ZL - Personal shift plan – PS - Generated schema – PT - Texts for generated schema • Data is stored in CLUSTD field.
  • 10. Payroll Result Data (PCL2) • Cluster Directory – Payroll directory is created for every employee. – Specific payroll results from an individual payroll period can only be accessed later via this cluster directory. – Structure of cluster directory: • SEQNR - contains a sequence number • ABKRS - contains the payroll group in which the employee’s wages are calculated. • FPPER - for period of the payroll run • FPBEG & FPEND - start and end date of the payroll period. • IABKRS, IPERM, INPER, IPEND - contain the in period information. – To optimise data selection, RGDIR table of cluster CU is replicated into HRPY_RGDIR.
  • 11. Payroll Result Data (PCL2) • Deep data structure for reporting. PAYGB_RESULT. PAYGB_RESULT EVP INTER NAT Cluster directory information: SEQNR, ABKRS, ... WPBP, RT, CRT, STATUS, ... SV, ST, SCRT, ...
  • 12. Payroll Result Data Use transaction PC_PAYRESULT to display payroll result
  • 13. HR Programming - Logical Database • Why use LDB in HR Programming? – To reduce programming efforts - events driven, selection screen and data extraction provided by LDB. – Centralised authorisation checking. – Improved performance. • LDB for master data and payroll reporting – Master data (PA) reporting - PNP – Payroll reporting - PNP / selection screen: 900 • Report categories – Determines which function keys are available, which selection parameters appear and the properties of the selection parameters.
  • 14. HR Programming - Logical Database
  • 15. HR Programming - Logical Database • INFOTYPES statement – Creates internal tables which are populated at the GET PERNR event. E.g: • GET PERNR. – Populates PERNR structure and all infotypes declared in the INFOTYPES statement. – Infotypes declared with MODE N will not be populated during this event. INFOTYPES: 0002. DATA BEGIN OF p0002 OCCURS 10. INCLUDE STRUCTURE p0002. DATA END OF p0002 VALID BETWEEN begda AND endda.
  • 16. HR Programming - Logical Database • PROVIDE .. ENDPROVIDE. – Evaluates the infotype records which validity interval intersects with the interval given in the data selection period. PROVIDE * FROM P0006 BETWEEN PN-BEGDA AND PN-ENDDA WHERE P0006-SUBTY = ‘1’. * additional processing ENDPROVIDE.
  • 17. HR Programming - Logical Database • PNP LDB - important variables to remember: – PN-BEGDA / PN-ENDDA - end/start of DATA selection period. – PN-BEGPS / PN-ENDPS - end/start of PERSON selection period and used to determine the selection of personnel numbers to be processed. – Table PERNR needs to be declared. – After GET PERNR event, structure PERNR contains the most important information (IT0000 and IT0001). – Example program available in Development client 010/020 = ZHRPATRAINING.
  • 18. HR Programming - Logical Database
  • 19. HR Programming - LDB - PY • Using LDB for HR-PY programming: – Available from SAP R/3 4.6c and above. – Screen 900 is assigned as the selection-screen at the program attribute. – PYORGSCREEN and PYTIMESCREEN need to be declared in TABLES statement for the extra payroll related selection-screen. – PAYROLL node to be declared in the NODE statement with reference type to PAYGB_RESULT for UK or PAY99_RESULT for international. – HR report category can be changed to use Payroll Results (Cluster) for selection screen customisation.
  • 20. HR Programming - LDB - PY
  • 21. HR Programming - LDB - PY • GET PAYROLL. – PAYROLL structure will be populated. If more than one payroll period is specified at the selection screen, this event will be executed for each period. – Payroll results internal table may contains more than one result depending on the ‘status of result’ selection. – To evaluate payroll result, LOOP through the PAYROLL-INTER-RT internal table.
  • 22. HR Programming - LDB - PY • Things to remember when doing HR-PY programming: – PYBEGDA / PYENDDA - end/start of PAYROLL DATA selection period. – Data evaluation will be based on HRPY_RGDIR (Payroll directory information) rather than from HR-PA master data. – Example program available in Development client 010/020 - ZHRPYTRAINING.
  • 23. HR Programming - LDB - PY
  • 24. HR Programming - Using macros • Macros are widely used in HR programming. • Methods: – Using RMAC macros declared in TRMAC table (older method) – Using macros in the include program DBPNPCOM (for PNP LDB - newer method) • Some important macros: – RP-LOWDATE-HIGHDATE (TRMAC) • defines the constants LOW-DATE (01/01/1800) and HIGH-DATE (31/12/9999) – RP-SEL-EIN-AUS-INIT (TRMAC) • exclude employee with employment status NE 0.
  • 25. HR Programming - Using macros • Some important macros: – RP_PROVIDE_FROM_FRST (PNP) • reads the first record of an internal table in the specified selection period. The infotype table must be sorted in ascending order. – RP_PROVIDE_FROM_LAST (PNP) • reads the last valid record of an internal table in the specified selection period. Example: rp_provide_from_frst p0002 SPACE pn-begda pn-endda. Example: rp_provide_from_last p0002 SPACE pn-begda pn-endda.
  • 26. HR Programming w/o LDB • All master data infotypes are available with a PA prefix. E.g. IT0000 is directly assessable from transparent table PA0000. • If authorisation checks are important, SAP provides two other methods of accessing the infotypes: – Using function module ‘HR_READ_INFOTYPES’ – Using macro ‘RP_READ_INFOTYPE’ (include DBPNPCOM in the program)
  • 27. HR Programming w/o LDB • Payroll results can be extracted using the following methods: – If there is a need to do processing at individual steps: • Read cluster directory using ‘CU_READ_RGDIR’ • Read valid period from cluster directory using ‘CU_READ_LAST’ • Read payroll results using ‘PYXX_READ_PAYROLL_RESULT’ using SEQNO returned by ‘CU_READ_LAST’. – Otherwise: • Using function module ‘PYXX_GET_EVALUATION_PERIODS’ or • Using function module ‘HR_GET_PAYROLL_RESULTS’ to import current payroll results. – Examples: • RPMUST01 - Model report for monthly payroll results • RPMUST02 - Model report for monthly payroll results - more than one period.