This document outlines an agenda for an Oracle HRMS Technical Workshop taking place on December 3-4, 2001. It includes introductions, assumptions about technical knowledge, and an overview of the major components and entities within Oracle HRMS, including human resources, payroll, training administration, and other modules. Key concepts like datetrack and lookups are also explained in detail with examples.
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
Hrms for beginners
1.
2. Copyright (c) 2001 - Oracle Corporation UK Limited
Oracle HRMS Technical Workshop
3-4 December 2001
3. Copyright (c) 2001 - Oracle Corporation UK Limited
Introductions
Your Name ?
Job & what department ?
How long have you been here ?
Experience of Applications ?
4. Copyright (c) 2001 - Oracle Corporation UK Limited
Assumptions...
Familiarity with relational database concept
Knowledge of following tools:
– SQL & SQL*Plus
– PL/SQL
– DML
– Stored Packages and Procedures
– Unix and Vi (or comparable editor)
5. Copyright (c) 2001 - Oracle Corporation UK Limited
The Agenda
The Big picture
Core Entities
The Concept of
Datetrack
Lookups
HR Tables
WHO and OVN
Payroll Tables
OTA
Custom Library
Data-migration
Security
APPL_TOP Directory
7. Copyright (c) 2001 - Oracle Corporation UK Limited
The Big Picture
Just what are we dealing with here?
8. Copyright (c) 2001 - Oracle Corporation UK Limited
The Big Picture
Human Resources
Payroll
Oracle Training Administration
Oracle Time and Labour
Oracle Advanced Benefits
Statutory Sick Pay
9. HRMS Product Codes
Application
Id
3-Character
Code
2-Character
Code
Products
Tables names
are prefixed with
the following
code.
Module and
File names
are prefixed
with the
following
code
805 BEN BE Advanced Benefits
810 OTA OT Training Administration
801 PAY PY Payroll
800 PER PE Human Resources
804 SSP SP Statutory Sick Pay
808 HXT HT Time and Labour Management
HR Human Resources & Payroll
10. Copyright (c) 2001 - Oracle Corporation UK Limited
The Big Picture
Combined total in excess of 1000 tables
400+ API’s
Tens-of-thousands of code objects
Numerous ‘buzzwords’
11. Copyright (c) 2001 - Oracle Corporation UK Limited
HRMS ‘buzzwords’
Person
Assignment
Organization
Element
Element entry
Grade Step
Business Group
Lookup
LOV
OVN
EIT
SIT
Datetrack
API
13. Copyright (c) 2001 - Oracle Corporation UK Limited
Core Entities in Oracle HRMS
14. Copyright (c) 2001 - Oracle Corporation UK Limited
Core HR Entities
PERSON
ASSIGNMENT
PERIOD of SERVICE
ORGANIZATION
15. Copyright (c) 2001 - Oracle Corporation UK Limited
PERSON
Holds non-employment information
– Name
– Title
– Date of Birth
– Gender
– Nationality
16. Copyright (c) 2001 - Oracle Corporation UK Limited
PERSON
Many different types of PEOPLE can be held within
HRMS
– Employee
– Ex-employee
– Applicant
– Contact
– Dependent
Mandatory fields needed to create:
– ‘Employee’: Last name, sex, hire date, person type & Emp. No
– ‘Applicant’: Last name, person type, Applicant No.
Employee Number generation: manual or automatic
– PER_NUMBER_GENERATION_CONTROLS
17. Copyright (c) 2001 - Oracle Corporation UK Limited
PERSON
Data is held in the table PER_ALL_PEOPLE_F
Primary key is:
PERSON_ID, EFFECTIVE_START_DATE,
EFFECTIVE_END_DATE
18. Copyright (c) 2001 - Oracle Corporation UK Limited
PERSON
PERSON_TYPE indicates the type:
– EMP = Employee
– APL = Applicant etc.
Links to PER_PERSON_TYPES table
– Column SYSTEM_PERSON_TYPE
19. Copyright (c) 2001 - Oracle Corporation UK Limited
ASSIGNMENT
Holds person information specific to
Employment or (job) applications.
– Location
– Position
– Job
– Grade
– Payroll
– Organization
20. Copyright (c) 2001 - Oracle Corporation UK Limited
ASSIGNMENT
Linked to a person via PERSON_ID
A person may have multiple concurrent assignments at
any one point in time
– One must be designated PRIMARY – primary_flag = ‘Y’
ASSIGNMENT_TYPE indicates the type:
– A = Applicant assignment
– E = Employee assignment
ASSIGNMENT_STATUS
– Active
– Term
21. Copyright (c) 2001 - Oracle Corporation UK Limited
ASSIGNMENT
Data is held in the table
PER_ALL_ASSIGNMENTS_F
Primary key is:
ASSIGNMENT_ID,
EFFECTIVE_START_DATE,
EFFECTIVE_END_DATE
Primary indicator is: PRIMARY_FLAG
22. Copyright (c) 2001 - Oracle Corporation UK Limited
PERIOD of SERVICE
Records each period of employment
Links the Person and Assignment
Not directly visible to the end-user
– First of many ‘supporting’ tables within the
application
Holds Hire-date and Termination-Date
23. Copyright (c) 2001 - Oracle Corporation UK Limited
PERIOD of SERVICE
Data is held in the table
PER_PERIODS_OF_SERVICE
Primary key is:
– PERIOD_OF_SERVICE_ID
Foreign key to the Person (PERSON_ID)
24. Copyright (c) 2001 - Oracle Corporation UK Limited
ORGANIZATION
Used to hold definitions of organisations
– Regions
– Departments
– Divisions etc
Also used to hold definition of the Business
Group.
A Business Group is the container for a company
or Enterprise
25. Copyright (c) 2001 - Oracle Corporation UK Limited
ORGANIZATION
Data held in the table:
HR_ALL_ORGANIZATION_UNITS
Primary Key is ORGANIZATION_ID
Business Group identified by:
business_group_id = organization_id
95%+ tables within HRMS suite have the
business_group_id column
Employees can only be assigned to HR
organizations
26. Copyright (c) 2001 - Oracle Corporation UK Limited
How they ‘hang’ together
per_all_people_f per_periods_of_servicePERSON_ID
per_all_assignments_f
PERSON_ID
PERIOD_OF_SERVICE_ID
hr_all_organization_units
BUSINESS_GROUP_ID
BUSINESS_GROUP_ID
ORGANIZATION_ID
27. Copyright (c) 2001 - Oracle Corporation UK Limited
Have you been paying attention?
Quick Quiz #1
28. Copyright (c) 2001 - Oracle Corporation UK Limited
A Person is Hired as an employee. They are then terminated and later re-hired
(again as an employee).
Q: How many rows in per_periods_of_service
will there be ?
A: 2
Q: How many rows in per_all_assignments_f will
there be ?
A: 2
Q: Will they have the same assignment_id?
A: No
31. Copyright (c) 2001 - Oracle Corporation UK Limited
The Concept of Datetrack
Before we can cover other tables within
HRMS we need to de-mystify
Datetrack
32. Copyright (c) 2001 - Oracle Corporation UK Limited
Datetrack: What is it?
A way of recording changes over time
Preservation of history
Allows viewing of data ‘as it was’ at any
given point in time
Maintenance of future-dated records
Set-up of known events in advance of them
happening
33. Copyright (c) 2001 - Oracle Corporation UK Limited
Datetrack: How to spot it
All datetracked tables end with ‘_F’
All datetracked tables have these columns:
– EFFECTIVE_START_DATE (ESD)
– EFFECTIVE_END_DATE (EED)
Many datetracked tables have a corresponding
‘current data only’ view
– Signified by ‘_X’ instead of ‘_F’
34. Copyright (c) 2001 - Oracle Corporation UK Limited
Datetrack: How does it do it?
In simple terms,
– Old row is UPDATED, setting the EFFECTIVE_END_DATE
to day before the change date
– New row is INSERTED, setting EFFECTIVE_START_DATE
to the start of change date
An open row (one that has not been ended) will have
EFFECTIVE_END_DATE set to:
31-DEC-4712
– This indicates ‘End of Time’ - in Application.
N.B. No overlaps, No gaps and ESD exactly one day
after EED.
35. Copyright (c) 2001 - Oracle Corporation UK Limited
Datetrack Modes
Datetrack has several operating modes.
Catering for all events, depending upon:
– Action being performed
Updating
- CORRECTION
- UPDATE
- UPDATE_OVERRIDE
- UPDATE_CHANGE_INSERT
Deleting
- ZAP
- DELETE
- FUTURE_CHANGE
- DELETE_NEXT_CHANGE
– Point in time of Action
– Existence of past, present and future rows
36. Copyright (c) 2001 - Oracle Corporation UK Limited
Datetrack Modes
There are 8 Datetrack Modes
Most ‘Common’ Modes used are:
UPDATE
CORRECTION
DELETE
38. Copyright (c) 2001 - Oracle Corporation UK Limited
Datetrack Modes
The following slides…
– Give a pictorial representation of each of the
datetrack modes
– Assume the Effective Date is 15th Jul 1994
39. Copyright (c) 2001 - Oracle Corporation UK Limited
Mode: Update
Before:
02-Jan-1994 05-Feb-1994
Eff. Date
Row A Row B
After:
02-Jan-1994 05-Feb-1994
Row A Row B
15-Jul-1994
Row C
40. Copyright (c) 2001 - Oracle Corporation UK Limited
Mode: Update
31-DEC-471205-FEB-1994100
04-FEB-199402-JAN-1994100
EEDESDperson_id
BEFORE
31-DEC-471215-JUL-1994100
14-JUL-199405-FEB-1994100
04-FEB-199402-JAN-1994100
EEDESDperson_id
AFTER
41. Copyright (c) 2001 - Oracle Corporation UK Limited
Mode: Correction
Before:
02-Jan-1994 05-Feb-1994
Eff. Date
Row A Row B
After:
02-Jan-1994 05-Feb-1994
No special Datetrack processing required as this is a standard
database row update.
Row A Row B
42. Copyright (c) 2001 - Oracle Corporation UK Limited
Mode: Delete
Before:
02-Jan-1994 05-Feb-1994
Eff. Date
Row A Row B
After:
02-Jan-1994 05-Feb-1994
Row A Row B
15-Jul-1994
15-Sep-1994
Row C
43. Copyright (c) 2001 - Oracle Corporation UK Limited
Mode: Update_Override
Before:
02-Jan-1994 05-Feb-1994
Eff. Date
Row A Row B
08-Aug-1994
Row C
05-Nov-1994
Row D
After:
02-Jan-1994 05-Feb-1994
Row A Row B
15-Jul-1994
Row C
44. Copyright (c) 2001 - Oracle Corporation UK Limited
Mode: Update_Change_Insert
Before:
02-Jan-1994 05-Feb-1994
Eff. Date
Row A Row B
08-Aug-1994
Row C
05-Nov-1994
Row D
After:
02-Jan-1994 05-Feb-1994
Row A Row B
08-Aug-1994
Row C
05-Nov-1994
Row DRow E
15-Jul-1994
45. Copyright (c) 2001 - Oracle Corporation UK Limited
Mode: Future_Change
Before:
02-Jan-1994 05-Feb-1994
Eff. Date
Row A Row B
08-Aug-1994
Row C
05-Nov-1994
Row D
After:
02-Jan-1994 05-Feb-1994
Row A Row B
46. Copyright (c) 2001 - Oracle Corporation UK Limited
Mode: Delete_Next_Change
Before:
02-Jan-1994 05-Feb-1994
Eff. Date
Row A Row B
08-Aug-1994
Row C
05-Nov-1994
Row D
After:
02-Jan-1994 05-Feb-1994
Row A Row B
05-Nov-1994
Row D
47. Copyright (c) 2001 - Oracle Corporation UK Limited
Mode: Zap
Before:
02-Jan-1994 05-Feb-1994
Eff. Date
Row A Row B
08-Aug-1994
Row C
05-Nov-1994
Row D
After:
Deletes all rows which match this unique ID.
Must satisfy internal referential integrity constraint rules before rows are
deleted. Most forms will prevent the total deletion of data due to constraint
references with other data items.
48. Copyright (c) 2001 - Oracle Corporation UK Limited
Controlling Datetrack
Within the online application:
– User set their session ‘effective’ date with the ‘Alter
Session Date’ icon.
All the transactions use this date (until this session
date is reset).
– Form logic determines the datetrack mode to use.
User forced to select appropriate mode if multiple
options exist.
49. Copyright (c) 2001 - Oracle Corporation UK Limited
Controlling Datetrack
From SQL (for retrieval of data)
– For each datetracked table within your query:
for ‘current’ data only, use:-
trunc(sysdate) between table.effective_start_date
and table.effective_end_date
otherwise, use:
<date_var> between table.effective_start_date
and table.effective_end_date
53. Copyright (c) 2001 - Oracle Corporation UK Limited
Lookups: What & Why ?
A list of values for certain types of
information.
Forces users to use same terminology
Can speed-up data entry (marginal)
Consistency of definitions
Simplifies translation of seeded lookup data
54. Copyright (c) 2001 - Oracle Corporation UK Limited
Types of Lookups
Three types of Lookups:
– User
You can add codes and disable supplied codes
– Extensible
You can add new codes but you cannot disable
supplied codes (as the system uses them)
– System
You can neither add or disable supplied codes. You
can only alter the meaning of supplied codes.
55. Copyright (c) 2001 - Oracle Corporation UK Limited
What does one look like?
Contains 4 essential components:
LOOKUP_TYPE
the collective name for a set of lookup values, such
as YES_NO or TITLE
LOOKUP_CODE
a specific code for a value within a lookup type
MEANING
the meaning for a specific lookup code
ENABLED_FLAG
is this lookup code active or not
56. Copyright (c) 2001 - Oracle Corporation UK Limited
Examples
Lookup_type Lookup_Code Meaning
YES_NO Y Yes
N No
TITLE MR. Mr
MRS. Mrs
DR. Doctor
MISS Miss
57. Copyright (c) 2001 - Oracle Corporation UK Limited
Other info
Lookup data held in the table:
FND_LOOKUP_VALUES
Lookup types held in
FND_LOOKUP_TYPES
Lookup_type and Lookup_code are
VARCHAR2(30) fields
58. Copyright (c) 2001 - Oracle Corporation UK Limited
How to spot a lookup column
Difficult, but not impossible
Best reference is the HRMS TRM
Datapump help
Give-away clues are that the column in question
is VARCHAR2(30)
– Examples (from per_all_people_f) are:
TITLE
SEX
NATIONALITY
59. Copyright (c) 2001 - Oracle Corporation UK Limited
Coding for Lookups
SELECT hrl.meaning, ppf.last_name
FROM hr_lookups hrl
, per_all_people_f ppf
WHERE ppf.person_id = 12345
AND trunc(sysdate) between ppf.effective_start_date
and ppf.effective_end_date
AND hrl.lookup_code = ppf.title
AND hrl.lookup_type = ‘TITLE’;
OR
SELECT hr_general.decode_lookup(‘TITLE’,ppf.title),
ppf.last_name
FROM per_all_people_f ppf
WHERE ppf.person_id = 12345
AND trunc(sysdate) between ppf.effective_start_date
and ppf.effective_end_date;
61. Copyright (c) 2001 - Oracle Corporation UK Limited
HR Tables
Some, not all, of the tables one is likely
to encounter
62. Copyright (c) 2001 - Oracle Corporation UK Limited
HR Tables
Tables holding ‘work structure’ information
(i.e. set-up data)
Tables specific to the PERSON
Tables specific to the ASSIGNMENT
How it all ‘hangs together’
63. Copyright (c) 2001 - Oracle Corporation UK Limited
HR Tables - Work structure
Work structure tables cover:
– Organizations (already done)
– Jobs
– Grades
– Positions
– Locations
Jobs, Positions & Grades are Key Flexfield
structures
64. Copyright (c) 2001 - Oracle Corporation UK Limited
Flexfields
Two types:
– DESCRIPTIVE
– KEY
DECRIPTIVE
– Provides additional user defined fields
table column name is ATTRIBUTE1, ..20.
KEY
– Provides additional structures for the application
table column name is SEGMENT1, ..30
– Next few slides will illustrate how key flexfields are used in HR.
65. Flexfields - Key
User-definable structures to represent business
data
Configurable at implementation time
Up to 30 segments of information
Unique combination of segment data held in one
table (per structure)
66. Copyright (c) 2001 - Oracle Corporation UK Limited
Flexfields
Linkage of segment-combination to Person held
in another table.
Reduces data storage / increases reporting
complexity !
more detail to follow later-on :-)
67. Copyright (c) 2001 - Oracle Corporation UK Limited
Flexfields - Example
GRADE: Segment1 “Stream” “M”=Management
“T”=Technical
Segment2 “Level” values 1 to 12
PER_GRADE_DEFINITIONS
Grade_Def_ID Seg1 Seg2 Seg3 Seg4 … Seg30
12345 M 8 Null Null Null
12346 M 12 Null Null Null
12347 T 2 Null Null Null
12348 T 7 Null Null Null
PER_GRADES
Grade_ID Grade_Defintion_Id Name
10001 12346 M.12
10002 12347 T.2
10003 12348 T.7
69. Copyright (c) 2001 - Oracle Corporation UK Limited
Work structures - Jobs
Unique combination of Job segment data held in
PER_JOB_DEFINITIONS
– Unique key is JOB_DEFINITION_ID
Intersection table for Job data held in PER_JOBS
– Unique key is JOB_ID
– Foreign key JOB_DEFINITION_ID
– Column of concatenated segment data: NAME
70. Copyright (c) 2001 - Oracle Corporation UK Limited
Work structures - Grades
Unique combination of Grade segment data held
in PER_GRADE_DEFINITIONS
– Unique key is GRADE_DEFINITION_ID
Intersection table for Grade data held in
PER_GRADES
– Unique key is GRADE_ID
– Foreign key GRADE_DEFINITION_ID
– Column of concatenated segment data: NAME
71. Copyright (c) 2001 - Oracle Corporation UK Limited
Work structures - Positions
Positions are slightly different to Jobs and Grades
Unique combination of segment data held in
PER_POSITION_DEFINITIONS
– Primary key POSITION_DEFINITION_ID
A single instance of a position within an
organization is held in PER_ALL_POSITIONS
– Primary key POSITION_ID
72. Copyright (c) 2001 - Oracle Corporation UK Limited
Work structures - Positions
PER_ALL_POSITIONS also contains keys to…
– A job (JOB_ID)
– An organization (ORGANIZATION_ID)
– A location (LOCATION_ID)
– The position definition (Position_definition_id)
– and the business group (Business_group_id)
73. Copyright (c) 2001 - Oracle Corporation UK Limited
Work structures - Locations
Can be used to describe physical or logical
locations within an organisation.
Location data held in the table:
HR_LOCATIONS_ALL
– Primary Key is LOCATION_ID
– Holds location name, description & address
Table is shared across many applications
75. Copyright (c) 2001 - Oracle Corporation UK Limited
Tables for People data
Addresses
Phone numbers
Contacts
SIT’s (Special Information Types)
EIT’s (Extra Information Types)
Absences
76. Copyright (c) 2001 - Oracle Corporation UK Limited
Addresses
Address data held in the table
PER_ADDRESSES
– Primary key is ADDRESS_ID
– Foreign key to Person (person_id)
Addresses have a STYLE - this dictates the
country address format (e.g UK, US, FR etc)
Addresses have an ADDRESS_TYPE
– e.g. Home, Work, Term-time etc
– Lookup_Type = ADDRESS_TYPE
77. Copyright (c) 2001 - Oracle Corporation UK Limited
Address - Styles
The column STYLE maps to the table
fnd_territories (country codes)
This dictates how certain columns are used
– REGION_1, REGION_2, REGION_3
For GB address, REGION_1 will hold the
County
– Lookup_type = GB_COUNTY
78. Copyright (c) 2001 - Oracle Corporation UK Limited
Addresses - additional
Addresses can be held for:
– Employees & Ex-employees
– Contacts
– Applicants & Ex-applicants
Addresses are not datetracked, they are dated !
– Multiple concurrent addresses can be held
– DATE_FROM and DATE_TO columns
– One address must always be designated Primary
(PRIMARY_FLAG=‘Y’)
79. Copyright (c) 2001 - Oracle Corporation UK Limited
Phone Numbers
Phone data is held in the table PER_PHONES
– Primary key PHONE_ID
– Dynamic composite foreign key
PARENT_TABLE
PARENT_ID
In theory phones to be held against many entities
– However only Employees, Ex-employees, Contacts,
Applicants are supported !
80. Copyright (c) 2001 - Oracle Corporation UK Limited
Phone Numbers
PARENT_TABLE should be set to
PER_ALL_PEOPLE_F
PARENT_ID should be set to the
PERSON_ID of the person having the phone
number
81. Copyright (c) 2001 - Oracle Corporation UK Limited
Phone Numbers
The column PHONE_TYPE indicates what type
of number is being stored
– This maps to lookup_type, PHONE_TYPE
– This is an extensible lookup type
– Values such as Home, Work, Fax are seeded
Phones are not Datetracked, they are dated.
– DATE_FROM and DATE_TO
– No limit to number of phone numbers allowed
83. Copyright (c) 2001 - Oracle Corporation UK Limited
Contacts
Contacts are People !
– Contact data is held in PER_ALL_PEOPLE_F
Interaction between person and contact held in
PER_CONTACT_RELATIONSHIPS
– Primary key CONTACT_RELATIONSHIP_ID
– PERSON_ID is fk to Person having this contact
– CONTACT_PERSON_ID is fk to the Contact
person record
84. Copyright (c) 2001 - Oracle Corporation UK Limited
Contacts
Person can have any number of contacts
One contact must be designated Primary
– PRIMARY_CONTACT_FLAG = ‘Y’
The relationship is identified by
CONTACT_TYPE column
– Maps to Lookup_type CONTACT_TYPE
Such as SPOUSE, FATHER, CONTACT etc
85. Copyright (c) 2001 - Oracle Corporation UK Limited
Contacts
Contact relationships are not Datetracked, they
are Dated
– DATE_START and DATE_END
Contacts can also be Employees
– A husband & wife who are employees would require
2 rows to provide recipocal contact relationships
(see next slide)
88. Copyright (c) 2001 - Oracle Corporation UK Limited
SIT’s
Special Information Types
– a keyflexfield structure
– hold Person-level data that doesn’t have a specific
home in standard tables
Up to 30 segments of data per ‘info type’
Records are Dated to allow multiple occurrences
per ‘info type’
89. Copyright (c) 2001 - Oracle Corporation UK Limited
SIT’s
Unique combinations of the segment data held in
PER_ANALYSIS_CRITERIA
– Primary key ANALYSIS_CRITERIA_ID
– FK to Structure definition (ID_FLEX_NUM)
Intersection table linking combination with
person in PER_PERSON_ANALYSES
– Primary key PERSON_ANALYSIS_ID
– Foreign key to Person (PERSON_ID)
– Foreign key to comb. (analysis_criteria_id)
90. Copyright (c) 2001 - Oracle Corporation UK Limited
SIT’s - Uses of...
Examples seen in other projects include:-
– Disciplinary Records
– Non-OTA Training Records
– Security clearance information
– Company Property
– Medical Certificates
– Driving Licence information
– Any historical data
91. Copyright (c) 2001 - Oracle Corporation UK Limited
SIT - Structures
Special Information type (structure) defines:
– Which segments are used (Active)
– Which segments are displayed
– What each active segment holds (datatype)
– How each segment is validated (value_set)
– The ‘End User’ name (label) for the segment
The SIT structures are defined through the online
application screens (queue demo!)
92. Copyright (c) 2001 - Oracle Corporation UK Limited
SIT - Structures
Structure definition held in
FND_ID_FLEX_STRUCTURES
– Primary key ID_FLEX_NUM, ID_FLEX_CODE
ID_FLEX_CODE = ‘PEA’ for SIT structures
Structure Segment definitions held in
FND_ID_FLEX_SEGMENTS
– Same primary key as structure table
93. Copyright (c) 2001 - Oracle Corporation UK Limited
SIT - Example code
SELECT ppf.person_id “PersonID”
, TO_CHAR(TO_DATE(pac.segment4,'YYYY/MM/DD')
,'YYYY-MM-DD') “PassportExpiryDate”
, pac.segment2 “PassportNumber”
, TO_CHAR(ppa.date_from,'YYYY-MM-DD') “PassportDateFrom”
, TO_CHAR(ppa.date_to,'YYYY-MM-DD') “PassportDateTo”
, pac.segment3 “PassportNationality”
, TO_CHAR(ppa.last_update_date,'YYYY-MM-DD') “PassportDateUpdated”
, TO_CHAR(ppa.creation_date,'YYYY-MM-DD') “PassportDateCreated”
FROM per_all_people_f ppf
, per_analysis_criteria pac
, per_person_analyses ppa
, fnd_id_flex_structures_tl ifs
WHERE TRUNC(sysdate) BETWEEN ppf.effective_start_date
AND ppf.effective_end_date
AND ppf.person_id = ppa.person_id
AND pac.analysis_criteria_id = ppa.analysis_criteria_id
AND SUBSTR(pac.segment1,1,8) = 'Passport'
AND ifs.id_flex_structure_name = 'Documentation'
AND pac.id_flex_num = ifs.id_flex_num;
95. Copyright (c) 2001 - Oracle Corporation UK Limited
EIT’s
Extra Information Types
– Descriptive Flexfield configurable structures
Hold additional data at the following levels:
Person
Assignment
Location
Organization
Job
Position
Element (new for 11.5.4)
96. Copyright (c) 2001 - Oracle Corporation UK Limited
EIT’s
20 segments of data per row per structure
Configurable for multiple entries or single entry
per structure
Suitable for bulk-data storage
– No unique combinations table
– More efficient (performance wise) online
97. Copyright (c) 2001 - Oracle Corporation UK Limited
EIT’s - Uses of...
Examples seen in other projects include:-
– Payroll run item history
– Job History (where this is not loaded into
Assignment)
– Training History (where not loaded into OTA)
Use is suited to large volume ‘raw’ data
– Where client cannot cleanse data or want data taken
over ‘as is’
98. Copyright (c) 2001 - Oracle Corporation UK Limited
EIT - Tables
EIT Data is stored in the following Tables:
Person PER_PERSON_EXTRA_INFO (Data)
PER_PEOPLE_INFO_TYPES (Structure)
Assignment PER_ASSIGNMENT_EXTRA_INFO (Data)
PER_ASSIGNMENT_INFO_TYPES (Structure)
Location HR_LOCATION_EXTRA_INFO (Data)
HR_LOCATION_INFO_TYPES (Structure)
Job PER_JOB_EXTRA_INFO (Data)
PER_JOB_INFO_TYPES (Structure)
Position PER_POSITION_EXTRA_INFO (Data)
PER_POSITION_INFO_TYPES (Structure)
Organization HR_ORGANIZATION_INFORMATION (Data)
HR_ORG_INFORMATION_TYPES (Structure)
HR_ORG_INFO_TYPES_BY_CLASS (Structure)
99. Copyright (c) 2001 - Oracle Corporation UK Limited
EIT - Example code
SELECT ppf.employee_number ,ppf.full_name
,paei.aei_information1 “Change_Date”
,paei.aei_information2 “Reason”
,paei.aei_information3 “Airport_Loc”
,paei.aei_information4 “Cond_Hrs”
,paei.aei_information5 “Job_Title”
,paei.aei_information6 “Annu_Sal”
,paei.aei_information7 “Grade”
,paei.aei_information8 “Point_Scale”
,paei.aei_information9 “Status_Code”
,paei.aei_information10 “Shift_Allow”
FROM per_assignment_extra_info paei
,per_all_assignments_f paf
,per_assignment_info_types pait
,per_all_people_f ppf
WHERE paf.person_id = ppf.person_id (+)
and paf.assignment_id = paei.assignment_id
and paei.information_type = pait.information_type
and pait.information_type = 'BAA Job History'
AND ppf.CURRENT_EMPLOYEE_FLAG = 'Y')
AND TRUNC(SYSDATE) BETWEEN paf.effective_start_date
AND paf.effective_end_date
AND TRUNC(SYSDATE) BETWEEN ppf.effective_start_date
AND ppf.effective_end_date
101. Copyright (c) 2001 - Oracle Corporation UK Limited
Absences
Absence data is held in
PER_ABSENCE_ATTENDANCES
– Primary key ABSENCE_ATTENDANCE_ID
– Foreign key to Person (person_id)
Absences categorised by absence TYPES
– PER_ABSENCE_ATTENDANCE_TYPES
– Primary key
ABSENCE_ATTENDANCE_TYPE_ID
– This is an fk in per_absence_attendances
102. Copyright (c) 2001 - Oracle Corporation UK Limited
Absences
Numerous Absence types
– Illness
– Holiday
– Unpaid Leave
– Civic duties
Absence types are classified into Categories
– ABSENCE_CATEGORY column in the absence
types Table
– Maps to Lookup_Type ABSENCE_CATEGORY
104. Copyright (c) 2001 - Oracle Corporation UK Limited
Absences - Other data
Absences can be recorded in Days or Hours
– ABSENCE_DAYS or ABSENCE_HOURS
– Cannot be both at same time
OCCURRENCE
– System controlled counter per employee per absence
type
Linked Absences
– LINKED_ABSENCE_ID
105. Copyright (c) 2001 - Oracle Corporation UK Limited
Absences - Other data
Absences of the same TYPE cannot have
overlapping dates
Absences of differing TYPEs can overlap
– Can have concurrent absences of different types
106. Copyright (c) 2001 - Oracle Corporation UK Limited
How HR hangs together
Joining together the tables we’ve just
rushed through...
109. Copyright (c) 2001 - Oracle Corporation UK Limited
Payroll Tables
Some, not all, of the tables one is likely
to encounter
110. Copyright (c) 2001 - Oracle Corporation UK Limited
Payroll Tables
Tables holding set-up & configuration
information
Tables specific to the ASSIGNMENT
111. Copyright (c) 2001 - Oracle Corporation UK Limited
Payroll Tables - Set-up
Time Periods
Payroll definition
Element Definitions
Element Links
Balance definitions
112. Copyright (c) 2001 - Oracle Corporation UK Limited
Time Periods
A defined ‘slice’ of time
Used as a basis for regular payroll
processing
Limited by Legislative parameters
113. Copyright (c) 2001 - Oracle Corporation UK Limited
Time Periods
Time periods are grouped into ‘Period Sets’
A Period Set contains one-years worth of
Time Periods
The number of Time Periods to a Period Set
is governed by ‘Period Type’
Each Payroll will have its own set of ‘time
periods’
114. Copyright (c) 2001 - Oracle Corporation UK Limited
Time Periods
Period_Type No. of Time Periods
(per year)
Week 52
Calendar Month 12
Bi-week 26
4-week 13
Quarter 4
115. Copyright (c) 2001 - Oracle Corporation UK Limited
Time Periods
Data held in table PER_TIME_PERIODS
– Primary key TIME_PERIOD_ID
– Foreign key to Payroll (PAYROLL_ID)
Key columns are:
START_DATE Start date of the period e.g. 01-AUG-2001
END_DATE End date of the period e.g. 31-AUG-2001
PERIOD_NUM Number of period within year e.g 05
PERIOD_SET_NAME Name of set to which this period belongs to.
116. Copyright (c) 2001 - Oracle Corporation UK Limited
Payroll
“A payroll defines a group of employees who
share the same frequency of processing and
payment, defined by the payroll calendar
in PER_TIME_PERIODS. The definition
of the payroll includes the default processing
information for consolidation sets, payment
types, cost allocation, and offset dates.”
117. Copyright (c) 2001 - Oracle Corporation UK Limited
Payroll
The Payroll definition is held in the table
PAY_ALL_PAYROLLS_F
Primary key -
PAYROLL_ID
EFFECTIVE_START_DATE
EFFECTIVE_END_DATE
This is a datetracked table, allowing changes to
the definition over time
118. Copyright (c) 2001 - Oracle Corporation UK Limited
Payroll
The column PAYROLL_NAME uniquely
describes each payroll definition. eg
– ‘Staff Nurses Weekly’
– ‘Cleaners Monthly’
– ‘Executives Monthly’
119. Copyright (c) 2001 - Oracle Corporation UK Limited
Payroll
The Payroll definition holds other info:
– Defaults for Payment Method & Cost Codes
– Offset dates for
Payment Date
Payroll Cutoff Date
Pay Advice Date
Direct Deposits Date
120. Copyright (c) 2001 - Oracle Corporation UK Limited
Time Period & Payroll Diagram
pay_all_payrolls_f per_time_periodsPAYROLL_ID
per_time_period_types per_time_period_sets
PERIOD_TYPE
PERIOD_SET_NAME
122. Copyright (c) 2001 - Oracle Corporation UK Limited
Payment Methods
Details how an employee receives their pay
e.g BACS, Cheque, Cash etc
Lookup PAYMENT_CATEGORY
Table PAY_PAYMENT_TYPES
Includes details of the Bank / Building Society
accounts
Multiple accounts can be held per assignment
Allocation of Percentage or fixed amounts to
specific accounts.
123. Copyright (c) 2001 - Oracle Corporation UK Limited
Payment Methods
Payment method types held in the table
PAY_ORG_PAYMENT_METHODS_F
Primary key
ORG_PAYMENT_METHOD_ID
EFFECTIVE_START_DATE
EFFECTIVE_END_DATE
ORG_PAYMENT_METHOD_NAME holds
name of method, eg:
Cash
BACS etc
124. Copyright (c) 2001 - Oracle Corporation UK Limited
Payment Methods
Payment method held in table
PAY_PERSONAL_PAYMENT_METHODS_F
Primary key
PERSONAL_PAYMENT_METHOD_ID
EFFECTIVE_START_DATE
EFFECTIVE_END_DATE
Holds columns for:
– Amount
– Percentage
– Foreign key to Assignment
125. Copyright (c) 2001 - Oracle Corporation UK Limited
Payment Methods
Actual Bank Detail information held in
PAY_EXTERNAL_ACCOUNTS
– Primary key EXTERNAL_ACCOUNT_ID
This is a ‘developer’ key flexfield table whose
structure varies between legislations
Foreign key ID_FLEX_NUM links to structure
Data held in columns SEGMENT1 to
SEGMENT30
126. Copyright (c) 2001 - Oracle Corporation UK Limited
External Accounts structure
Structure definition held in
FND_ID_FLEX_STRUCTURES
– Primary key ID_FLEX_NUM, ID_FLEX_CODE
ID_FLEX_CODE = ‘BANK’ for bank details
Structure Segment definitions held in
FND_ID_FLEX_SEGMENTS
– Same primary key as structure table
127. Copyright (c) 2001 - Oracle Corporation UK Limited
External Accounts - example
select seg.application_column_name,
seg.segment_name
from fnd_id_flex_segments seg,
fnd_id_flex_structures_tl struc
where struc.id_flex_structure_name = 'GB Bank Details'
and seg.id_flex_num = struc.id_flex_num
and seg.id_flex_code = 'BANK'
and seg.enabled_flag = 'Y'
order by seg.segment_num;
gives…
APPLICATION_COLUMN_NAME SEGMENT_NAME
------------------------------ ------------------------------
SEGMENT3 Sort Code
SEGMENT1 Bank Name
SEGMENT2 Bank Branch
SEGMENT4 Account Number
SEGMENT5 Account Name
SEGMENT6 Account Type
SEGMENT7 Bld Society Account Number
SEGMENT8 Bank Branch Location
130. Can I have mine in cash in brown
envelopes please ?
131. Copyright (c) 2001 - Oracle Corporation UK Limited
Elements
Elements are the building blocks for Pay and
benefits
Used by HRMS and Payroll
132. Copyright (c) 2001 - Oracle Corporation UK Limited
Elements can represent
Earnings, such as salary, wages & bonuses
Benefits, such as employee stock & pension
plans
Absences from work
Non-payroll items, such as expenses
Voluntary and involuntary deductions
Employer taxes and other liabilities
133. Copyright (c) 2001 - Oracle Corporation UK Limited
Predefined Elements
UK Payroll legislation provides many predefined
elements.
– Tax (PAYE)
– National Insurance (Employee and Employer)
– Court Orders
– Other Attachment-of-earnings orders
These elements cannot be modified
134. Copyright (c) 2001 - Oracle Corporation UK Limited
Element Definitions
An element definition can have up to 15 items of
information.
These items of information are called ‘Input
Values’
An Input Value can be defined to hold:
Alphabetic characters or Words
Integers or Numbers
Money
Hours or minutes
Date, day or time
135. Copyright (c) 2001 - Oracle Corporation UK Limited
Element classifications
Elements are grouped into Primary
Classifications
Classifications are used by payroll to:-
– Control order they are processed
– Control the balance feeds
Classifications can also be used to logically
group elements for reporting purposes
136. Copyright (c) 2001 - Oracle Corporation UK Limited
Element classifications
Seeded element classifications are:-
Information
Direct Payment
Earnings
Employer Charges
Pre-Tax Deductions
NI
PAYE
Court Orders
Voluntary Deductions
137. Copyright (c) 2001 - Oracle Corporation UK Limited
Element Tables: Definition
Element definitions are held in the table
PAY_ELEMENT_TYPES_F
Primary key is
ELEMENT_TYPE_ID
EFFECTIVE_START_DATE
EFFECTIVE_END_DATE
Foreign key to classification
CLASSIFICATION_ID
138. Copyright (c) 2001 - Oracle Corporation UK Limited
Element Tables: Input Values
Element Input Values are held in the table
PAY_INPUT_VALUES_F
Primary key is
INPUT_VALUE_ID
EFFECTIVE_START_DATE
EFFECTIVE_END_DATE
Foreign key to element definition
139. Copyright (c) 2001 - Oracle Corporation UK Limited
Element Tables: Input Values
Input values table also holds the following
information (for each input value):
NAME User name of the input value
LOOKUP_TYPE If this input is validated by a lookup
DISPLAY_SEQUENCE Order to display if multiple inputs are present
MANDATORY_FLAG Is a value for this input required or not
UOM Unit of measure for this input value
DEFAULT_VALUE The value to default if no entry is made
MAX_VALUE Maximum value allowable for this input
MIN_VALUE Minimum value allowable for this input
WARNING_OR_ERROR Whether to raise a warning or an error if the
value entered is beyond the min/max values.
140. Copyright (c) 2001 - Oracle Corporation UK Limited
Element Tables: Classification
Element classifications are held in the table
PAY_ELEMENT_CLASSIFICATIONS
Primary key is
CLASSIFICATION_ID
141. Copyright (c) 2001 - Oracle Corporation UK Limited
Element Eligibility
Some elements may be available to all employees
However some elements may only be allocated to
specific sub-sets of employees
To determine this eligibility we build links to
components of assignments
Employees must have these components of the
assignment to satisfy this eligibility link
142. Copyright (c) 2001 - Oracle Corporation UK Limited
Components of Eligibility
Assignment components to which you can link elements are:
Payroll If employees on all your payrolls are eligible
for an element, you can link it to all payrolls.
Salary Basis You may have an element you only want to give
to hourly-paid employees.
Employment Category e.g. Full-Time, Part-Time etc.
Organization e.g. to a specific department or region
Location e.g. London Allowance only for those employees
based in London location
Job e.g. Secretarial Staff
Grade You may want to restrict eligibility to a specific
grade or grades.
Position Or you may want to restrict to specific posts
within your organization.
143. Copyright (c) 2001 - Oracle Corporation UK Limited
Other Eligibility Rules
You may have multiple links per element
definition.
However, there is no overlap in eligibility criteria
for these links
– i.e. An employee could not receive the same element
via more than one link
144. Copyright (c) 2001 - Oracle Corporation UK Limited
Element Tables: Eligibility
Element eligibility rules are held in the table
PAY_ELEMENT_LINKS_F
Primary key is
ELEMENT_LINK_ID
EFFECTIVE_START_DATE
EFFECTIVE_END_DATE
148. Copyright (c) 2001 - Oracle Corporation UK Limited
Element Entries
We know element definitions (hopefully).
Element entries are held in the table
PAY_ELEMENT_ENTRIES_F
– Primary key
ELEMENT_ENTRY_ID
EFFECTIVE_START_DATE
EFFECTIVE_END_DATE
Foreign keys to
– Assignment (assignment_id)
– Element definition (element_link_id)
149. Copyright (c) 2001 - Oracle Corporation UK Limited
Element Entries
Entry values (for an entry) are held in
PAY_ELEMENT_ENTRY_VALUES_F
– Primary key
ELEMENT_ENTRY_VALUE_ID
EFFECTIVE_START_DATE
EFFECTIVE_END_DATE
Foreign keys to
– Entry (element_entry_id)
– Input Value definition (input_value_id)
Actual value held in column
SCREEN_ENTRY_VALUE
150. Copyright (c) 2001 - Oracle Corporation UK Limited
Element entry concepts
Two types of element entry
– Recurring
– Non-recurring
Recurring entries can exist over many payroll
periods
Non-recurring entries are valid for a single
payroll period only
151. Copyright (c) 2001 - Oracle Corporation UK Limited
Element entry types
There are four element entry types:
Normal Entry
Override Entry
Additional Entry
Adjustment Entry
Additive Adjustment
Replacement Adjustment
Balance Adjustment
152. Copyright (c) 2001 - Oracle Corporation UK Limited
Element entry creator types
Apart from normal entry, element entries can
be created by several other processes
This is indicated by the CREATOR_TYPE
column
The CREATOR_ID column links to the
creating action (see next slide)
153. Copyright (c) 2001 - Oracle Corporation UK Limited
Element creators
Creator_id
Type Description Creator_ID links to...
A Absence per_absence_attendances.absence_attendance_id
B Balance Adjustment
D Advance Pay
EE Retropay by Element
F Element Override pay_element_entries_f.element_entry_id
H MIX
M SMP ssp_maternities.maternity_id
P BackPay
Q QuickPay pay_payroll_actions.payroll_action_id
R Retropay by Action
S SSP per_absence_attendances.absence_attendance_id
SP Salary Proposal per_pay_proposals.pay_proposal_id
156. Copyright (c) 2001 - Oracle Corporation UK Limited
Balances
Show the positive or negative accumulation of
particular values over time
Fed via results from payrun or directly from
element entry input values
Can exist at either Person or Assignment
Can exist for different time dimensions
e.g current_run, period_to_date, year_to_date etc
157. Copyright (c) 2001 - Oracle Corporation UK Limited
Balances
Standard UK Payroll Balance Dimensions
_ASG_RUN during one run
_ASG_CALENDAR_YTD since start of calendar year, reset each year
_ASG_YTD since the start of the payroll processing year
_ASG_PROC_PTD for payroll processing period
_ASG_TD_ITD since start of assignment or since transfer
from different tax scheme.
_PER_TD_YTD for the person, since start of tax year (useful
if emp has multiple assignments)
_ELEMENT_ITD since the start of the element entry
158. Copyright (c) 2001 - Oracle Corporation UK Limited
Balance Tables: Definition
Basic definition of a balance is held in the table
PAY_BALANCE_TYPES
This table holds the:
– Name (BALANCE_NAME)
– Currency (CURRENCY_CODE)
– Unit of Measure (BALANCE_UOM)
Primary Key BALANCE_TYPE_ID
159. Copyright (c) 2001 - Oracle Corporation UK Limited
Balance Tables: Dimensions
The core definition of balance dimensions are
held in the table
PAY_BALANCE_DIMENSIONS
This table holds the:
– Name (DIMENSION_NAME)
– Type (DIMENSION_TYPE) - this indicates whether
the balance is ASG or PER
Primary key BALANCE_DIMENSION_ID
160. Copyright (c) 2001 - Oracle Corporation UK Limited
Balance Tables: Defined Balances
PAY_DEFINED_BALANCES is the
intersection table between types and
dimensions: combination of balance_type
and balance_dimension, e.g.
GROSS_PAY_ASG_YTD
Primary key DEFINED_BALANCE_ID
Foreign key BALANCE_TYPE_ID
Foreign key BALANCE_DIMENSION_ID
161. Copyright (c) 2001 - Oracle Corporation UK Limited
Balance Tables: Others
Details of which element inputs feed a balance
type are held in PAY_BALANCE_FEEDS_F
Primary key is
BALANCE_FEED_ID
EFFECTIVE_START_DATE
EFFECTIVE_END_DATE
Balances are classified (in the same way elements
are) by PAY_BALANCE_CLASSIFICATIONS
164. Copyright (c) 2001 - Oracle Corporation UK Limited
People Group
A flexible area for holding user-defined
assignment data
Key flexfield structure - provides up to 30
segments of information
Data can be used for ‘grouping’ sets of
assignments together
People Group can be used for Element eligibility
This information is used by the payroll run
165. Copyright (c) 2001 - Oracle Corporation UK Limited
People Group
Data held in the table PAY_PEOPLE_GROUPS
Primary key PEOPLE_GROUP_ID
– This is the foreign key column in the assignments
table
Data held in columns SEGMENT1 to
SEGMENT30
GROUP_NAME holds concatenation of segment
data
166. Copyright (c) 2001 - Oracle Corporation UK Limited
People Group - Structures
Structure definition held in
FND_ID_FLEX_STRUCTURES
– Primary key ID_FLEX_NUM, ID_FLEX_CODE
ID_FLEX_CODE = ‘GRP’ for people group
Structure Segment definitions held in
FND_ID_FLEX_SEGMENTS
– Same primary key as structure table
167. Copyright (c) 2001 - Oracle Corporation UK Limited
People Group - Example code
SELECT ppf.full_name “EMPLOYEE_NAME”
, ppf.employee_number “EMPLOYEE_NUMBER”
, ppayf.payroll_name “PAYROLL”
, ppg.segment1 “SUPERANN_MARKER”
, ppg.segment2 “AL_REVIEW_MONTH”
, ppg.segment3 “PAY_DEAL_ELIGIBILITY”
, ppg.segment4 “PAY_PROGRESSION_TYPE”
, ppg.segment5 “PAY_PROGRESSION_MONTH”
, ppg.segment6 “MARK_TIME_MARKER”
FROM pay_people_groups ppg
, pay_payrolls_f ppayf
, per_all_people_f ppf
, per_all_assignments_f paf
WHERE paf.primary_flag = 'Y'
AND paf.person_id = ppf.person_id
AND paf.payroll_id = ppayf.payroll_id (+)
AND paf.people_group_id = ppg.people_group_id (+)
AND TRUNC(SYSDATE) BETWEEN paf.effective_start_date
AND paf.effective_end_date
AND TRUNC(SYSDATE) BETWEEN ppf.effective_start_date
AND ppf.effective_end_date
170. Copyright (c) 2001 - Oracle Corporation UK Limited
Salary
Salary is paid via an element entry
However, the method of attaching a salary to
an assignment can vary…
You can use Salary Administration, or…
you can use Grade Rules and Spinal Points
171. Copyright (c) 2001 - Oracle Corporation UK Limited
Salary: Salary Admin
Uses the Salary Administration facility within
HR
Allows the creation of ‘proposed’ salaries
These ‘proposals’ need to be approved before
salary becomes effective.
Allows increments to be applied by amounts or
percentages
Salaries can be broken-down into components
(rarely used)
172. Copyright (c) 2001 - Oracle Corporation UK Limited
Salary: Salary Admin
To use salary administration you need a salary
basis…
Table PER_PAY_BASES holds definition of a
specific salary basis, e.g.
basis name (‘Monthly’ etc)
which element will hold the approved salary
Primary key PAY_BASIS_ID
This is a foreign key into the Assignment
173. Copyright (c) 2001 - Oracle Corporation UK Limited
Salary: Salary Admin
The Salary proposal records are held in
PER_PAY_PROPOSALS
Primary key PAY_PROPOSAL_ID
Foreign key to assignment (assignment_id)
PROPOSED_SALARY The new salary proposed by this record
PROPOSAL_REASON The reason for this new salary
CHANGE_DATE The effective date for the new salary
LAST_CHANGE_DATE Date of the last salary proposal
APPROVED Flag to indicate this proposal is approved
174. Copyright (c) 2001 - Oracle Corporation UK Limited
Salary: Salary Admin
What happens when the proposal is approved ?
If existing Salary exists, performs a Datetrack
Update on it
Using new Salary from the proposal
Uses CHANGE_DATE as the Datetrack effective
date
Otherwise, creates a brand new entry
Sets APPROVED to ‘Y’
176. Copyright (c) 2001 - Oracle Corporation UK Limited
Salary: Grades & Spines
This method is generally used by Local
Authorities
Uses Grades, Grade Spines and Spinal Points
Allows the construction of complex Pay Scales
and progression steps
Specific salaries can appear in different scales at
different steps
To be given a salary, the assignment is given a
‘personal’ point placement (called a Grade Step
within the app)
177. Copyright (c) 2001 - Oracle Corporation UK Limited
Salary: Grades & Spines
An assignment is given a specific Grade
(grade_id).
The Grade is associated with a Grade Scale
(PER_GRADE_SPINES_F)
A grade scale has a series of grade steps (or
spinal point steps) associated with it
(PER_SPINAL_POINT_STEPS_F)
178. Copyright (c) 2001 - Oracle Corporation UK Limited
Salary: Grades & Spines
Each spinal point step is linked to a Spinal
Point (PER_SPINAL_POINTS) ...
and an associated step salary value
(PAY_GRADE_RULES_F)
179. Copyright (c) 2001 - Oracle Corporation UK Limited
Salary: Grades & Spines
An assignments spinal point placement (or Grade
Step) is held in
PER_SPINAL_POINT_PLACEMENTS_F
Primary key is
PLACEMENT_ID
EFFECTIVE_START_DATE
EFFECTIVE_END_DATE
Salary is NOT held on an element entry !
183. Copyright (c) 2001 - Oracle Corporation UK Limited
WHO and OVN ??
A couple of things that go on behind
the scenes !
184. Copyright (c) 2001 - Oracle Corporation UK Limited
WHO
In application, follow the following navigation
path:
Help=>About=>This Record (or something
similar)
Where does this information come from ??
The WHO columns.
185. Copyright (c) 2001 - Oracle Corporation UK Limited
WHO
Virtually every table within the HRMS
application (and indeed apps in general) has
the following columns…
CREATED_BY
CREATION_DATE
LAST_UPDATED_BY
LAST_UPDATE_DATE
186. Copyright (c) 2001 - Oracle Corporation UK Limited
WHO
Created_By and Creation_Date are set at the time
the record is first created
– Created_by being the USER_ID of the user
Last_Updated_By and Last_Update_Date are set
every time that particular row is changed
187. Copyright (c) 2001 - Oracle Corporation UK Limited
WHO
These columns are maintained by a database
trigger.
Trigger name is <TABLE_NAME>_WHO
– e.g. per_all_people_f_who etc
These are created and enabled at install time
They are re-enabled every time a patch is applied
It is not recommended that you disable them!
189. Copyright (c) 2001 - Oracle Corporation UK Limited
OVN
Picture this senario…
User A queries a person row within the
application.
User B queries back the same row within the
application.
User B then makes a change to the row and
commits it back to the database.
User A then makes a change and tries to commit
it back.
190. Copyright (c) 2001 - Oracle Corporation UK Limited
OVN
What happens ?
Hopefully, User A’s transaction will fail with an
error similar to…
– “Record has been changed by another user. Please
requery to see changes”
How is this done ???
Through the use of
OBJECT_VERSION_NUMBER
191. Copyright (c) 2001 - Oracle Corporation UK Limited
OVN
Object_version_number is a system-
generated version of the row
Increments by one with each update
SQL> select effective_start_date, object_version_number from per_all_people_f
where person_id = 130
SQL> /
15-MAR-94 8
17-SEP-96 8
25-FEB-97 11
18-MAR-97 12
26-FEB-98 10
01-MAR-98 13
01-OCT-98 21
198. Copyright (c) 2001 - Oracle Corporation UK Limited
OTA Tables - What we’ll cover
Activities
Events
Resources
Enrolments
199. Copyright (c) 2001 - Oracle Corporation UK Limited
Activities
An educational offering that may improve
qualifications, competencies or experience
An activity definition is made up of a number
of versions
The definition determines whether a version
can run concurrently or not.
200. Copyright (c) 2001 - Oracle Corporation UK Limited
Activity Definition
The definition of an activity is held in
OTA_ACTIVITY_DEFINITIONS
Primary key is ACTIVITY_ID
Foreign key to business group
NAME holds name of activity definition
201. Copyright (c) 2001 - Oracle Corporation UK Limited
Activity Version
Defines the content and nature of a particular
version of an activity
Includes
Objectives
Intended audience
Min and Max number of delegates allowed
Actual and Budgeted costing information
May supersede another version
Validity dates allow for scheduling as an event
202. Copyright (c) 2001 - Oracle Corporation UK Limited
Activity Version
May be categorised
May belong to an external vendor (with
appropriate links into PO system)
Data held in the table
OTA_ACTIVITY_VERSIONS
Primary key is ACTIVITY_VERSION_ID
203. Copyright (c) 2001 - Oracle Corporation UK Limited
Events
Several different types of events
A scheduled event is a specific instance of an
activity version
it allows booking of resources
it allows enrolment of delegates
– with specified enrolment windows prior to event
running
204. Copyright (c) 2001 - Oracle Corporation UK Limited
Events
A session (event) is a unit of time within a
scheduled event
Allows independent booking of resources by
session, e.g.
Mr Jones - Day 1
Mr Smith - Day 2 AM session
Mr Pink - Day 2 PM session etc
An event can be made up of any number of
sessions
205. Copyright (c) 2001 - Oracle Corporation UK Limited
Events
A development event enables the scheduling of
employee time and resources
Enables the recording of time taken to develop
new training events or the updating of existing
events
206. Copyright (c) 2001 - Oracle Corporation UK Limited
Events
A program is a group of events scheduled
together
Delegates can enrol on a program enabling them
to attend some or all of the program events.
A one-time event is a one-off, Ad Hoc event for
which there is no corresponding Activity
definition or version.
207. Copyright (c) 2001 - Oracle Corporation UK Limited
Events
Events are held in the table OTA_EVENTS
Primary key EVENT_ID
TITLE holds the unique name for this specific
event
EVENT_TYPE indicates the type of the event
maps to ‘TRAINING_EVENT_TYPE’ lookup
208. Copyright (c) 2001 - Oracle Corporation UK Limited
Events
Additional items of interest on events
– Event start & end dates
– Event start & end times (usefull for sessions)
– Duration
– Enrolment start & end dates
Also has items that override the activity:
– Minimum attendees
– Maximum attendees
209. Copyright (c) 2001 - Oracle Corporation UK Limited
Resources
A resource is any facility, person or item of
equipment needed for a training course
Resources can be People
Trainers, Reviewers etc
Resources can be equipment
OHP’s, BARCO’s, Pencils etc
Resources can be facilities
Training rooms, Conference halls etc
210. Copyright (c) 2001 - Oracle Corporation UK Limited
Resources
Resources are defined by three components
1) Resource Type
Type of resource e.g Venue, Trainer
2) Resource Definition
A specific definition of a resource type
3) A Suppliable Resource
A specific instance of a resource that can be booked
to an event
211. Copyright (c) 2001 - Oracle Corporation UK Limited
Resource Types
There are 2 predefined resource types
– Venue
– Trainer
You can add additional resource types to suit
your needs
Resource types are held as a Lookup
Lookup_type = RESOURCE_TYPE
212. Copyright (c) 2001 - Oracle Corporation UK Limited
Resource Definitions
A resource definition is a Keyflexfield structure
(Training Resource).
Up to 30 segments of information available
The name of the structure must be the same as
the name of the resource type
Data is held in table
OTA_RESOURCE_DEFINITIONS
Primary key RESOURCE_DEFINITION_ID
213. Copyright (c) 2001 - Oracle Corporation UK Limited
Resource definitions structure
Structure definition held in
FND_ID_FLEX_STRUCTURES
– Primary key ID_FLEX_NUM, ID_FLEX_CODE
ID_FLEX_CODE = ‘RES’ for bank details
Structure Segment definitions held in
FND_ID_FLEX_SEGMENTS
– Same primary key as structure table
214. Copyright (c) 2001 - Oracle Corporation UK Limited
Definition structure examples
SQL> select id_flex_code, id_flex_num, id_flex_structure_name
2 from fnd_id_flex_structures_tl
3 where application_id = 810
4
SQL> /
RES 101 Trainer
RES 50132 Venue
RES 50133 Books
RES 50134 Videos
RES 50135 Others
RES 51018 PC
215. Copyright (c) 2001 - Oracle Corporation UK Limited
Definition structure examples
50132 50133 50134 101
SEGMENT1 Name Name
SEGMENT2 Center Title
SEGMENT3 Title License Type
SEGMENT4 Layout Publisher
SEGMENT5 Last
reviewed
SEGMENT6 Facilities Price Duration
SEGMENT7 Max Size X-Charge
rate
SEGMENT8 Currency
SEGMENT9 Fire Exits Format Role 1
SEGMENT10
SEGMENT11 Has Powerpoint Role 2
SEGMENT12 Classification
SEGMENT13 Has MSWord Email ID
SEGMENT15 Has Screencam
216. Copyright (c) 2001 - Oracle Corporation UK Limited
Suppliable resources
A ‘suppliable’ resource is an ‘activated’ resource
definition
As a suppliable resource, it can be booked to
events
Data held in OTA_SUPPLIABLE_RESOURCES
Primary key SUPPLIED_RESOURCE_ID
Foreign key back to the resource definition
217. Copyright (c) 2001 - Oracle Corporation UK Limited
Suppliable resources
Additional information can be held on a supplied
resource:
Cost & Cost Unit
Capacity (e.g the capacity of a room)
Lead Time
Supplier reference
Start and End Dates
218. Copyright (c) 2001 - Oracle Corporation UK Limited
Resource uses
Once you have a suppliable resource, it can
be ‘used’ in 2 ways
As a Resource ‘Usage’
As a Resource Booking
219. Copyright (c) 2001 - Oracle Corporation UK Limited
Resource Usages
A resource usage is the requirement for a given
resource for an activity
You can indicate if a resource is a mandatory
requirement for an activity
Data held in OTA_RESOURCE_USAGES
Primary key RESOURCE_USAGE_ID
Foreign key back to suppliable resources
220. Copyright (c) 2001 - Oracle Corporation UK Limited
Resource Bookings
You can book a resource for:
A scheduled Event
A Development Event
A Session
A resource can be booked for:
A range of dates
Specific start & end times (useful if resource is not
required for full duration of an event)
221. Copyright (c) 2001 - Oracle Corporation UK Limited
Resource Bookings
Data held in OTA_RESOURCE_BOOKINGS
Primary key RESOURCE_BOOKING_ID
Foreign key back to suppliable resource
Bookings can have a booking STATUS
e.g PLANNED or CONFIRMED
Resources booked as ‘Planned’ can be double-
booked
222. Copyright (c) 2001 - Oracle Corporation UK Limited
Resource Bookings
A booking has additional information...
Quantity
e.g 24 writing Pads etc
Delegates per unit
e.g 2 delegates per PC
Contact Name and number
e.g contact responsible for resource
Required Dates and times
important if resource is required for additional time
223. Copyright (c) 2001 - Oracle Corporation UK Limited
Enrolments
Enrolments are known as Delegate Bookings
Allows the booking of Internal and External
persons onto an Event, Program, Session
An internal enrolment can be either:
– An individual person enrolment
– A group enrolment, made by a manager
224. Copyright (c) 2001 - Oracle Corporation UK Limited
Enrolments
An enrolment has one of the following statuses:
– Required (as in a provisional booking)
– Waitlisted (a confirmed booking onto a full event)
– Placed (a confirmed booking)
– Cancelled (this booking has been cancelled)
– Attended (successful attendance of this event)
The system is capable of auto-enrolling waitlisted
bookings if places come available
225. Copyright (c) 2001 - Oracle Corporation UK Limited
Enrolments
Enrolments are held in
OTA_DELEGATE_BOOKINGS
– Primary key BOOKING_ID
Foreign keys are:
– to the event (EVENT_ID)
– to a person i.e. employee (delegate_person_id)
229. Introduction
The Custom Library is a mechanism to extend
Oracle Applications without modification of
Oracle Application code.
It is a library of PL/SQL procedures that allows
you to take full advantage of all of the
capabilities of the Oracle Forms Developer suite
of products and integrate your code directly with
Oracle Applications.
230. Introduction
The library is a supported, upgradeable, user
definable, partitioned code repository for custom
code which can be easily ‘decoupled’ for
debugging purposes.
The CUSTOM library allows extensions of
Oracle Applications without modification of
Oracle Applications code. This means that
support is not violated.
232. Introduction
It works in the following way: The standard ‘events
triggers ’ in the Application forms call APPCORE
( Application INTERNAL library) routines, these in turn
call the Custom library. Custom library is a forms library
(it can call PL/SQL programs), that is referenced by the
Oracle Applications on a constant basis. Customising this
program library makes it possible to modify the look and
functionality of the Application.
The custom library (custom.pll) is then
attached/referenced in the Application forms
233. Uses
Zoom
– a mechanism to ‘jump’ from one form to another.
Generic Events
– Change field prompts
Product Specific Events
– Enforce specific business rules
Setting Visual Attributes
– Making mandatory fields red for example
Custom entries for special menus
– Open custom forms
234. Additional uses
Changes form field properties e.g. hiding form fields,
changing colours
Adding field and cross field validation
Changing a default LOV or default where clause
Setting of default values
Update non-enterable fields
Manipulating conditionally required fields
Manipulating mutally exclusive fields
236. Events
Generic
– Common to all forms in Oracle applications
Product-specific HRMS
– WHEN-CREATE-RECORD
– PRE-INSERT
– POST-DELETE
– WHEN-FORM-NAVIGATE
– POST-QUERY
239. CUSTOM.pll - Public Link Library
This library resides in
– $AU_TOP/resource/plsql directory or platform equivalent
The above directory will contain CUSTOM.pll and
CUSTOM.plx (compiled code). Forms always use the
.plx over .pll. If .plx does not exist, then .pll is used.
Using .plx will provide better performance.
Forms Developer needed to modify Custom.pll.
Transfer from client to server in BINARY mode.
Generate the PL/SQL library to create the .plx file.
240. Custom.pll (cont’d)...
Custom code is written within the procedure shells that
are provided. All logic must branch, based on the form
and block for which you want it to run. Custom code can
then take effect based on these events
e.g.
IF (form_name = ‘PERWESEPI’)
AND (block_name = ‘PER’ THEN)
custom code goes here …….
Important - you CANNOT change the specification of the
Custom package.
241. Custom.pll (cont’d …)
You cannot use SQL in the custom library, you may call
server side packages instead.
The custom library is global - shared by all the
Applications.
Document changes, this is vital when using custom
library to ensure that customisations are preserved.
Any custom packages used or called from the custom
library should use the naming convention XXHR or
XX_HR to indicate that this is a non-standard HR code.
247. Datamigration
Components
– Extraction of legacy data
– Loading of data into temporary tables
– Translations/Lookups resolutions
– Wrapper scripts to load data using APIs and/or
Datapump
– Other components could include Workflow,
Portals and Concurrent Manager.
We will only discuss APIs and Datapump in
this course.
251. Introduction
Application Program Interface (API)
Published APIs
Oracle Applications
Internal Code Layers
Custom / Alternative Interface LayerCustom / Alternative Interface Layer
Business Process LayerBusiness Process Layer
Business Support LayerBusiness Support Layer
Row Handler LayerRow Handler Layer
252. Introduction
PL/SQL packages containing procedures and functions
Provide an insulating layer between the user and data-
model
Enable one to capture and execute business rules
Uses
data migration
interfaces
wherever the business rules need to be applied e.g.
bespoke forms , data validation, ….
Guaranteed to maintain the integrity of database
Two types of APIs
Generic
Legislation specific (e.g create_gb_employee).
253. Introduction
Locating more information on APIs:
– $PER_TOP/admin/sql – file with ext. of PKH for header and
PKB for body
– SQL*Plus – describe <API_NAME>
Metalink is a useful source of information:
– Complete list of API see note No. 157505.1
– FAQ see Note No. 130359.1
254. Types of API
There are 3 types of API to perform necessary
business processes :-
CREATE - insert or create new records in
HR/Payroll
UPDATE - amend or update records
DELETE - delete or in some instances end-date
records in HR/Payroll.
256. Parameters
Each API has a number of parameters as with most
PL/SQL code
– Most of the parameters within the HR API suite map onto a
database column (with a prefix of p_ )
– There are additional control parameters
Parameters types:
– IN
– OUT
– IN/OUT
257. Parameters
Not all parameters are necessary but mandatory ones must be
supplied.
OUT parameters must also be catered for by declaration of local
variables to capture the resulting values.
IN/OUT must be included in calling programs (even if not used).
Values are passed via local variables.
Control parameters (ones which will not be used to populate database
columns
– p_validate – TRUE or FALSE
– object_version_number
– effective_start_date & effective_end_date
– datetrack_mode - UPDATE,CORRECTION,UPDATE_OVERRIDE
,UPDATE_CHANGE_INSERT
– language
258. The P_VALIDATE Parameter
This is an important parameter which can have
one of 2 values :-
TRUE
FALSE
TRUE - data is validated but not committed to
the database
FALSE - data is validated and then committed to
the database
259. Flexfield Validation via APIs
Descriptive Flexfields
At the moment there is no automatic validation of flexfield attribute
columns according to the flexfield definitions set up in the Application.
Validation routines should be written to do this.
Skeleton flexfield validation packages are provided to be modified for
use with the APIs. These can be found in the following directory :-
$PER_TOP/admin/sql
If values are entered in the attribute columns of an API then the API will
error. If you do not wish to validate then the skeleton packages can be
amended to cater for this.
260. Flexfield Validation via APIs
Key Flexfields
Please note that there are equivalent skeleton flexfield validation
packages for key flexfields. i.e. pypgpfli.pkb for People Group. However,
these only validate against existing flexfield combinations, and do not allow
creation of new ones.
Could do this using User Hooks !
What a fantastic link !
262. User Hooks
Hooks let you extend the standard business rules
that are executed by the APIs. You can include
your own validation rules or further processing
logic and have them executed automatically
whenever the associated API is executed.
263. User Hooks
Uses of API hooks
- enforcing customer specific validation/business rules
- maintenance of data held in customer specific tables
Types of User Hooks
– BEFORE - executed before the API
– AFTER - executed after API has completed
processing
264. User Hooks
Implementing User Hooks
– Identify APIs and user hooks
– Identify available data
– Implement PL/SQL server-side package Procedure
– Register procedure with user hooks
Register your extra PL/SQL packages with the appropriate
API user hooks by calling the
hr_api_hook_call_api.create_api_hook_call API. Define
the mapping data between the user hook and the server-
side package procedure.
– Execute user hook preprocessor
266. What Coding Standards?
Follow SQL*Plus, PL/SQL coding standards.
Application Naming standards
Development standards
Code should be well commented
Best practice - look at standard APIs
267. Copyright (c) 2001 - Oracle Corporation UK Lim
What is Data Pump?
A mechanism for loading / updating data in to the
Oracle HRMS Application
Uses batch interface tables to store data to be
loaded / updated
All core HRMS Application data manipulation is
done using ‘published’ APIs
User readable values used ( in most cases )
Shields user from complexity of underlying data
structure
Has built in error handling and restartability
268. Copyright (c) 2001 - Oracle Corporation UK Limited
Data Loading Flow
DATADATA
FILE(s)FILE(s)
SQLSQL
LoaderLoader
CustomCustom
Load Table(s)Load Table(s)
CustomCustom
ProgramProgram
Batch Header TableBatch Header Table
Batch Line TableBatch Line Table
Data Pump RoutinesData Pump Routines
hr_pump_utils...hr_pump_utils...
hrdpp_....hrdpp_....
ApplicationApplication
TablesTables
Data PumpData Pump
EngineEngine
269. Copyright (c) 2001 - Oracle Corporation UK Lim
Data Pump Components
A set of tables
“Meta Mapper” component
Data Pump PL/Sql interfaces
A set of views
Data Pump engine
270. Copyright (c) 2001 - Oracle Corporation UK Lim
Meta Mapper
Generates Data Pump ‘meta’ layer views and
procedures ( like an install routine )
Two modes of operation
–Generate meta layer for all supported APIs
HR_PUMP_META_MAPPER.GENERATEALL;
–Generate meta layer for individual API
HR_PUMP_META_MANAGER.GENERATE
(‘HR_EMPLOYEE_API’,
‘CREATE_GB_EMPLOYEE’);
271. Copyright (c) 2001 - Oracle Corporation UK Lim
Data Pump Generated PL/Sql
Interfaces
The meta mapper generates a number of
package procedures for each supported API
–INSERT_BATCH_LINES
e.g. HRDPP_CREATE_GB_EMPLOYEE.INSERT_BATCH_LINES
Select distinct name from all_source
where name like ‘HRDPP%’
272. Copyright (c) 2001 - Oracle Corporation UK Lim
Data Pump Generated PL/Sql
Interfaces
The meta mapper generates a corresponding view
for each meta-mapper package:
– e.g. HRDPV_CREATE_GB_EMPLOYEE
Select view_name from all_views
where view_name like ‘HRDPV%’
Each view gives useful access to
HR_PUMP_BATCH_LINES
You can Insert/Update/Delete through the views
273. Copyright (c) 2001 - Oracle Corporation UK Lim
Data Pump Tables
HR_PUMP_BATCH_HEADERS
BATCH_ID Sequence generated unique Id
BATCH_NAME Unique name for batch
BATCH_STATUS ‘ACTION_STATUS’ lookup
.. ..
.. ..
Tip: Batch Name usefully derived from a File Name/File id
combination (Create a new File Header in a custom table
for each loaded legacy file)
274. Copyright (c) 2001 - Oracle Corporation UK Lim
Data Pump Tables..
HR_PUMP_BATCH_LINES
BATCH_LINE_ID Sequence generated Id
BATCH_ID FK to batch headers table
API_MODULE_ID FK to HR_API_MODULES
LINE_STATUS U / C / E
USER_SEQUENCE Controls processing order
LINK_VALUE Important in parallel loads
PVAL001 Data item field
.. ..
.. ..
PVAL230 Data item field
275. Copyright (c) 2001 - Oracle Corporation UK Lim
Data Pump Tables...
HR_PUMP_BATCH_LINE_USER_KEYS
USER_KEY_ID Sequence generated Id
BATCH_LINE_ID FK to batch lines table
USER_KEY_NAME e.g. ‘PER:000100’, ‘ASG:000100’
UNIQUE_KEY_ID e.g.person_id, assignment_id etc
.. ..
.. ..
• Only populated when rows are loaded into HRMS
• Non-DP loaded entities will not have corresponding user-key
276. Copyright (c) 2001 - Oracle Corporation UK Lim
Data Pump Tables….
HR_PUMP_BATCH_EXCEPTIONS
EXCEPTION_SEQUENCE Sequence generated Id
EXCEPTION_LEVEL ‘MESSAGE_LEVEL’ lookup
SOURCE_ID Either BATCH_ID or
BATCH_LINE_ID
SOURCE_TYPE BATCH_HEADER / BATCH_LINE
EXCEPTION_TEXT Text of exception
.. ..
.. ..
277. Copyright (c) 2001 - Oracle Corporation UK Lim
Data Pump Utility PL/Sql Routines
Create batch header
–HR_PUMP_UTILS.CREATE_BATCH_HEADER
View meta mapper generated views and
PL/Sql routines
–HR_PUMP_META_MAPPER.HELP
(<API Package Name>,
<Procedure Name>);
e.g.HR_PUMP_META_MAPPER.HELP
(‘hr_employee_api’,
‘create_gb_employee’);
278. Copyright (c) 2001 - Oracle Corporation UK Lim
Current Data Pump Limitations
Not all currently published APIs are
supported
Care must be taken when purging Data
Pump tables
Does not support already loaded systems
( issue with user key table )
279. Copyright (c) 2001 - Oracle Corporation UK Lim
Data Pump Workshop
Load data from data_pump_emp_ld table
– exec data_pump_emp_pk.create_emp(‘USERx’,‘Ux’);
– x identifies your user number e.g. ‘U1’ etc
select batch_id, batch_name from hr_pump_batch_headers;
select batch_id, line_status, p_employee_number, p_last_name from
hrdpv_create_gb_employee;
Submit ‘Data Pump Engine’ with ‘batch name’ & ‘Yes’ to validate
Check line_status for change from ‘U’ to ‘C’ or ‘E’
– No errors? re-submit the batch with ‘No’ to validate
Check hr_pump_batch_errors
– What do I do with my errors?
280. Copyright (c) 2001 - Oracle Corporation UK Lim
HRMS Data Pump Reference
White Paper: Metalink Note 223938
284. Copyright (c) 2001 - Oracle Corporation UK Limited
Table and View Name Examples
PER_ALL_PEOPLE_F
– Unrestricted base datetracked table (view all)
PER_PEOPLE_F
– Secure view of person table
PER_PEOPLE
– Secure view of person table at session date
PER_PEOPLE_X
– Secure view of person table at system date
PER_ALL_PEOPLE
– Unrestricted view of person table at session date
285. Copyright (c) 2001 - Oracle Corporation UK Limited
Secure View Clauses
SELECT ....
--
FROM PER_ALL_PEOPLE_F PAP
--
WHERE DECODE(HR_SECURITY.VIEW_ALL,'Y','TRUE'
,HR_SECURITY.SHOW_RECORD('PER_ALL_PEOPLE_F'
,PAP.PERSON_ID
,PAP.PERSON_TYPE_ID
,PAP.EMPLOYEE_NUMBER
,PAP.APPLICANT_NUMBER
)) ='TRUE'
AND decode(hr_general.get_xbg_profile,'Y', pap.business_group_id
,hr_general.get_business_group_id) = pap.business_group_id
PER_PEOPLE_F
286. Copyright (c) 2001 - Oracle Corporation UK Limited
Secure View Clauses
SELECT ....
--
FROM PER_PEOPLE_F
--
WHERE TRUNC(SYSDATE) BETWEEN EFFECTIVE_START_DATE AND
EFFECTIVE_END_DATE
PER_PEOPLE_X
287. Copyright (c) 2001 - Oracle Corporation UK Limited
Secure View Clauses
SELECT ....
--
FROM PER_PEOPLE_F
--
WHERE EFFECTIVE_START_DATE <=
(SELECT SS.EFFECTIVE_DATE
FROM FND_SESSIONS SS
WHERE SS.SESSION_ID = USERENV('sessionid'))
AND EFFECTIVE_END_DATE >=
(SELECT SE.EFFECTIVE_DATE
FROM FND_SESSIONS SE
WHERE SE.SESSION_ID = USERENV('sessionid'))
PER_PEOPLE
288. Copyright (c) 2001 - Oracle Corporation UK Limited
Security Profiles
Restrict user access to a subset of people
Linked to a Business Group
Utilise Org and Position Hierarchies
Utilise Payroll definitions
289. Copyright (c) 2001 - Oracle Corporation UK Limited
A Security Scenario
Restrict user access to only those employees that are
assigned to a named payroll (HRTech Payroll)
The main steps are:
– Create a Security Profile for the payroll ‘HRTech Payroll’
– Create a Responsibility for this Security Profile
– Assign this Responsibility to Users
291. Copyright (c) 2001 - Oracle Corporation UK Limited
Security List Tables
PER_PERSON_LIST
PER_POSITION_LIST
PER_ORGANIZATION_LIST
PAY_PAYROLL_LIST
PER_PERSON_LIST_CHANGES
All the above tables are refreshed by the running
of LISTGEN (‘Security List Maintenance’)
292. Copyright (c) 2001 - Oracle Corporation UK Limited
Security Example
Create a Security Profile:
– ‘HRTech Payroll’ restricting to the payroll ‘HRTech
Payroll’
Assign to Responsibility :
– ‘HRTech Payroll’ Responsibility
– ‘HR: Security Profile’ profile option
Assign Responsibility to a User
Assign employee to ‘HRTech Payroll’
Run LISTGEN
293. Copyright (c) 2001 - Oracle Corporation UK Limited
select psp.security_profile_name
, ppx.employee_number
, ppx.full_name
, nvl(ppf.payroll_name,'No Payroll') payroll
from per_security_profiles psp
, per_people_x ppx
, per_assignments_x pax
, per_person_list ppl
, pay_payrolls_x ppf
where psp.security_profile_id=ppl.security_profile_id
and ppl.person_id=ppx.person_id
and pax.person_id=ppx.person_id
and pax.payroll_id=ppf.payroll_id (+)
and psp.security_profile_name =‘HRTech Payroll'
Example Query Script
PER_ALL_PEOPLE_F is the DateTracked table that holds personal
information for employees, applicants, ex-employees, ex-applicants,
contacts and other people. The columns START_DATE,
EFFECTIVE_START_DATE and EFFECTIVE_END_DATE are all maintained
by DateTrack. The START_DATE is the date when the first record for
this person was created. The earliest EFFECTIVE_START_DATE for a
person is equal to the START_DATE.
PER_ALL_ASSIGNMENTS_F is the DateTracked table that holds information
about employee assignments. It also holds details of assignments for
which an applicant has applied. The ASSIGNMENT_TYPE is E for an
employee assignment, and A for an applicant assignment. Employees
must have at least one employee assignment at all times in a period of
service, and each assignment must have a unique number. Employees can
have multiple assignments at any time, but there must always be a
designated primary assignment. Applicants must have at least one
applicant assignment throughout their application. Each assignment
has an assignment status that can change over time.
PER_PERIODS_OF_SERVICE holds the period of service, or employment,
information for an employee. This includes the boundary dates for
each period of service. A person may have more than one period of
service, in sequence but they cannot overlap. For example, if the
employee is terminated and is later re-hired there will two periods of
service. Each period of service will have a hire date, DATE_START,
and if terminated a termination date, ACTUAL_TERMINATION_DATE. The
default length of service calculation is the difference between the
DATE_START of the current period of service and the current system
date.
1) UPDATE
---------
a) The current row in the database only has it&apos;s effective_end_date updated
to session effective date minus one day.
b) The updated values are placed on a new row, where effective_start_date
is set to session effective date and effective_end_date to validation
end date.
1) UPDATE
---------
a) The current row in the database only has it&apos;s effective_end_date updated
to session effective date minus one day.
b) The updated values are placed on a new row, where effective_start_date
is set to session effective date and effective_end_date to validation
end date.
6) DELETE
---------
a) Update current row by setting effective_end_date to session effective
date.
b) Delete any rows which exist in the future.
3) UPDATE_OVERRIDE
------------------
a) The current row in the database only has it&apos;s effective_end_date updated
to session effective date minus one day.
b) The updated values are placed on a new row, where effective_start_date
is set to session effective date and effective_end_date to validation
end date.
c) Delete any rows which exist in the future.
4) UPDATE_CHANGE_INSERT
-----------------------
a) The current row in the database only has it&apos;s effective_end_date updated
to session effective date minus one day.
b) The updated values are placed on a new row, where effective_start_date
is set to session effective date and effective_end_date to validation
end date.
7) FUTURE_CHANGE
----------------
a) Update current row by setting effective_end_date to validation end date
(This is either the p_end_date parameter to key_delrec or end of time.)
b) Delete any rows which exist in the future.
8) DELETE_NEXT_CHANGE
---------------------
a) Update current row by setting effective_end_date to validation end date.
(This is either the p_end_date parameter to key_delrec, end of time or
the effective_end_date of the next row.)
b) Delete the next row only.
You can define more than one link for each element but there must be
no overlap between the eligibility criteria for the links. For example,
you could create one link to the combination of grade ’A’ and the job
’Accountant’. However, you could not create one link to grade ’A’ and
a second link to the job ’Accountant’. This would imply that an
accountant on grade A is eligible for the same element twice.
If you have more than one link for an element, you can enter different
default values, qualifying conditions, and costing information for each
eligibility group.
Element Entry Types
-------------------
There are four different Element Entry Types :
- Normal Entries
- Override Entries - These entries are used to completely replace entry values for any entry in the same period with the same Element Type ID and Assignment ID. This is a Non Recurring Entry Type.
- Additional Entries - These entries are nonrecurring instances of a recurring Element Type. Additional Entries can only exist for a single Payroll period and are only permitted if the Element Type to which the entries are linked allows additional entries. Only one Additional Entry can exist for an Element Type within an assignment and a given Payroll period.
- Adjustment Entries - Adustment Entries are divided into 3 categories :
- Additive Adjustments: This type of adjustment allows you to add or subtract monetary amounts from the original amount entered or calculated for the Input Value &apos;Pay Value&apos;.
- Replacement Adjustments: This type of adjustment allows you to replace the original value entered or calculated for the Input Value &apos;Pay Value&apos;.
- Balance Adjustments: Balance Adjustments are treated seperately from Additive and Replacement Adjustments in that they are processed independently of a Payroll Run. The user can choose when to trigger the Adjustment and this automatically produces a set of &apos;Processed&apos; Run Results - i.e. Assignment and Payroll actions are initiated independently of the next payroll run.
Why use APIs
Avoid hard-coding context ids, as these change from Release 11i.
Avoid hard-coding context ids, as these change from Release 11i.