Escolar Documentos
Profissional Documentos
Cultura Documentos
HR ABAP
Technical Overview
HR ABAP
Jan-2007
List of Topics
Logical Databases
Join & Projection
Reports / Repetitive Structures
Clusters
Time Data
Infosets & Infoset Queries
Infotypes
Logical Database PCH
HR ABAP
Jan-2007
Logical Databases
HR ABAP
Jan-2007
HR ABAP
Jan-2007
HR ABAP
Jan-2007
HR ABAP
Jan-2007
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.
HR ABAP
Jan-2007
HR ABAP
Jan-2007
HR ABAP
Jan-2007
Logical Structures
Structures and
Tables
in PA
Logical
andDatabase
DB Tables
in PA
Logical structures
Pnnnn
KEY fields
Database tables
Screen
fields
PAnnnn
PBnnnn
Qnnnn
Data fields
PSnnnn
Selection
fields PNP
PCLn
PERNR
10
HR ABAP
Jan-2007
Infotype
- Data Data
Structures
LDB
: Infotype
Structure
PA0002
MANDT
PAKEY
PSHD1
PS0002
PSKEY
11
HR ABAP
PSHD1
PS0002
Jan-2007
LDB - Screening
12
HR ABAP
Jan-2007
13
HR ABAP
Jan-2007
14
HR ABAP
Jan-2007
15
HR ABAP
Jan-2007
"Actions
"Personal Data
"Addresses
GET PERNR.
PROVIDE * FROM P0002 BETWEEN PN-BEGDA AND PN-ENDDA.
WRITE...
ENDPROVIDE.
16
HR ABAP
Jan-2007
Loop Nesting
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.
Infotype
loop
Infotype
loop
Employee
loop
END-OF-SELECTION.
17
HR ABAP
Jan-2007
Period-Based
DataData
(1) - 1
LDB Period
Based
JANUARY - APRIL
MAY - AUGUST
Ms Y
SEPTEMBER - DECEMBER
18
SAP AG 1999
HR ABAP
Jan-2007
Data
Selection
Org.
Assignment
Org.
Assignment
19
HR
SAP AG ABAP
1999
January
December
January
December
January
December
Jan-2007
Criteria Criteria
LDBScreening
Screening
Data selection
Person selection
INFOTYPES: ...
GET PERNR.
PAnnnn
PROVIDE...
WRITE...
20
SAP AG 1999
HR ABAP
Jan-2007
LDB Sort
Order
Sort Order
...
GET PERNR.
...
21
1000
1000
1100
Sam Hawkins
David Lindsay
Karl May
SAP AG 1999
HR ABAP
Jan-2007
Batch
Online
ZPLIST00
ZPLIST10
22
SAP AG 1999
HR ABAP
Jan-2007
23
HR ABAP
Jan-2007
24
HR ABAP
Jan-2007
Joins in PROVIDE
25
HR ABAP
Jan-2007
Join
/ Subtypes
Join
/ Subtypes
TABLES: PERNR.
INFOTYPES: 0001,
0002,
0006,
....
"Organizational Assignment
"Personal Data
"Addresses
GET PERNR.
PROVIDE
* FROM P0002
* FROM P0006
BETWEEN PN-BEGDA AND PN-ENDDA
WHERE P0006-SUBTY = '1'.
IF P0006_VALID = 'X'.
WRITE...
ENDIF.
ENDPROVIDE.
26
SAP AG 1999
HR ABAP
Jan-2007
27
HR ABAP
Jan-2007
IBMTime-Dependent
Global Business Services Table Entries
Reading
BEGDA
T513S
ENDDA
28
HR ABAP
SY-LANGU
P0001-STELL
P0001-BEGDA
P0001-BEGDA.
Jan-2007
HR Macros
RP_PROVIDE_FROM_LAST
RP_PROVIDE_FROM_FIRST
RP_SET_DATA_INTERVAL
RP_READ_INFOTYPE
RP-READ-ALL-TIME-ITY
29
HR ABAP
Jan-2007
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.
30
HR ABAP
Jan-2007
Macro Modules
Macro Modules
TABLES: PERNR.
INFOTYPES: 0001,
0002,
0006,
....
"Organizational Assignment
"Personal Data
"Addresses
GET PERNR.
RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA.
WRITE...
* * * Include program DBPNPMAC.
DEFINE RP_PROVIDE_FROM_LAST.
PNP-SW-FOUND = '0'.
. . .
END-OF-DEFINITION.
31
SAP AG 1999
HR ABAP
Jan-2007
Data selection
Table
Pnnnn
January
January
December
December
GET PERNR.
RP_PROVIDE_FROM_LAST <Pnnnn> SPACE PN-BEGDA PN-ENDDA.
IF PNP-SW-FOUND = 1.
WRITE...
ENDIF.
32
SAP AG 1999
HR ABAP
Jan-2007
Reading
InfotypeWithout
withoutLogical
using DB
LDB
Reading Infotypes
(1)(1)
PAnnnn
INFOTYPES: <nnnn>.
...
CALL FUNCTION
'HR_READ_INFOTYPE'...
33
SAP AG 1999
HR ABAP
Jan-2007
HR ABAP
= return
= P0002
= 1
= 2.
Jan-2007
35
HR ABAP
Jan-2007
36
HR ABAP
Jan-2007
37
HR ABAP
Jan-2007
Dynamic Actions
38
HR ABAP
Jan-2007
Check conditions
W
V
F
M
Call routine
Tables used
PSAVE To check old values of field
PSPAR Transaction classes
T001P Start dates and molga
39
HR ABAP
Jan-2007
40
HR ABAP
Jan-2007
41
HR ABAP
Jan-2007
42
HR ABAP
Jan-2007
43
HR ABAP
Jan-2007
44
HR ABAP
Jan-2007
45
HR ABAP
Jan-2007
46
TYPES:
BEGIN OF data_struc,
pernr LIKE PERNR-PERNR,
ename LIKE P0001-ENAME,
. . .
dar
LIKE P0041-DAR01,
. . .
END OF data_struc.
DATA:
SAP AG 1999
HR ABAP
Jan-2007
47
HR ABAP
Jan-2007
AVL Interface
48
HR ABAP
Jan-2007
Clusters
49
HR ABAP
Jan-2007
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.
50
HR ABAP
Jan-2007
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
51
HR ABAP
Jan-2007
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
52
HR ABAP
Jan-2007
Importing Data
53
HR ABAP
Jan-2007
54
HR ABAP
Jan-2007
UPDATE
PCLn
Import
Buffer
55
HR ABAP
SAP AG 1999
Jan-2007
56
HR ABAP
Jan-2007
57
HR ABAP
Jan-2007
Payroll Results
Payroll Results
REPORT RPCLSTxy.
Payroll result
Suzanne Werner January 19xx
WT01
WT02
WT03
/101
....
58
SAP AG 1999
HR ABAP
Jan-2007
59
HR ABAP
Jan-2007
60
SAP AG 1999
HR ABAP
Jan-2007
61
SAP AG 1999
HR ABAP
Jan-2007
Structure: PAY99_RESULT
EVP
Structure PC261
NAT
VERSC
RT
CRT
BT
Type PC202
Type HRPAY99_RT
Type HRPAY99_CRT
Dummy
for national
part
62
HR ABAP
Jan-2007
Dictionary
Payroll result
Tables
Structure PC261
63
NAT
VERSC
RT
CRT
Type PC202
Type HRPAY99_RT
Type HRPAY99_CRT
BT
SAP AG 1999
HR ABAP
Jan-2007
HR ABAP
Jan-2007
65
HR ABAP
Jan-2007
66
HR ABAP
Jan-2007
67
HR ABAP
Jan-2007
68
HR ABAP
Jan-2007
69
HR ABAP
Jan-2007
70
HR ABAP
Jan-2007
Time Data
71
HR ABAP
Jan-2007
Time Data
Contents:
Dependency of Time Data on Validity Period
Importing Time Data
Processing Time Data Using Internal Tables
72
SAP AG 1999
HR ABAP
Jan-2007
Data selection
period
15 days
Leave
PROVIDE...
WRITE...
ENDPROVIDE.
73
SAP AG 1999
HR ABAP
15 days
Jan-2007
Importing
Time
DataData
(1) (1)
Importing
Time
PAnnnn
GET PERNR.
74
HR ABAP
Jan-2007
0001,
0002,
...
2005 MODE N.
GET PERNR.
RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA.
. . . .
RP_READ_ALL_TIME_ITY PN-BEGDA PN-ENDDA.
. . . .
LOOP AT P2005.
WRITE...
ENDLOOP.
75
HR ABAP
SAP AG 1999
Jan-2007
stdaz
Data area
76
SAP AG 1999
HR ABAP
Jan-2007
Header processing
AT NEW bukrs.
...
ENDAT.
tab -
BUKRS WERKS
BTRTL
0001
0001
0001
0001
0001
0002
0002
0002
0003
0002
0002
0004
AT NEW werks.
...
ENDAT.
Single record
processing
AT END OF werks.
...
ENDAT.
AT END OF bukrs.
...
ENDAT.
Footer processing
77
AT LAST.
...
ENDAT.
ENDLOOP.
SAP AG 1999
HR ABAP
Jan-2007
78
HR ABAP
Jan-2007
79
HR ABAP
Jan-2007
80
HR ABAP
Jan-2007
PNP
PCH
PAP
Selection of
Persons
Applicants
Infotypes
that can be
included in
the InfoSet
Infotypes for
Personnel
Administration (00000999)
Time Management
(2000-2999)
Payroll infotypes
Infotypes for Personnel
Planning objects that
can be related to
persons
Infotypes for
Recruitment (40004999)
Some infotypes for
Personnel
Administration (such as
0001 and 0002)
Customer infotypes
81
HR ABAP
Jan-2007
82
HR ABAP
Jan-2007
83
HR ABAP
Jan-2007
Ad Hoc Query
84
HR ABAP
Jan-2007
Creating Queries II
85
HR ABAP
Jan-2007
86
HR ABAP
Jan-2007
87
HR ABAP
Jan-2007
Creating Queries
88
HR ABAP
Jan-2007
Infotypes
89
HR ABAP
Jan-2007
90
HR ABAP
Jan-2007
91
HR ABAP
Jan-2007
Key
Fields
Administration
Fields
Custom Fields
92
HR ABAP
Jan-2007
93
HR ABAP
Jan-2007
Components of an Infotype
94
HR ABAP
Jan-2007
95
Name of include
MPnnnn10
MPnnnn20
MPnnnn30
MPnnnn40
subroutines
HR ABAP
Jan-2007
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
96
HR ABAP
Jan-2007
Initial Screens
Initial screen is used as technical interface
Screen 1000 is used for all infotypes
Processed in background.
Performs general initialization procedures
97
HR ABAP
Jan-2007
98
HR ABAP
Jan-2007
99
HR ABAP
Jan-2007
100
HR ABAP
Jan-2007
A time constraint indicates whether more than one infotype record may
be available at one time.
101
HR ABAP
Jan-2007
Only one record may exist, valid from 01/01/1800 to 12/31/9999. Splitting and
deletion is not permissible.
Only one record may exist, valid from 01/01/1800 to 12/31/9999. Splitting is
not permissible, but may be deleted.
102
HR ABAP
Jan-2007
Infotype Characteristics
The following tables must be maintained for each infotype:
Name of table
Task
T582A
103
T582S
T777A
T77ID
HR ABAP
Jan-2007
104
HR ABAP
Jan-2007
105
HR ABAP
Jan-2007
106
HR ABAP
Jan-2007
Created Objects
107
HR ABAP
Jan-2007
108
HR ABAP
Jan-2007
109
HR ABAP
Jan-2007
110
HR ABAP
Jan-2007
111
HR ABAP
Jan-2007
112
HR ABAP
Jan-2007
113
HR ABAP
Jan-2007
114
HR ABAP
Jan-2007
115
HR ABAP
Jan-2007
116
HR ABAP
Jan-2007
117
HR ABAP
Jan-2007
118
HR ABAP
Jan-2007
119
HR ABAP
Jan-2007
120
HR ABAP
Jan-2007
121
HR ABAP
Jan-2007
122
HR ABAP
Jan-2007
123
HR ABAP
Jan-2007
Data Model
124
HR ABAP
Jan-2007
125
HR ABAP
Jan-2007
Table Infotype
126
HR ABAP
Jan-2007
Sequential Evaluation
127
HR ABAP
Jan-2007
Structural Evaluation
128
HR ABAP
Jan-2007
Evaluation Path
129
HR ABAP
Jan-2007
130
HR ABAP
Jan-2007
131
HR ABAP
Jan-2007
132
HR ABAP
Jan-2007
Structure Parameters
133
HR ABAP
Jan-2007
134
HR ABAP
Jan-2007
135
HR ABAP
Jan-2007
136
HR ABAP
Jan-2007
137
HR ABAP
Jan-2007
138
HR ABAP
Jan-2007
Questions ?
139
HR ABAP
Jan-2007
Thank You
140
HR ABAP
Jan-2007