PeopleSoft v9.2 HCM
Human Capital Management
Time & Labor Technical Rules
2
© 2018 – SpearMC Consulting
What are Rules? How do they fit in to Time and Labor?
Rule Types
• Template-Built Rules
• Custom Rules
• User Exit Rules
Related Objects
• Value Lists
• Time Periods and Calendars
• Rule Programs
Agenda
3
© 2018 – SpearMC Consulting
Building Rules
• Identifying Templates
• Building Blocks (Actions, Conditions, SQL Objects)
• Using Time Periods
• Using Temporary Tables
• Using MetaSQL
• Compilation
Technical Issues
• Looking at Time Administration Logs
Agenda – continued
4
© 2018 – SpearMC Consulting
High-Level
5
© 2018 – SpearMC Consulting
Template-Based
Custom
User Exit
Rule Types
6
© 2018 – SpearMC Consulting
Template-Based Rules
• Built from delivered templates
• User supplies variable data
• SQL statements only
Rule Types - continued
7
© 2018 – SpearMC Consulting
Custom Rules
• Built from scratch or customized from template-based rule
• SQL statements only
Rule Types – continued
8
© 2018 – SpearMC Consulting
User Exit Rules
• Most complex type
• Coded directly in App Designer
• Use SQL and PeopleCode
Rule Types – continued
9
© 2018 – SpearMC Consulting
Related Objects
10
© 2018 – SpearMC Consulting
Rule Programs
• Groups of rules
• Run in priority order
• Assigned to Workgroups
Rule Programs
11
© 2018 – SpearMC Consulting
Set up HCM -> Product Related -> Time and Labor -> Rules and Workgroups -> Rule Programs
Rule Programs
12
© 2018 – SpearMC Consulting
Set up HCM -> Product Related -> Time and Labor -> Time Periods -> Weekly
Period ID
13
© 2018 – SpearMC Consulting
Value ListsSet up HCM -> Product Related -> Time and Labor -> Rules and Workgroups -> Value Lists
14
© 2018 – SpearMC Consulting
Contain lists of specific types of data, for example:
• Time Reporting Codes
• Job Codes
• Workgroups
Remove need for hard-coding of lists of values
Value Lists
15
© 2018 – SpearMC Consulting
Set up HCM -> Product Related -> Time and Labor -> Time Periods -> View Period Calendar
Calendars
16
© 2018 – SpearMC Consulting
Set up HCM -> Product Related -> Time and Labor -> Rules and Workgroups -> Workgroups
All Time Reporters are assigned a Workgroup, which in turn determines the Rule Program which is executed.
Workgroups
17
© 2018 – SpearMC Consulting
Set up HCM -> Product Related -> Time and Labor -> Rules and Workgroups -> Template-Based Rules
Template-Based Rule Creation
18
© 2018 – SpearMC Consulting
Sun Mon Tue Wed Thu Fri Sat
Sun Mon Tue Wed Thu Fri Sat
Time Period ensures that the correct number of days are
processed for the rule. For example:
• Calculate Weekly Overtime
• Time Administration processes data from Wednesday
• But we need a whole week to determine overtime
• Using Period ID CCWEEK forces Time Administration to pull in remainder
of week
Using Time Periods
19
© 2018 – SpearMC Consulting
AE Section Name refers to Section of TL_TA_RULES
Maximum of 8 characters
Defaults to Rule Name
Using AE Sections
20
© 2018 – SpearMC Consulting
Set up HCM -> Product Related -> Time and Labor -> Rules and Workgroups -> Template-Based Rules
Template-Based Rule Creation
21
© 2018 – SpearMC Consulting
TRC List refers to a Value List of TRC Codes which are counted
towards overtime
Threshold is the number of hours above which overtime is paid
Action determines whether regular hours are untouched or overtime
is deducted
Template-Based Rules
22
© 2018 – SpearMC Consulting
Custom Rules are made up of
• Actions – single SQL statements (Delete, Update, Insert)
• Conditions (WHERE clauses)
• SQL Objects (SQL Statements)
SQL Objects can be used without Actions or Conditions
Custom Rule Components
23
© 2018 – SpearMC Consulting
Time Administration uses a number of temporary tables delivered by
PeopleSoft
Each run of Time Administration is identified by an Instance Number,
which allows concurrent runs.
These tables are suffixed by the Instance Number. For example,
TL_IPT1 becomes TL_IPT14. The base table TL_IPT1 is never used.
Temporary Tables can be of two types:
• Pre-filled tables containing high-usage data such as Job details. These
improve performance by removing the need to access high-volume tables
such as JOB.
• Empty tables which can be used by the rule developer
Temporary Tables
24
© 2018 – SpearMC Consulting
Temp Tables – Prefilled by Time Admin
TL_PROF_WRKn JOB data
WRK_ADHOC_TAOn Schedule Data
Examples:
The n indicates the Instance Number
DO NOT under any circumstances make any updates to any temporary
tables pre-filled by the Time Administration process.
25
© 2018 – SpearMC Consulting
These tables can be used freely by rule developers.
Examples
• All TL_IPTn tables
• Tables with names starting TL_WRK
Always truncate any temporary tables you use at the start of rule
execution as they may contain data from prior rule executions
(NEVER TRUNCATE TL_IPT1)
All updates must be written to TL_IPT1 before the end of the rule,
otherwise they will not be reflected in Payable Time
Temporary Tables – Available for User
26
© 2018 – SpearMC Consulting
Custom Rule – Basic Information
27
© 2018 – SpearMC Consulting
Set up HCM -> System Administration -> Utilities -> Build Time and Labor Rules -> Actions
Custom Rule – Actions
28
© 2018 – SpearMC Consulting
Set up HCM -> System Administration -> Utilities -> Build Time and Labor Rules -> Actions
Custom Rule – Actions
29
© 2018 – SpearMC Consulting
Set up HCM -> System Administration -> Utilities -> Build Time and Labor Rules -> Conditions
Custom Rule – Conditions
30
© 2018 – SpearMC Consulting
Set up HCM -> System Administration -> Utilities -> Build Time and Labor Rules -> SQL Objects
Custom Rule – SQL Objects
31
© 2018 – SpearMC Consulting
Set up HCM -> System Administration -> Utilities -> Build Time and Labor Rules -> SQL Objects
Custom Rule – SQL Objects
32
© 2018 – SpearMC Consulting
Compilation creates or amends a section in the Application Engine
TL_TA_RULES (more on this later)
Successful compilation does NOT mean the syntax of the rule is
correct
Rule Compilation
33
© 2018 – SpearMC Consulting
Custom Rule – Rule Steps
34
© 2018 – SpearMC Consulting
Type Meaning
Do Select Create a loop using a SELECT statement
Do While Create a WHILE loop
Do When Create a WHEN loop
SQL – Quit If No Rows Do not proceed is no rows found
SQL - Standard Standard SQL Object
AE Actions
Custom Rule – Information
35
© 2018 – SpearMC Consulting
Type Meaning
Action Execute an ACTION object
SQL Object Execute a SQL Object
Truncate Work Table Remove all data from a work table
Update Statistics Update table statistics to improve
performance
Statement Types
Custom Rule – Information
36
© 2018 – SpearMC Consulting
Allow more advanced processing using both SQL and
PeopleCode objects
Use only if the process cannot be accomplished by Template or
Custom rules
Coding is done within App Designer
Sections are added to the TL_TA_RULES app engine
A rule object must be created as for Template and Custom rules
but is only a placeholder
User Exit Rules – Introduction
37
© 2018 – SpearMC Consulting
Enter basic information about the rule as for Custom rules.
Clicking on User Exit removes all the rule steps.
User Exit Rules
38
© 2018 – SpearMC Consulting
In App Designer, open the Application Engine TL_TA_RULES:
User Exit Rules
39
© 2018 – SpearMC Consulting
Use the Insert/Section menu option to create a new Section:
User Exit Rules
40
© 2018 – SpearMC Consulting
Use the Insert/Step/Action menu option to create a new Step:
User Exit Rules
41
© 2018 – SpearMC Consulting
SECTION corresponds to RULE NAME
STEP corresponds to RULE STEP NUMBER
ACTION corresponds to STATEMENT TYPE
SQL Sql Statement
PeopleCode PeopleCode Process
DoSelect Select Loop
DoWhile While Loop
User Exit Rules
42
© 2018 – SpearMC Consulting
Determine the Instance Number. This will tell you which tables to
query
Look for the entries that start TL_TA_RULES
Debugging – Time Administration SQL Log
43
© 2018 – SpearMC Consulting
The code below indicates that the SQL is contained in the
HOLIDAY rule in Step 10
Debugging – Time Administration SQL Log
44
© 2018 – SpearMC Consulting
MetaSQL perform two main functions:
• Faster development
• Database independence
MetaSQL
45
© 2018 – SpearMC Consulting
Examples:
%InsertSelect allows data to be copied from one table to another
%InsertSelect(TL_IPT2, TL_IPT1 A,
TRC=‘ZZZ’)
This statement copies from TL_IPT1 to TL_IPT2 and replaces the TRC
with ‘ZZZ’
%CurrentDateTimeIn = Current Date and Time
A list of MetaSQL elements is at:
https://docs.oracle.com/cd/E80738_01/pt854pbh2/eng/pt/tpcl/langref_M
eta-SQLReference-073bd4.html#topofpage
MetaSQL
This documentation may provide access to or information on content, products, and services from third parties. SpearMC is not responsible for and expressly disclaims all warranties of any kind with respect to third-party content, products, and services. SpearMC will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.
This documentation may contain links to Web sites of other companies or organizations that SpearMC does not own or control. SpearMC neither evaluates nor makes any representations regarding the accessibility of these Web sites.
This documentation may also contain the following: •copyrighted material owned by third parties that has been licensed to SpearMC,•copyrighted material created by third parties that has been assigned to and is now owned by SpearMC, and •trademarks and other intellectual property owned by third parties and licensed to SpearMC.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
© 2018 – SpearMC Consulting
Disclaimers