IBM Global Business Services
HR ABAP
Technical Overview
<Topic Title> Jan-2007 © 2007 IBM Corporation
IBM Global Business Services
List of Topics
▪Logical Databases
▪Join & Projection
▪Reports / Repetitive Structures
▪Clusters
▪Time Data
▪Infosets & Infoset Queries
▪Infotypes
▪Logical Database PCH
© 2007 IBM Corporation
2 Topic Title Jan-2007
IBM Global Business Services
Logical Databases
© 2007 IBM Corporation
3 Topic Title Jan-2007
IBM Global Business Services
What is a Logical Database ?
▪ 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
© 2007 IBM Corporation
4 Topic Title Jan-2007
IBM Global Business Services
Functions of the Logical Database PNP
© 2007 IBM Corporation
5 Topic Title Jan-2007
IBM Global Business Services
Logical Databases provided by SAP
▪ HR Logical Databases In Human Resources (HR), the following logical databases
can be used as a data source for HR InfoSets:
▪ PNP / PNPCE
▪ PAP
▪ PCH
▪ By selecting a logical database, you determine the HR data that can be reported on
using an InfoSet.
▪ Logical Database PCH
▪ This logical database generally enables you to report on all HR infotypes. However,
you are advised not to use this logical database unless you want to report on
Personnel Planning data.
▪ Logical Database PNP
▪ Use logical database PNP to report on HR master data. It is possible to use logical
database PCH to access this data, but PNP meets such reporting requirements
more quickly because it is best suited to the task of selecting persons.
© 2007 IBM Corporation
6 Topic Title Jan-2007
IBM Global Business Services
Structure of Logical Database
▪ 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.
© 2007 IBM Corporation
7 Topic Title Jan-2007
IBM Global Business Services
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
© 2007 IBM Corporation
8 Topic Title Jan-2007
IBM Global Business Services
Linking a Logical Database to an Executable Program
© 2007 IBM Corporation
9 Topic Title Jan-2007
IBM Global Business Services
Logical Structures and DB Tables in PA
© 2007 IBM Corporation
10 Topic Title Jan-2007
IBM Global Business Services
LDB : Infotype Data Structure
© 2007 IBM Corporation
11 Topic Title Jan-2007
IBM Global Business Services
LDB - Screening
© 2007 IBM Corporation
12 Topic Title Jan-2007
IBM Global Business Services
LDB – Data Retrieval
© 2007 IBM Corporation
13 Topic Title Jan-2007
IBM Global Business Services
Calling a Logical Database Using a Function Module
▪ LDB_PROCESS Function module is used to call logical databases independently
from any ABAP program
▪ Selection screen is not displayed
▪ The logical database does not trigger any GET events in the calling program, but
passes the data back to the caller in callback routines
▪ The depth to which the logical database is read is determined by specifying a
node name in the CALLBACK parameter
▪ For the GET event, the callback routine is executed directly after the data has
been read for the node, and before the subordinate nodes are processed.
▪ For the GET LATE event, the callback routine is processed after the subordinate
nodes have been processed.
© 2007 IBM Corporation
14 Topic Title Jan-2007
IBM Global Business Services
Processing Infotypes in Logical Database
© 2007 IBM Corporation
15 Topic Title Jan-2007
IBM Global Business Services
LDB – Processing Master Data Using Provide
© 2007 IBM Corporation
16 Topic Title Jan-2007
IBM Global Business Services
LDB - Loop Nesting
© 2007 IBM Corporation
17 Topic Title Jan-2007
IBM Global Business Services
LDB – Period Based Data - 1
© 2007 IBM Corporation
18 Topic Title Jan-2007
IBM Global Business Services
LDB – Period Based Data - 2
© 2007 IBM Corporation
19 Topic Title Jan-2007
IBM Global Business Services
LDB – Screening Criteria
© 2007 IBM Corporation
20 Topic Title Jan-2007
IBM Global Business Services
LDB – Sort Order
© 2007 IBM Corporation
21 Topic Title Jan-2007
IBM Global Business Services
LDB – Flow Control of Logical Database
© 2007 IBM Corporation
22 Topic Title Jan-2007
IBM Global Business Services
Join and Projection
© 2007 IBM Corporation
23 Topic Title Jan-2007
IBM Global Business Services
Joins and Projection
© 2007 IBM Corporation
24 Topic Title Jan-2007
IBM Global Business Services
Joins in PROVIDE
© 2007 IBM Corporation
25 Topic Title Jan-2007
IBM Global Business Services
Join / Subtypes
© 2007 IBM Corporation
26 Topic Title Jan-2007
IBM Global Business Services
Joins and Projection / Coding
© 2007 IBM Corporation
27 Topic Title Jan-2007
IBM Global Business Services
Reading Time-Dependent Table Entries
© 2007 IBM Corporation
28 Topic Title Jan-2007
IBM Global Business Services
HR Macros
▪ RP_PROVIDE_FROM_LAST
▪ RP_PROVIDE_FROM_FIRST
▪ RP_SET_DATA_INTERVAL
▪ RP_READ_INFOTYPE
▪ RP-READ-ALL-TIME-ITY
© 2007 IBM Corporation
29 Topic Title Jan-2007
IBM Global Business Services
Options for Defining Modules
▪ Macros can be defined in reports or includes using the ABAP command
DEFINE
▪ If a macro is changed, each report using this macro is automatically regenerated
when it is executed
▪ Macros can also be defined as RMAC macros. The source code of these
modules is stored in the function section of the control table TRMAC
▪ When you change an RMAC macro in the table TRMAC, the reports that use this
macro are not regenerated automatically. You must regenerate them manually.
© 2007 IBM Corporation
30 Topic Title Jan-2007
IBM Global Business Services
Macro Modules
© 2007 IBM Corporation
31 Topic Title Jan-2007
IBM Global Business Services
Processing a Specific Infotype Record
© 2007 IBM Corporation
32 Topic Title Jan-2007
IBM Global Business Services
Reading Infotype without using LDB (1)
© 2007 IBM Corporation
33 Topic Title Jan-2007
IBM Global Business Services
Reading Infotype Without Using LDB (2)
© 2007 IBM Corporation
34 Topic Title Jan-2007
IBM Global Business Services
Updating Infotype Record
© 2007 IBM Corporation
35 Topic Title Jan-2007
IBM Global Business Services
Reading Planning Infotypes with Function Module
© 2007 IBM Corporation
36 Topic Title Jan-2007
IBM Global Business Services
Determining The Entry Date
© 2007 IBM Corporation
37 Topic Title Jan-2007
IBM Global Business Services
Dynamic Actions
© 2007 IBM Corporation
38 Topic Title Jan-2007
IBM Global Business Services
Indicator for Step
▪P Check conditions
▪I Maintain infotype record
▪W Set default values when creating a new record
▪V Reference to another step
▪ F Call routine
▪ M Send mail
▪ Tables used
▪ PSAVE To check old values of field
▪ PSPAR Transaction classes
▪ T001P Start dates and molga
© 2007 IBM Corporation
39 Topic Title Jan-2007
IBM Global Business Services
Function character of step
▪ 02 for Change
▪ 04 for Create
▪ 06 for Change and create
▪ 08 for Delete
▪ 10 for Change and delete
▪ 12 for Create and delete
© 2007 IBM Corporation
40 Topic Title Jan-2007
IBM Global Business Services
Calling Reports Using Dynamic Actions
© 2007 IBM Corporation
41 Topic Title Jan-2007
IBM Global Business Services
Reports / Repetitive Structures
© 2007 IBM Corporation
42 Topic Title Jan-2007
IBM Global Business Services
Infotype with repetitive Structure
© 2007 IBM Corporation
43 Topic Title Jan-2007
IBM Global Business Services
Repetitive Structure / Evaluation (1)
© 2007 IBM Corporation
44 Topic Title Jan-2007
IBM Global Business Services
Repetitive Structure / Evaluation (2)
© 2007 IBM Corporation
45 Topic Title Jan-2007
IBM Global Business Services
ALV Data Structures
© 2007 IBM Corporation
46 Topic Title Jan-2007
IBM Global Business Services
ALV Field Catalog
© 2007 IBM Corporation
47 Topic Title Jan-2007
IBM Global Business Services
AVL Interface
© 2007 IBM Corporation
48 Topic Title Jan-2007
IBM Global Business Services
Clusters
© 2007 IBM Corporation
49 Topic Title Jan-2007
IBM Global Business Services
Clusters
▪ Definition
▪ It is a database object,
▪ It is a file or table which link with Relid
▪ It combines the data from several tables with identical keys.
© 2007 IBM Corporation
50 Topic Title Jan-2007
IBM Global Business Services
Clusters
▪ Different Types Of Clusters
▪ PCL1 : Database for HR – Work Area
▪ PCL2 : Accounting Results ( Time / Payroll Results )
▪ PCL3 : Recruitment/Applicant Tracking Data
▪ PCL4 : Documents Data
▪ PCL5 : Personnel Cost Planning
© 2007 IBM Corporation
51 Topic Title Jan-2007
IBM Global Business Services
Clusters
▪ PCL2 – Accounting Results table
PCL2 is a Transparent table.
PCL2-relid then it is called Cluster.
PCL2- (XX)
Where XX : -
IN – India
RX- International
RU- USA
FI- Finland
RQ- Australia
© 2007 IBM Corporation
52 Topic Title Jan-2007
IBM Global Business Services
Importing Data
© 2007 IBM Corporation
53 Topic Title Jan-2007
IBM Global Business Services
Importing / Exporting with Macros
© 2007 IBM Corporation
54 Topic Title Jan-2007
IBM Global Business Services
Importing/Exporting using a Buffer
© 2007 IBM Corporation
55 Topic Title Jan-2007
IBM Global Business Services
Importing Using a Buffer
© 2007 IBM Corporation
56 Topic Title Jan-2007
IBM Global Business Services
Data flow in Payroll
© 2007 IBM Corporation
57 Topic Title Jan-2007
IBM Global Business Services
Payroll Results
© 2007 IBM Corporation
58 Topic Title Jan-2007
IBM Global Business Services
Reading the Cluster Directory
© 2007 IBM Corporation
59 Topic Title Jan-2007
IBM Global Business Services
Determining Current Payroll Result (1)
© 2007 IBM Corporation
60 Topic Title Jan-2007
IBM Global Business Services
Determining Current Payroll Result (2)
© 2007 IBM Corporation
61 Topic Title Jan-2007
IBM Global Business Services
Clusters – Data Structure for Payroll Result
© 2007 IBM Corporation
62 Topic Title Jan-2007
IBM Global Business Services
Table Types for Payroll Results (1)
© 2007 IBM Corporation
63 Topic Title Jan-2007
IBM Global Business Services
Table Types for Payroll Results (2)
© 2007 IBM Corporation
64 Topic Title Jan-2007
IBM Global Business Services
Table Types for Payroll Results (1)
© 2007 IBM Corporation
65 Topic Title Jan-2007
IBM Global Business Services
Clusters - Display of Payroll Result(PC00_M40_CLSTR)
© 2007 IBM Corporation
66 Topic Title Jan-2007
IBM Global Business Services
Clusters - Display of Cluster data – Payroll Result
© 2007 IBM Corporation
67 Topic Title Jan-2007
IBM Global Business Services
Clusters - Display of Cluster data – Payroll Result
© 2007 IBM Corporation
68 Topic Title Jan-2007
IBM Global Business Services
Clusters - Important Structures to read Payroll data
▪ 1 . Payxx_result ( internal structures EVP/ INTER / NAT )
Where xx :-
99 = International
DE = Germany
IN = India
FI = Finland
▪ 2. HRPAYxx_RT/ CRT/ WPBP…….
Where xx :-
99 = International
DE = Germany
IN = India
FI = Finland
© 2007 IBM Corporation
69 Topic Title Jan-2007
IBM Global Business Services
Clusters - Function Modules To Read Payroll data
▪ 1. PYXX_GET_RELID_FROM_PERNR
▪ 2. CU_READ_RGDIR
▪ 3. CD_READ_LAST
▪ 4. PYXX_READ_PAYROLL_RESULT
© 2007 IBM Corporation
70 Topic Title Jan-2007
IBM Global Business Services
Time Data
© 2007 IBM Corporation
71 Topic Title Jan-2007
IBM Global Business Services
Time Data
© 2007 IBM Corporation
72 Topic Title Jan-2007
IBM Global Business Services
Time data and Validity Period
© 2007 IBM Corporation
73 Topic Title Jan-2007
IBM Global Business Services
Importing Time Data (1)
© 2007 IBM Corporation
74 Topic Title Jan-2007
IBM Global Business Services
Importing Time Data (2)
© 2007 IBM Corporation
75 Topic Title Jan-2007
IBM Global Business Services
Importing Time Data to Internal Tables
© 2007 IBM Corporation
76 Topic Title Jan-2007
IBM Global Business Services
Processing Time Data with Internal Tables
© 2007 IBM Corporation
77 Topic Title Jan-2007
IBM Global Business Services
Infosets and Infoset Query
© 2007 IBM Corporation
78 Topic Title Jan-2007
IBM Global Business Services
Infosets and User Groups
© 2007 IBM Corporation
79 Topic Title Jan-2007
IBM Global Business Services
Assign Infosets to User Groups ( Transaction SQ03 )
© 2007 IBM Corporation
80 Topic Title Jan-2007
IBM Global Business Services
Reporting on Data from PNP/PNPCE and PCH
Logical PNP PCH PAP
database
Selection of Persons Objects from Personnel Applicants
Planning
Infotypes Infotypes for If the object type is
that can be ∙ Personnel specified: ∙ Infotypes for
included in Administration ∙ Infotypes for the object Recruitment
the InfoSet (0000-0999) type (4000-4999)
∙ Time Management ∙ Infotypes for objects ∙ Some infotypes for
(2000-2999) that can be related to Personnel
∙ Payroll infotypes the specified object type Administration (such as
∙ Infotypes for Personnel If the object type is not 0001 and 0002)
Planning objects that specified:
can be related to ∙ All infotypes
persons
∙ Customer infotypes
© 2007 IBM Corporation
81 Topic Title Jan-2007
IBM Global Business Services
Procedure for Creating and Changing Infosets (SQ02)
© 2007 IBM Corporation
82 Topic Title Jan-2007
IBM Global Business Services
Initial Maintenance Screen for Reporting on Person/Applicants
© 2007 IBM Corporation
83 Topic Title Jan-2007
IBM Global Business Services
Ad Hoc Query
© 2007 IBM Corporation
84 Topic Title Jan-2007
IBM Global Business Services
Creating Queries II
© 2007 IBM Corporation
85 Topic Title Jan-2007
IBM Global Business Services
Ad Hoc Query: Overview
© 2007 IBM Corporation
86 Topic Title Jan-2007
IBM Global Business Services
Restricting Reporting Set
© 2007 IBM Corporation
87 Topic Title Jan-2007
IBM Global Business Services
Creating Queries
© 2007 IBM Corporation
88 Topic Title Jan-2007
IBM Global Business Services
Infotypes
© 2007 IBM Corporation
89 Topic Title Jan-2007
IBM Global Business Services
Infotype Data Structure
▪ Four digit number
nnnn
▪ Unique
identification
▪ 9000 to 9999
reserved for
customer infotypes
© 2007 IBM Corporation
90 Topic Title Jan-2007
IBM Global Business Services
Naming Conventions for Infotypes
▪ 0000 to 0999 – HR Master data / Applicant data
▪ 1000 to 1999 – Organizational Management
▪ 2000 to 2999 – Time data
▪ 4000 to 4999 – Applicant data
▪ 5000 to 5999 – Planning Infotypes
▪ 9000 to 9999 – Customer defined
© 2007 IBM Corporation
91 Topic Title Jan-2007
IBM Global Business Services
Personnel Administration Transparent Tables
Key
Fields
Administration
Fields
Custom Fields
© 2007 IBM Corporation
92 Topic Title Jan-2007
IBM Global Business Services
Database Table For Applicant Infotypes
© 2007 IBM Corporation
93 Topic Title Jan-2007
IBM Global Business Services
Components of an Infotype
© 2007 IBM Corporation
94 Topic Title Jan-2007
IBM Global Business Services
Infotype specific include programs
▪ The main program MPnnnn00 only contains INCLUDE statements. If you
create the main program using transaction PM01 Dialogs in HR, the system
also creates the following four includes:
Name of include The include contains
MPnnnn10 The PROGRAM statement and
the declaration of common data objects
MPnnnn20 PBO modules for the screens
MPnnnn30 PAI modules for the screens
MPnnnn40 subroutines
© 2007 IBM Corporation
95 Topic Title Jan-2007
IBM Global Business Services
Infotype Screens
▪ Each infotype has at least three screens:
▪ An initial screen ( 1000 )
▪ Initial screen is used as technical interface
▪ Processed in background and not displayed
▪ A single screen ( 2000 )
▪ Its an interface between the system and the user
▪ It enables to create, display or maintain data records
▪ A list screen ( 3000 )
▪ Enables to list all records in info type
© 2007 IBM Corporation
96 Topic Title Jan-2007
IBM Global Business Services
Initial Screens
Initial screen is used as technical interface
Screen 1000 is used for all infotypes
Processed in background.
Performs general initialization procedures
© 2007 IBM Corporation
97 Topic Title Jan-2007
IBM Global Business Services
Initial Screen - Preview
© 2007 IBM Corporation
98 Topic Title Jan-2007
IBM Global Business Services
Single Screen - Preview
© 2007 IBM Corporation
99 Topic Title Jan-2007
IBM Global Business Services
List Screen - Preview
© 2007 IBM Corporation
100 Topic Title Jan-2007
IBM Global Business Services
Infotype Time Constraint
▪ A time constraint indicates whether more than one infotype record may be
available at one time.
▪ The following time constraint indicators are permissible:
▪ 1 No overlapping and no gaps.
Eg : Infotype 0000 - Actions
▪ 2 No overlapping but time gaps are permitted.
Eg : Infotype 0021 - Family Details
▪ 3 Overlapping and and time gaps are permitted.
Eg : Infotype 0019 Monitoring of Task
© 2007 IBM Corporation
101 Topic Title Jan-2007
IBM Global Business Services
Other Possible Time Constraints
A Only one record may exist, valid from 01/01/1800 to 12/31/9999. Splitting and
deletion is not permissible.
B Only one record may exist, valid from 01/01/1800 to 12/31/9999. Splitting is
not permissible, but may be deleted.
T The time constraint varies depending on the subtype.
Z Refers to time management infotypes.
© 2007 IBM Corporation
102 Topic Title Jan-2007
IBM Global Business Services
Infotype Characteristics
© 2007 IBM Corporation
103 Topic Title Jan-2007
IBM Global Business Services
Creating Personnel Administration Infotypes – Step 1
© 2007 IBM Corporation
104 Topic Title Jan-2007
IBM Global Business Services
Creating Personnel Administration Infotypes – Step 2
© 2007 IBM Corporation
105 Topic Title Jan-2007
IBM Global Business Services
Creating Personnel Administration Infotypes – Step 3
© 2007 IBM Corporation
106 Topic Title Jan-2007
IBM Global Business Services
Created Objects
© 2007 IBM Corporation
107 Topic Title Jan-2007
IBM Global Business Services
Enhancing Personnel Administration Infotypes – Overview
© 2007 IBM Corporation
108 Topic Title Jan-2007
IBM Global Business Services
Enhancing Personnel Administration Infotypes – Procedure
© 2007 IBM Corporation
109 Topic Title Jan-2007
IBM Global Business Services
Enhancing Infotypes – Created Objects
© 2007 IBM Corporation
110 Topic Title Jan-2007
IBM Global Business Services
Creating HRP info types
Transaction code : ‘PPCI’.
(Personnel Planning Infotype Copier)
© 2007 IBM Corporation
111 Topic Title Jan-2007
IBM Global Business Services
Creating HRP info types
We can create the following kinds of info types:
Language-dependent field info types
Language-independent field info types
Language-dependent table info types
Language-independent table info types
We can also specify whether an info type is country-specific or not
© 2007 IBM Corporation
112 Topic Title Jan-2007
IBM Global Business Services
Creating HRP info types
© 2007 IBM Corporation
113 Topic Title Jan-2007
IBM Global Business Services
Creating HRP info types
Start the Data Dictionary (SE11)
Select the Radio button Data Type Enter the HRI9nnn ( Where 9nnn is info
type no).
Click on Create Button, and Create the required Structure
Save , Check and Activate the Structure
© 2007 IBM Corporation
114 Topic Title Jan-2007
IBM Global Business Services
Creating HRP info types
© 2007 IBM Corporation
115 Topic Title Jan-2007
IBM Global Business Services
Creating HRP info types
© 2007 IBM Corporation
116 Topic Title Jan-2007
IBM Global Business Services
Creating HRP info types
Go to T Code : PPCI
Enter Info the details
Info type : 9nnn
Info type name : xxxxx
Click on Create, it will display Extended screen
© 2007 IBM Corporation
117 Topic Title Jan-2007
IBM Global Business Services
Creating HRP info types
© 2007 IBM Corporation
118 Topic Title Jan-2007
IBM Global Business Services
Creating HRP info types
© 2007 IBM Corporation
119 Topic Title Jan-2007
IBM Global Business Services
Creating HRP info types
♠ Here you can select Field info type / Table Info Type
♠ Language Dependent/ Independent
♠ Country Specific / not
♠ After selecting these options click on Create Button
© 2007 IBM Corporation
120 Topic Title Jan-2007
IBM Global Business Services
Creating HRP info types
© 2007 IBM Corporation
121 Topic Title Jan-2007
IBM Global Business Services
Creating HRP info types
After Creation of Infotype Maintain the Following Details using TCode: OOIT
Time Constraint
Infotype Per Object Type
© 2007 IBM Corporation
122 Topic Title Jan-2007
IBM Global Business Services
Logical Database PCH(PNP)
© 2007 IBM Corporation
123 Topic Title Jan-2007
IBM Global Business Services
Data Model
© 2007 IBM Corporation
124 Topic Title Jan-2007
IBM Global Business Services
Relationship Between Basic Object Type
© 2007 IBM Corporation
125 Topic Title Jan-2007
IBM Global Business Services
Table Infotype
© 2007 IBM Corporation
126 Topic Title Jan-2007
IBM Global Business Services
Sequential Evaluation
© 2007 IBM Corporation
127 Topic Title Jan-2007
IBM Global Business Services
Structural Evaluation
© 2007 IBM Corporation
128 Topic Title Jan-2007
IBM Global Business Services
Evaluation Path
© 2007 IBM Corporation
129 Topic Title Jan-2007
IBM Global Business Services
Maintaining Evaluation Path
© 2007 IBM Corporation
130 Topic Title Jan-2007
IBM Global Business Services
Sequential Evaluation Coding
© 2007 IBM Corporation
131 Topic Title Jan-2007
IBM Global Business Services
Structural Evaluations Coding
© 2007 IBM Corporation
132 Topic Title Jan-2007
IBM Global Business Services
Structure Parameters
© 2007 IBM Corporation
133 Topic Title Jan-2007
IBM Global Business Services
Setting Structure Condition
© 2007 IBM Corporation
134 Topic Title Jan-2007
IBM Global Business Services
Filling Fields in the Selection Screen
© 2007 IBM Corporation
135 Topic Title Jan-2007
IBM Global Business Services
Evaluating Additional Data on Relationship
© 2007 IBM Corporation
136 Topic Title Jan-2007
IBM Global Business Services
Evaluating Table Infotype
© 2007 IBM Corporation
137 Topic Title Jan-2007
IBM Global Business Services
Evaluating the Infotype Index
© 2007 IBM Corporation
138 Topic Title Jan-2007
IBM Global Business Services
▪Questions ?
© 2007 IBM Corporation
139 Topic Title Jan-2007
IBM Global Business Services
Thank You
© 2007 IBM Corporation
140 Topic Title Jan-2007