SlideShare a Scribd company logo
SETUP FOR ORACLE TIME AND
LABOR: Processing Payroll through
OTL Entries
Introduction
This document explains the full set up of Oracle Time and Labor that is required
to create a Time card and process it all the way through GL. It also explains the Time
store Deposit API’s. Time store deposit API is a technical way of creating the timecard.
SETUP for OTL: Processing payroll through OTL entries
Payroll processing of the workers that are getting daily wages, is done through Time card
entries from Time and Labor Responsibility.
To enter a Time card we need minimum of one recurring element and n(1..n) number of
non recurring elements.
Time Elements (Non Recurring)
Hours, Rate, Multiple
1. Define Recurring Element
Responsibility: Super HRMS
Navigation: total Compensation-> Basic-> Earnings
Since these employees get paid on the basis of number of hours they worked, we define
the salary basis for these employees as ‘Hourly Basis’
2. Defining Salary Basis
Responsibility: US Super HRMS
Navigation: Total Compensation-> Basic -> Salary Basis
Pay Annualization factor: It indicates the factor, by which when per hour income is
multiplied it gives the annual salary.
Now we attach the recurring element created above to this salary basis.
3. Create Link
Create Link for the element created above so that this element becomes available
for the payroll processing.
Responsibility: US Super HRMS
Navigation: Total compensation -> Basic -> link
4. Create Employee
Create the employee with the salary basis as ‘Hourly Basis’
Define supervisor for this employee
- Define Payroll
- Define GRE under Statuory Tab
- Define salary for this employee:
Remember to define the salary on hourly basis, annual salary will be calculated
automatically.
In this case: 50 *2080 (Pay annualization factor defined while defining element)
is the annual salary
5. Defining four non recurring elements
Time of the wage earners will be charged against these non recurring elements.
Earning elements are classified into three categories:
Earning categories and the lookup defined for them are as follows:
- Earnings : US_EARNINGS
- Supplemental earnings : US_SUPPLEMENTAL_EARNINGS
- Imputed Earnings : US_IMPUTED_EARNINGS
Element1: Regular Hours
Responsibility: US super HRMS
Navigation: Total Compensation-> Basic -> Earnings
Element2: Overtime
Responsibility: US super HRMS
Navigation: Total Compensation-> Basic -> Earnings
Element3: Premium Hours (Something that employee gets above overtime work)
Responsibility: US super HRMS
Navigation: Total Compensation-> Basic -> Earnings
Element4: Hours not Worked
Responsibility: US super HRMS
Navigation: Total Compensation-> Basic -> Earnings
6. Defining Absence Type:
Depending on the type of element, entries are passed to payroll or HRMS or Payroll and
HRMS both.
First three non recurring elements defined above are passed just to payroll.
‘Hours not worked’ is passed to both payroll and HRMS.
To see this in HRMS, we need to define absence type and attach this element to this
absence type.
7. Create Link for non recurring element
In order to use the above created elements for payroll processing we create link
for all the elements:
Define the links for all the elements above and define the input values:
Responsibility: US super HRMS
Navigation: Total Compensation-> Basic -> Links
Define input values as follows:
Overtime: Multiple-1.5
Premium: Multiple- 2
8. Assigning OTL Responsibility
Assigning OTL Responsibility to the User to do further setup for OTL:
Define a security profile
Responsibility: US super HRMS
Navigation: Security -> Assign Security profiles.
9. Defining Alternate Names
Responsibility-> US OTL Application developer
Navigation: Alternate names -> Alternate Name Definition
Otl Oracle Time and Labor
10. Recurring Periods
Number of days or columns appearing in the timecard screen are controlled by
something called as Recurring Period
Responsibility: US OTL Application Developer
Navigation: Recurring Period.
Period Type: Defines the number of columns or number of days
Eg; period type ‘Week’ will define the number of columns as 7
Start Date: It defines which day of week the timecard will start from like Monday
, Tuesday and so on.
As in the example below, 3-feb-2003 falls on Monday, so all the timecards will start from
Monday to Sunday.
11. Define approval periods:
It is required to define what all applications will be using these periods
Responsibility: US OTL Application Developer
Navigation: Approval -> Define Approval Periods
Contingent workers cannot be paid through payroll.
They are paid through purchasing
Human Resource- Absence
Payroll- Hours
Project-Expenditure
12. Defining Time Entry Rules
By Mapping we control the mandatory fields. If time card is for payroll purpose we
enter mapping as ‘BEE Retrieval Process’. This is the standard process. We can also
apply some custom rules.
Responsibility: US OTL Application Developer
Navigation: Time Entry Rules -> Define Time Entry Rules
Creating Custom Controlling Rules using Fast Formulas
Maximum Hours: Cannot work more than that (example cannot work more than 50 hours
in this case)
Reference Period: In a week type of recurring period there can be maximum two weeks
in which the duration can span.
Formula used above is defined in a DFF: OTL Formulas
13. Defining Time Entry Rule Groups
Time entry rule groups are defined to associate all the rules together and define
the outcomes of each rule if it is violated.
Responsibility: US OTL Application developer
Navigation: Time Entry Rules-> define Time Entry Rule Groups
14. Approval Style:
This defines in each application what would be the approval hierarchy. Who is going
to approve the time card of the employee.
In the Example below, in both the responsibilities HR and payroll, immediate supervisor
will approve the timecard.
Responsibility: US OTL Application Developer
Navigation: Approval -> Define Approval Style
15. Creating Preference
After all the above things are defined, its now time to decide how the timecard
will look like, what all validations will be applied on the time card.
To do this we create Preferences and attach this preference to certain business group or
organization or may be the employee depending on the requirements.
Create Preference
Responsibility: US OTL Application Developer
Navigation: Preferences
We don’t need to disturb the existing preference. We will create our own new custom
preference.
Right Click on the preference tree and select new.
Enter the name of the preference u want to create.
For any timecard to work and function properly there are 9 mandatory preference
attributes that should be defined.
Creating Alternate Names
Right click on the new preference created and select new.
Enter the name as Alternate names.
Select the seeded preference as ‘Self Service Timecard Alternate Name set Defined for a
user’
Now enter the preference values as alternate name defined above.
Approval Periods
Preference: Time Store Approval Periods
Value: Approval period that was defined above.
Recurring Period
Preference: Self service timecard Period for Worker
Value: Recurring period that was defined above.
Application set
Preference: Time Store Application Set
Value: Human Resources and Payroll
Time entry rule group
Preference: Time Store Time Entry Rules
Value: Time entry rule group that was defined above.
Layout
Preference: Self service Timecard, review and confirmation Layout Page
Value: Timecard Layout: Payroll Timecard Layout
Review Layout : Payroll Review Layout
Confirmation layout: payroll confirmation Layout
Notification Layout: patrol notification Layout
Approval Style
Preference: Time Store approval Style
Value: approval style that was defined above
Retrieval Group
Preference: Time Store Retrieval Rule Groups
Value: Human Resources and Payroll retrieval rule group
Allow status edit
Preference: Self Service timecard status that allows user edits
Value: Status allowing Edit: RETRO
Past number of days: 60
Future number of days: 60
No of empty rows
Preference: Self service Number of empty rows on the timecard
Value: Number of empty rows:0
16. Defining where all this preference will be used
This preference can be attached to a business group, Organization or to a person.
Precedence defines which rule will be used for the preference
17. Look of the time card
Responsibility: Employee, self service -> Time Entry
18. Write formula
To calculate regular hours, premium hours, overtime, work not worked amount
on the basis of annual salary
Responsibility: US super HRMS
Navigation: Total Compensation-> Basic -> Write Formula
DEFALULT FOR ASG_HOURLY_SALARY IS 0
DEFAULT FOR Hours is 0
default FOR Multiple IS 0
INPUTS ARE Hours, Multiple
IF Multiple = 0 then
(
PAY=ASG_HOURLY_SALARY* Hours
)
ELSE
(
PAY=ASG_HOURLY_SALARY* Hours*Multiple
)
RETURN PAY
19. Formula result rule
Attaching this formula to all the non recurring elements
Responsibility: US super HRMS
Navigation: Total Compensation-> Basic -> Formula Result
19. Creating Time Card
Responsibility: Employee, self service-> Time Entry
Otl Oracle Time and Labor
20. Approval notification
Since approval rule is set as HR Supervisor , Notification will go to the immediate
supervisor for the timecard approval.
Responsibility; Manage, self service-> FYI
Approved
21. Sending Approved timecard to Payroll
This is done by running the process: Process: Transfer time from OTL to BEE
Responsibility: US OTL Application Developer
22. Batch Created
As a result of the above process a batch gets created with the name supplied for
transaction code in the above process.
Responsibility: US Super Human Resource
Navigation: Mass exchange info-> batch element entry
23. Transfer the Timecard
Still the timecard entry has not reached to payroll, but they are sitting in the
interface(batch) table.
To push these entries to HRMS, in the batch Element Entry screen, click process
to process the records.
Process-> Transfer
24. After transferring the batch entries get created in payroll and HRMS both:
Entries in HRMS:
Absence Details: Employee-> Others->Absence
25. Generating SOE(Statement of Earning) for the period time card is created
Run quick pay to generate SOE(Statement of Earning) for the period u created your time
card.
Navigation: Employee -> Assignment-> Others-> Quickpay
26. Viewing SOE
View result to see the entry in pay slip
27. Payroll Processing: Multiple Employees
Above we processed just one employee by running the quick pay run. In practical
scenario we have to process payroll for n number of employees. For this instead of
processing each employee separately we run the payroll process that processes multiple
employees in one go.
Process Name: Payroll process
Payroll process spawns further sub processes
28. View the Log of payroll process
29. Prepayment
Once the payroll entries are created, payment has to be done. There are various
modes of payment like check, cash etc. So, before doing the payment we group the
employees on the basis of the payment method attached to them. This is done by running
the process Prepayments.
View the detail for each employee from payroll run result
Otl Oracle Time and Labor
30. Check Writer Process
There are various modes of payment. We have different processes defined for
doing different types of payments.
To do the payment by check we need to run the process called Check Writer.
The output of this process will generate the check for each employee whose payment
method was selected as check.
31. 3rd party Check Payment.
If the payment is done by some third party, then run the check writer process with
the payment method as 3rd
party payment method instead of check.
Checks will be generated in the output file of this process.
32. NACHA: Payment method
An output file is generated as a result of this process. This output file is used to
directly credit the amounts in the account numbers specified in the report.
33. NACHA: Flat File Output
34. Process to generate the covering letter.
Above process generates Summary or detailed report based on the ‘Totals Only’
Parameter specified above. If parameter is set to ‘yes’ it generates summary report and if
it is set to ‘No’ then it generates Detail Report.
Summary Report Output
Detail Report Output
35. Run Deposit Process to generate SOE
Unlike check writer process NACHA report does not generate SOE. In order to
generate that we run another process called as Deposit Advice.
Report Output: SOE
36. Associating custom set of book to GL Responsibility
By this point all the processing has been done at the payroll side. Now it is
required to transfer the payroll entries to General Ledger.
For this we create a Set of book. Create a custom responsibility which is derived from the
General Ledger. To attach SOB to GL responsibility, we assign custom SOB created to
the profile option ‘GL set of books’ at responsibility level.
37. Open the GL period.
In order to transfer the payroll entries to GL, We need to open the GL periods in
which payroll transactions are present.
38. Costing
Costing Information for the payroll entries are defined while creating the link of
element. We define credit and debit account.
Report generated after costing
39. Costing Reports
Costing details can be viewed by running the costing Summary and detail reports.
Costing Summary Report
Costing Summary Report Output
Otl Oracle Time and Labor
Costing Detail Report
Costing Detail Report Output
Otl Oracle Time and Labor
40. Transfer to GL
Now the entries can be transferred from payroll to GL by running the transfer to
GL process.
Log of Transfer to GL
41. Journal Import from GL
Payroll journals can be imported by running the journal import.
Output of Journal Import
42. Archival Process
Run Archival Process to view the pay slip in the self service screen.
Process name; External Process archival
43. Viewing Pay slip in Self service screen:
Employee self service screen -> payslip
Otl Oracle Time and Labor
Otl Oracle Time and Labor
Time Store Deposit API
DECLARE
----------------------------------------------------------
-- Constant declarations
----------------------------------------------------------
-- This is the appl_id for OTL, do not change
c_otl_appl_id CONSTANT NUMBER (3) := 809;
c_proj_attr1 CONSTANT VARCHAR2 (7) := 'Task_Id';
c_proj_attr2 CONSTANT VARCHAR2 (10) := 'Project_Id';
c_proj_attr3 CONSTANT VARCHAR2 (16) := 'Expenditure_Type';
c_proj_attr4 CONSTANT VARCHAR2 (19) := 'Expenditure_Comment';
c_proj_attr5 CONSTANT VARCHAR2 (23) := 'SYSTEM_LINKAGE_FUNCTION';
----------------------------------------------------------
-- Variable declarations
----------------------------------------------------------
-- declare the PL/SQL Table that will hold the complete timecard (all the BBs)
l_tbl_timecard_info hxc_self_service_time_deposit.timecard_info;
-- declare the PL/SQL Table that will hold all the attributes
l_tbl_attributes_info hxc_self_service_time_deposit.app_attributes_info;
-- declare the PL/SQL Table that will hold the messages returned by the API
l_tbl_messages hxc_self_service_time_deposit.message_table;
-- person ID that this TC belongs to, Replace with your own
l_person_id per_all_people_f.person_id%TYPE := 9389;
-- Replace with your own IDs
l_task_id VARCHAR2 (3) := '221';
-- (l_project_id is NOT the same as task id, they just happen to have the
-- same ID on our database)
l_project_id VARCHAR2 (3) := '221';
-- Replace with your own values
l_expenditure_type VARCHAR2 (15) := 'Professional';
l_ot_expenditure_type VARCHAR2 (15) := 'Overtime';
l_system_linkage_id VARCHAR2 (15) := 'ST';
l_ot_system_linkage_id VARCHAR2 (15) := 'OT';
-- Will hold TC_ID, returned by the deposit process
l_new_timecard_id NUMBER;
-- Will hold TC ovn, returned by the deposit process
l_new_timecard_ovn NUMBER;
l_message fnd_new_messages.message_text%TYPE;
l_start_time DATE
:= fnd_date.canonical_to_date ('2002/11/11 00:00:00');
l_stop_time DATE
:= fnd_date.canonical_to_date ('2002/11/17 23:59:59');
l_tc_bb_id hxc_time_building_blocks.time_building_block_id%TYPE;
l_day_bb_id hxc_time_building_blocks.time_building_block_id%TYPE;
l_detail_bb_id hxc_time_building_blocks.time_building_block_id%TYPE;
l_time_attribute_id hxc_time_attributes.time_attribute_id%TYPE;
BEGIN
-- First initialize your session, this needs to be done for internal reasons
so
-- the TimeStore knows who is trying to deposit the information. When you log
-- into SS, the same is done for you by the framework, here however we have to
do
-- it manually.
FND_GLOBAL.APPS_INITIALIZE( user_id => 12345 -– Replace with your own ID
,resp_id => 56789 -– Replace with your own ID
,resp_appl_id => 809 );-- This is the appl_id for OTL, do not change
----------------------------------------------------------
-- PART 1: POPULATE TABLES --
----------------------------------------------------------
-- First populate the timecard PL/SQL table:
----------------------------------------------------------
-- Start with the TIMECARD BB
----------------------------------------------------------
hxc_timestore_deposit.create_timecard_bb (
p_start_time=> l_start_time,
p_stop_time=> l_stop_time,
p_resource_id=> l_person_id,
p_comment_text=> 'Created using API: Weekly Project TC',
p_app_blocks=> l_tbl_timecard_info,
p_time_building_block_id=> l_tc_bb_id
);
-- Now we create the DAY BB, 7 in total, and since they are all the same we
-- will loop 7 times
FOR i_day IN 0 .. 6
LOOP
hxc_timestore_deposit.create_day_bb (
p_day => TRUNC (l_start_time)
+ i_day,
p_parent_building_block_id=> l_tc_bb_id, -- returned by create_timecard_bb
p_comment_text=> 'Created using API',
p_app_blocks=> l_tbl_timecard_info,
p_time_building_block_id=> l_day_bb_id
);
-- The next call would also work but we choose to use the first one
-- since we know the TIMECARD's Id. If you do not know the ID you should
-- use this next call commented out here.
/* hxc_timestore_deposit.create_day_bb (
p_day => TRUNC (l_start_time)
+ i_day,
p_resource_id=> l_person_id,
p_comment_text=> 'Created using API',
p_app_blocks=> l_tbl_timecard_info,
p_time_building_block_id=> l_day_bb_id
); */
-- We can attach the DETAIL BB for every DAY BB that represents 'normal'
-- work hours as well here as they are all the same
-- We only need to do this for weekdays though
IF i_day < 5
THEN
hxc_timestore_deposit.create_detail_bb (
p_type=> 'MEASURE',
p_measure=> 8,
p_parent_building_block_id=> l_day_bb_id,
p_comment_text=> 'Created using API: NT',
p_app_blocks=> l_tbl_timecard_info,
p_app_attributes=> l_tbl_attributes_info,
p_time_building_block_id=> l_detail_bb_id
);
-- The next call would also work but we choose to use the first one
-- since we know the DAY's Id. If you do not know the ID you should
-- use this next call commented out here. In fact we use it ourselves
-- later to add the overtime.
/* hxc_timestore_deposit.create_time_entry (
p_measure=> 8,
p_day => TRUNC (l_start_time)
+ i_day,
p_resource_id=> l_person_id,
p_comment_text=> 'Created using API: NT',
p_app_blocks=> l_tbl_timecard_info,
p_app_attributes=> l_tbl_attributes_info,
p_time_building_block_id=> l_detail_bb_id
); */
-- We can also attach the attributes to every BB that represent
-- 'normal' work hours
-- Attribute1
hxc_timestore_deposit.create_attribute (
p_building_block_id=> l_detail_bb_id,
p_attribute_name=> c_proj_attr1,
p_attribute_value=> l_task_id,
p_app_attributes=> l_tbl_attributes_info
);
-- Attribute2
hxc_timestore_deposit.create_attribute (
p_building_block_id=> l_detail_bb_id,
p_attribute_name=> c_proj_attr2,
p_attribute_value=> l_project_id,
p_app_attributes=> l_tbl_attributes_info
);
-- Attribute3
hxc_timestore_deposit.create_attribute (
p_building_block_id=> l_detail_bb_id,
p_attribute_name=> c_proj_attr3,
p_attribute_value=> l_expenditure_type,
p_app_attributes=> l_tbl_attributes_info
);
-- Attribute4
hxc_timestore_deposit.create_attribute (
p_building_block_id=> l_detail_bb_id,
p_attribute_name=> c_proj_attr4,
p_attribute_value=> 'Expenditure Comment created by API',
p_app_attributes=> l_tbl_attributes_info
);
-- Attribute5
hxc_timestore_deposit.create_attribute (
p_building_block_id=> l_detail_bb_id,
p_attribute_name=> c_proj_attr5,
p_attribute_value=> l_system_linkage_id,
p_app_attributes=> l_tbl_attributes_info
);
END IF; -- Only for weekdays
END LOOP; -- End creating normal working days + time
-- And now we add the Overtime to Tuesday and Wednesday
-- We have to use create_time_entry here because we do not have the ID
-- for the Wednesday TBB anymore, using create_time_entry we do not need it
-- Tuesday
hxc_timestore_deposit.create_time_entry (
p_measure=> 1,
p_day => TRUNC (l_start_time)
+ 1,
p_resource_id=> l_person_id,
p_comment_text=> 'Created using API: OT',
p_app_blocks=> l_tbl_timecard_info,
p_app_attributes=> l_tbl_attributes_info,
p_time_building_block_id=> l_detail_bb_id
);
-- Attribute1
hxc_timestore_deposit.create_attribute (
p_building_block_id=> l_detail_bb_id,
p_attribute_name=> c_proj_attr1,
p_attribute_value=> l_task_id,
p_app_attributes=> l_tbl_attributes_info
);
-- Attribute2
hxc_timestore_deposit.create_attribute (
p_building_block_id=> l_detail_bb_id,
p_attribute_name=> c_proj_attr2,
p_attribute_value=> l_project_id,
p_app_attributes=> l_tbl_attributes_info
);
-- Attribute3
hxc_timestore_deposit.create_attribute (
p_building_block_id=> l_detail_bb_id,
p_attribute_name=> c_proj_attr3,
p_attribute_value=> l_ot_expenditure_type,
p_app_attributes=> l_tbl_attributes_info
);
-- Attribute4
hxc_timestore_deposit.create_attribute (
p_building_block_id=> l_detail_bb_id,
p_attribute_name=> c_proj_attr4,
p_attribute_value=> 'Expenditure Comment created by API',
p_app_attributes=> l_tbl_attributes_info
);
-- Attribute5
hxc_timestore_deposit.create_attribute (
p_building_block_id=> l_detail_bb_id,
p_attribute_name=> c_proj_attr5,
p_attribute_value=> l_ot_system_linkage_id,
p_app_attributes=> l_tbl_attributes_info
);
-- Wednesday
hxc_timestore_deposit.create_time_entry (
p_measure=> 2,
p_day => TRUNC (l_start_time)
+ 2,
p_resource_id=> l_person_id,
p_comment_text=> 'Created using API: OT',
p_app_blocks=> l_tbl_timecard_info,
p_app_attributes=> l_tbl_attributes_info,
p_time_building_block_id=> l_detail_bb_id
);
-- Attribute1
hxc_timestore_deposit.create_attribute (
p_building_block_id=> l_detail_bb_id,
p_attribute_name=> c_proj_attr1,
p_attribute_value=> l_task_id,
p_app_attributes=> l_tbl_attributes_info
);
-- Attribute2
hxc_timestore_deposit.create_attribute (
p_building_block_id=> l_detail_bb_id,
p_attribute_name=> c_proj_attr2,
p_attribute_value=> l_project_id,
p_app_attributes=> l_tbl_attributes_info
);
-- Attribute3
hxc_timestore_deposit.create_attribute (
p_building_block_id=> l_detail_bb_id,
p_attribute_name=> c_proj_attr3,
p_attribute_value=> l_ot_expenditure_type,
p_app_attributes=> l_tbl_attributes_info
);
-- Attribute4
hxc_timestore_deposit.create_attribute (
p_building_block_id=> l_detail_bb_id,
p_attribute_name=> c_proj_attr4,
p_attribute_value=> 'Expenditure Comment created by API',
p_app_attributes=> l_tbl_attributes_info
);
-- Attribute5
hxc_timestore_deposit.create_attribute (
p_building_block_id=> l_detail_bb_id,
p_attribute_name=> c_proj_attr5,
p_attribute_value=> l_ot_system_linkage_id,
p_app_attributes=> l_tbl_attributes_info
);
----------------------------------------------------------
-- END OF PART 1: POPULATE TABLES --
----------------------------------------------------------
----------------------------------------------------------
-- PART 2: DEPOSIT TIMECARD --
----------------------------------------------------------
-- Now we call the deposit process, passing in the PL/SQL tables we just
-- created and populated
hxc_timestore_deposit.execute_deposit_process (
p_validate=> FALSE,
p_app_blocks=> l_tbl_timecard_info,
p_app_attributes=> l_tbl_attributes_info,
p_messages=> l_tbl_messages,
p_mode=> 'SUBMIT',
p_deposit_process=> 'OTL Deposit Process',
p_timecard_id=> l_new_timecard_id,
p_timecard_ovn=> l_new_timecard_ovn
);
----------------------------------------------------------
-- END OF PART 2: DEPOSIT TIMECARD --
----------------------------------------------------------
END;

More Related Content

DOC
Oracle ebs otl setup document
PPT
Payroll process oracle hrms
PPTX
Payroll process in oracle hrms
PDF
Oracle EBS Self service from A to Z
DOC
How to create payslip through self service
DOC
Oracle EBS R12 Self service user manual
DOC
Oracle HRMS Accrual plan Setup
DOC
Oracle EBS R12 Payroll user manual
Oracle ebs otl setup document
Payroll process oracle hrms
Payroll process in oracle hrms
Oracle EBS Self service from A to Z
How to create payslip through self service
Oracle EBS R12 Self service user manual
Oracle HRMS Accrual plan Setup
Oracle EBS R12 Payroll user manual

What's hot (20)

DOCX
Accrual plan set up in oracle hrms
PDF
Oracle EBS HRMS SETUP
DOCX
Oracle EBS R 12 Core hr user manual
RTF
Calendar working days and holidays for Oracle EBS R12 Absence management
PDF
Oracle hrms basic features and functionalities(for R11i and R12)
PPT
Oracle HRMS Payroll Table Overview
DOC
Setup Oracle EBS R12 Performance Management
PPTX
Approval Hierarchy in Oracle Apps
DOC
Training Guide Oracle EBS R12 Performance Management
DOCX
Understanding and using life event checklists in oracle hrms r12
PPT
Oracle Fusion HCM vs E-Business Suite HRMS
PDF
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book
PDF
Query all roles and duties and privileges Oracle Fusion Cloud
PDF
Oracle ame complete setup
DOC
Fujcci crp oracle payroll
DOC
142500146 using-oracle-fast formula-for-payroll-calculations
DOCX
Oracle Fusion HCM Presentation
PDF
Oracle Fusion Cloud Payroll Costing Query
DOCX
Fast formula queries for functions, contexts, db is and packages
PDF
R12.2.4 india localization setup
Accrual plan set up in oracle hrms
Oracle EBS HRMS SETUP
Oracle EBS R 12 Core hr user manual
Calendar working days and holidays for Oracle EBS R12 Absence management
Oracle hrms basic features and functionalities(for R11i and R12)
Oracle HRMS Payroll Table Overview
Setup Oracle EBS R12 Performance Management
Approval Hierarchy in Oracle Apps
Training Guide Oracle EBS R12 Performance Management
Understanding and using life event checklists in oracle hrms r12
Oracle Fusion HCM vs E-Business Suite HRMS
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book
Query all roles and duties and privileges Oracle Fusion Cloud
Oracle ame complete setup
Fujcci crp oracle payroll
142500146 using-oracle-fast formula-for-payroll-calculations
Oracle Fusion HCM Presentation
Oracle Fusion Cloud Payroll Costing Query
Fast formula queries for functions, contexts, db is and packages
R12.2.4 india localization setup
Ad

Similar to Otl Oracle Time and Labor (20)

PDF
Oracle Time and Labor (OTL) Setup for Project
PPTX
Oracle Cloud Time and Labor: Default Payroll Rate, Override Rate and Flat Dol...
PDF
R12.x Oracle Time and Labor Fundamentals.pdf
PPT
Time And Labor Overview
DOCX
Complete config of payroll
PDF
237922323-Payroll-Setups-of-Oracle-HRMS-R12.pdf
PPT
Timecard system refresher training
PPT
vdocuments.mx_oracle-hrms-payroll-setup-ppt.ppt
DOCX
Olatokunbo Ogun Resume
DOCX
Time management confguration
PDF
Hr and payroll
DOCX
Sap payroll schema. functions , rules and operations – an overview
DOCX
If we want to hire an employee from scratch level
DOC
ORACLE APPS_OTL presentation
PPTX
Hamida ali al shabani
PDF
SAP SF Advanced EC Time Management Online Training in Hyderabad - empowerittr...
DOCX
SAP Success factors Advanced Employee Central Online Training Institute in Hy...
PPT
Arul NCOAUG Presentation 25 Feb 2011
PPTX
Oracle Time and Labor
PDF
Sap SuccessFactors employee central time off Online training in Australia
Oracle Time and Labor (OTL) Setup for Project
Oracle Cloud Time and Labor: Default Payroll Rate, Override Rate and Flat Dol...
R12.x Oracle Time and Labor Fundamentals.pdf
Time And Labor Overview
Complete config of payroll
237922323-Payroll-Setups-of-Oracle-HRMS-R12.pdf
Timecard system refresher training
vdocuments.mx_oracle-hrms-payroll-setup-ppt.ppt
Olatokunbo Ogun Resume
Time management confguration
Hr and payroll
Sap payroll schema. functions , rules and operations – an overview
If we want to hire an employee from scratch level
ORACLE APPS_OTL presentation
Hamida ali al shabani
SAP SF Advanced EC Time Management Online Training in Hyderabad - empowerittr...
SAP Success factors Advanced Employee Central Online Training Institute in Hy...
Arul NCOAUG Presentation 25 Feb 2011
Oracle Time and Labor
Sap SuccessFactors employee central time off Online training in Australia
Ad

More from Feras Ahmad (20)

PDF
Oracle Fusion HCM Payroll Process Flow.pdf
DOCX
Configure Flexfield Parameters in Value Sets for Document Records.docx
PPT
Building-Materials
PDF
How to Debug the Fast Formula.pdf
PDF
Oracle Fusion Cloud sensitive data access audit
PDF
Oracle Cloud SQL FTE Positions Query
PDF
Legal Employer Details Query Oracle Fusion Cloud
PDF
Query Pre Payment details Oracle Fusion Cloud
PDF
The Goal with performance details Oracle Fusion Cloud
PDF
All payroll elements with eligibility Oracle Fusion Cloud
PDF
Payroll costing details Oracle Fusion Cloud HCM
PDF
DBI database Items Query Oracle Fusion Cloud
PDF
Query Worker Contracts Details Oracle Fusion Cloud
PDF
Oracle Fusion Cloud HCM Payroll Query
PPTX
Oracle HCM Presentation 2020
PDF
2020 06-11 goverment KSA Summary VAT increase
PPTX
Financial reporting compliance cloud service presentation
DOCX
Absence Work flow query
DOCX
Setting up audits and audit reports Fusion Cloud
PPT
Oracle Fusion HCM Presentation
Oracle Fusion HCM Payroll Process Flow.pdf
Configure Flexfield Parameters in Value Sets for Document Records.docx
Building-Materials
How to Debug the Fast Formula.pdf
Oracle Fusion Cloud sensitive data access audit
Oracle Cloud SQL FTE Positions Query
Legal Employer Details Query Oracle Fusion Cloud
Query Pre Payment details Oracle Fusion Cloud
The Goal with performance details Oracle Fusion Cloud
All payroll elements with eligibility Oracle Fusion Cloud
Payroll costing details Oracle Fusion Cloud HCM
DBI database Items Query Oracle Fusion Cloud
Query Worker Contracts Details Oracle Fusion Cloud
Oracle Fusion Cloud HCM Payroll Query
Oracle HCM Presentation 2020
2020 06-11 goverment KSA Summary VAT increase
Financial reporting compliance cloud service presentation
Absence Work flow query
Setting up audits and audit reports Fusion Cloud
Oracle Fusion HCM Presentation

Recently uploaded (20)

PDF
Encapsulation theory and applications.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Big Data Technologies - Introduction.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Cloud computing and distributed systems.
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Modernizing your data center with Dell and AMD
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
KodekX | Application Modernization Development
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Encapsulation theory and applications.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Empathic Computing: Creating Shared Understanding
Per capita expenditure prediction using model stacking based on satellite ima...
Diabetes mellitus diagnosis method based random forest with bat algorithm
The Rise and Fall of 3GPP – Time for a Sabbatical?
Big Data Technologies - Introduction.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Cloud computing and distributed systems.
Review of recent advances in non-invasive hemoglobin estimation
Digital-Transformation-Roadmap-for-Companies.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Modernizing your data center with Dell and AMD
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
KodekX | Application Modernization Development
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Build a system with the filesystem maintained by OSTree @ COSCUP 2025

Otl Oracle Time and Labor

  • 1. SETUP FOR ORACLE TIME AND LABOR: Processing Payroll through OTL Entries
  • 2. Introduction This document explains the full set up of Oracle Time and Labor that is required to create a Time card and process it all the way through GL. It also explains the Time store Deposit API’s. Time store deposit API is a technical way of creating the timecard. SETUP for OTL: Processing payroll through OTL entries Payroll processing of the workers that are getting daily wages, is done through Time card entries from Time and Labor Responsibility. To enter a Time card we need minimum of one recurring element and n(1..n) number of non recurring elements. Time Elements (Non Recurring) Hours, Rate, Multiple 1. Define Recurring Element Responsibility: Super HRMS Navigation: total Compensation-> Basic-> Earnings Since these employees get paid on the basis of number of hours they worked, we define the salary basis for these employees as ‘Hourly Basis’
  • 3. 2. Defining Salary Basis Responsibility: US Super HRMS Navigation: Total Compensation-> Basic -> Salary Basis Pay Annualization factor: It indicates the factor, by which when per hour income is multiplied it gives the annual salary. Now we attach the recurring element created above to this salary basis. 3. Create Link Create Link for the element created above so that this element becomes available for the payroll processing. Responsibility: US Super HRMS Navigation: Total compensation -> Basic -> link
  • 4. 4. Create Employee Create the employee with the salary basis as ‘Hourly Basis’ Define supervisor for this employee - Define Payroll - Define GRE under Statuory Tab
  • 5. - Define salary for this employee: Remember to define the salary on hourly basis, annual salary will be calculated automatically. In this case: 50 *2080 (Pay annualization factor defined while defining element) is the annual salary
  • 6. 5. Defining four non recurring elements Time of the wage earners will be charged against these non recurring elements. Earning elements are classified into three categories: Earning categories and the lookup defined for them are as follows: - Earnings : US_EARNINGS - Supplemental earnings : US_SUPPLEMENTAL_EARNINGS - Imputed Earnings : US_IMPUTED_EARNINGS Element1: Regular Hours Responsibility: US super HRMS Navigation: Total Compensation-> Basic -> Earnings
  • 7. Element2: Overtime Responsibility: US super HRMS Navigation: Total Compensation-> Basic -> Earnings
  • 8. Element3: Premium Hours (Something that employee gets above overtime work) Responsibility: US super HRMS Navigation: Total Compensation-> Basic -> Earnings
  • 9. Element4: Hours not Worked Responsibility: US super HRMS Navigation: Total Compensation-> Basic -> Earnings
  • 10. 6. Defining Absence Type: Depending on the type of element, entries are passed to payroll or HRMS or Payroll and HRMS both. First three non recurring elements defined above are passed just to payroll. ‘Hours not worked’ is passed to both payroll and HRMS. To see this in HRMS, we need to define absence type and attach this element to this absence type. 7. Create Link for non recurring element In order to use the above created elements for payroll processing we create link for all the elements: Define the links for all the elements above and define the input values: Responsibility: US super HRMS Navigation: Total Compensation-> Basic -> Links Define input values as follows: Overtime: Multiple-1.5
  • 11. Premium: Multiple- 2 8. Assigning OTL Responsibility Assigning OTL Responsibility to the User to do further setup for OTL: Define a security profile Responsibility: US super HRMS Navigation: Security -> Assign Security profiles. 9. Defining Alternate Names Responsibility-> US OTL Application developer Navigation: Alternate names -> Alternate Name Definition
  • 13. 10. Recurring Periods Number of days or columns appearing in the timecard screen are controlled by something called as Recurring Period Responsibility: US OTL Application Developer Navigation: Recurring Period. Period Type: Defines the number of columns or number of days Eg; period type ‘Week’ will define the number of columns as 7 Start Date: It defines which day of week the timecard will start from like Monday , Tuesday and so on. As in the example below, 3-feb-2003 falls on Monday, so all the timecards will start from Monday to Sunday.
  • 14. 11. Define approval periods: It is required to define what all applications will be using these periods Responsibility: US OTL Application Developer Navigation: Approval -> Define Approval Periods Contingent workers cannot be paid through payroll. They are paid through purchasing Human Resource- Absence Payroll- Hours Project-Expenditure
  • 15. 12. Defining Time Entry Rules By Mapping we control the mandatory fields. If time card is for payroll purpose we enter mapping as ‘BEE Retrieval Process’. This is the standard process. We can also apply some custom rules. Responsibility: US OTL Application Developer Navigation: Time Entry Rules -> Define Time Entry Rules
  • 16. Creating Custom Controlling Rules using Fast Formulas Maximum Hours: Cannot work more than that (example cannot work more than 50 hours in this case) Reference Period: In a week type of recurring period there can be maximum two weeks in which the duration can span.
  • 17. Formula used above is defined in a DFF: OTL Formulas
  • 18. 13. Defining Time Entry Rule Groups Time entry rule groups are defined to associate all the rules together and define the outcomes of each rule if it is violated. Responsibility: US OTL Application developer Navigation: Time Entry Rules-> define Time Entry Rule Groups 14. Approval Style: This defines in each application what would be the approval hierarchy. Who is going to approve the time card of the employee. In the Example below, in both the responsibilities HR and payroll, immediate supervisor will approve the timecard. Responsibility: US OTL Application Developer Navigation: Approval -> Define Approval Style
  • 19. 15. Creating Preference After all the above things are defined, its now time to decide how the timecard will look like, what all validations will be applied on the time card. To do this we create Preferences and attach this preference to certain business group or organization or may be the employee depending on the requirements. Create Preference Responsibility: US OTL Application Developer Navigation: Preferences We don’t need to disturb the existing preference. We will create our own new custom preference. Right Click on the preference tree and select new. Enter the name of the preference u want to create.
  • 20. For any timecard to work and function properly there are 9 mandatory preference attributes that should be defined. Creating Alternate Names Right click on the new preference created and select new. Enter the name as Alternate names. Select the seeded preference as ‘Self Service Timecard Alternate Name set Defined for a user’
  • 21. Now enter the preference values as alternate name defined above.
  • 22. Approval Periods Preference: Time Store Approval Periods Value: Approval period that was defined above. Recurring Period Preference: Self service timecard Period for Worker Value: Recurring period that was defined above.
  • 23. Application set Preference: Time Store Application Set Value: Human Resources and Payroll
  • 24. Time entry rule group Preference: Time Store Time Entry Rules Value: Time entry rule group that was defined above.
  • 25. Layout Preference: Self service Timecard, review and confirmation Layout Page Value: Timecard Layout: Payroll Timecard Layout Review Layout : Payroll Review Layout Confirmation layout: payroll confirmation Layout Notification Layout: patrol notification Layout
  • 26. Approval Style Preference: Time Store approval Style Value: approval style that was defined above
  • 27. Retrieval Group Preference: Time Store Retrieval Rule Groups Value: Human Resources and Payroll retrieval rule group
  • 28. Allow status edit Preference: Self Service timecard status that allows user edits Value: Status allowing Edit: RETRO Past number of days: 60 Future number of days: 60
  • 29. No of empty rows Preference: Self service Number of empty rows on the timecard Value: Number of empty rows:0
  • 30. 16. Defining where all this preference will be used This preference can be attached to a business group, Organization or to a person. Precedence defines which rule will be used for the preference
  • 31. 17. Look of the time card Responsibility: Employee, self service -> Time Entry
  • 32. 18. Write formula To calculate regular hours, premium hours, overtime, work not worked amount on the basis of annual salary Responsibility: US super HRMS Navigation: Total Compensation-> Basic -> Write Formula
  • 33. DEFALULT FOR ASG_HOURLY_SALARY IS 0 DEFAULT FOR Hours is 0 default FOR Multiple IS 0 INPUTS ARE Hours, Multiple IF Multiple = 0 then ( PAY=ASG_HOURLY_SALARY* Hours ) ELSE ( PAY=ASG_HOURLY_SALARY* Hours*Multiple ) RETURN PAY 19. Formula result rule Attaching this formula to all the non recurring elements Responsibility: US super HRMS Navigation: Total Compensation-> Basic -> Formula Result
  • 34. 19. Creating Time Card Responsibility: Employee, self service-> Time Entry
  • 36. 20. Approval notification Since approval rule is set as HR Supervisor , Notification will go to the immediate supervisor for the timecard approval. Responsibility; Manage, self service-> FYI
  • 38. 21. Sending Approved timecard to Payroll This is done by running the process: Process: Transfer time from OTL to BEE Responsibility: US OTL Application Developer
  • 39. 22. Batch Created As a result of the above process a batch gets created with the name supplied for transaction code in the above process. Responsibility: US Super Human Resource Navigation: Mass exchange info-> batch element entry
  • 40. 23. Transfer the Timecard Still the timecard entry has not reached to payroll, but they are sitting in the interface(batch) table. To push these entries to HRMS, in the batch Element Entry screen, click process to process the records. Process-> Transfer
  • 41. 24. After transferring the batch entries get created in payroll and HRMS both: Entries in HRMS: Absence Details: Employee-> Others->Absence
  • 42. 25. Generating SOE(Statement of Earning) for the period time card is created Run quick pay to generate SOE(Statement of Earning) for the period u created your time card. Navigation: Employee -> Assignment-> Others-> Quickpay
  • 43. 26. Viewing SOE View result to see the entry in pay slip
  • 44. 27. Payroll Processing: Multiple Employees Above we processed just one employee by running the quick pay run. In practical scenario we have to process payroll for n number of employees. For this instead of processing each employee separately we run the payroll process that processes multiple employees in one go. Process Name: Payroll process Payroll process spawns further sub processes
  • 45. 28. View the Log of payroll process 29. Prepayment
  • 46. Once the payroll entries are created, payment has to be done. There are various modes of payment like check, cash etc. So, before doing the payment we group the employees on the basis of the payment method attached to them. This is done by running the process Prepayments. View the detail for each employee from payroll run result
  • 48. 30. Check Writer Process There are various modes of payment. We have different processes defined for doing different types of payments. To do the payment by check we need to run the process called Check Writer. The output of this process will generate the check for each employee whose payment method was selected as check. 31. 3rd party Check Payment. If the payment is done by some third party, then run the check writer process with the payment method as 3rd party payment method instead of check.
  • 49. Checks will be generated in the output file of this process. 32. NACHA: Payment method
  • 50. An output file is generated as a result of this process. This output file is used to directly credit the amounts in the account numbers specified in the report. 33. NACHA: Flat File Output
  • 51. 34. Process to generate the covering letter.
  • 52. Above process generates Summary or detailed report based on the ‘Totals Only’ Parameter specified above. If parameter is set to ‘yes’ it generates summary report and if it is set to ‘No’ then it generates Detail Report. Summary Report Output
  • 54. 35. Run Deposit Process to generate SOE Unlike check writer process NACHA report does not generate SOE. In order to generate that we run another process called as Deposit Advice.
  • 56. 36. Associating custom set of book to GL Responsibility By this point all the processing has been done at the payroll side. Now it is required to transfer the payroll entries to General Ledger. For this we create a Set of book. Create a custom responsibility which is derived from the General Ledger. To attach SOB to GL responsibility, we assign custom SOB created to the profile option ‘GL set of books’ at responsibility level. 37. Open the GL period. In order to transfer the payroll entries to GL, We need to open the GL periods in which payroll transactions are present.
  • 57. 38. Costing Costing Information for the payroll entries are defined while creating the link of element. We define credit and debit account.
  • 59. 39. Costing Reports Costing details can be viewed by running the costing Summary and detail reports. Costing Summary Report
  • 62. Costing Detail Report Costing Detail Report Output
  • 64. 40. Transfer to GL Now the entries can be transferred from payroll to GL by running the transfer to GL process.
  • 66. 41. Journal Import from GL Payroll journals can be imported by running the journal import.
  • 68. 42. Archival Process Run Archival Process to view the pay slip in the self service screen. Process name; External Process archival
  • 69. 43. Viewing Pay slip in Self service screen: Employee self service screen -> payslip
  • 72. Time Store Deposit API DECLARE ---------------------------------------------------------- -- Constant declarations ---------------------------------------------------------- -- This is the appl_id for OTL, do not change c_otl_appl_id CONSTANT NUMBER (3) := 809; c_proj_attr1 CONSTANT VARCHAR2 (7) := 'Task_Id'; c_proj_attr2 CONSTANT VARCHAR2 (10) := 'Project_Id'; c_proj_attr3 CONSTANT VARCHAR2 (16) := 'Expenditure_Type'; c_proj_attr4 CONSTANT VARCHAR2 (19) := 'Expenditure_Comment'; c_proj_attr5 CONSTANT VARCHAR2 (23) := 'SYSTEM_LINKAGE_FUNCTION'; ---------------------------------------------------------- -- Variable declarations ---------------------------------------------------------- -- declare the PL/SQL Table that will hold the complete timecard (all the BBs) l_tbl_timecard_info hxc_self_service_time_deposit.timecard_info; -- declare the PL/SQL Table that will hold all the attributes l_tbl_attributes_info hxc_self_service_time_deposit.app_attributes_info; -- declare the PL/SQL Table that will hold the messages returned by the API l_tbl_messages hxc_self_service_time_deposit.message_table; -- person ID that this TC belongs to, Replace with your own l_person_id per_all_people_f.person_id%TYPE := 9389; -- Replace with your own IDs l_task_id VARCHAR2 (3) := '221'; -- (l_project_id is NOT the same as task id, they just happen to have the -- same ID on our database) l_project_id VARCHAR2 (3) := '221'; -- Replace with your own values l_expenditure_type VARCHAR2 (15) := 'Professional'; l_ot_expenditure_type VARCHAR2 (15) := 'Overtime'; l_system_linkage_id VARCHAR2 (15) := 'ST'; l_ot_system_linkage_id VARCHAR2 (15) := 'OT'; -- Will hold TC_ID, returned by the deposit process l_new_timecard_id NUMBER; -- Will hold TC ovn, returned by the deposit process l_new_timecard_ovn NUMBER; l_message fnd_new_messages.message_text%TYPE; l_start_time DATE := fnd_date.canonical_to_date ('2002/11/11 00:00:00');
  • 73. l_stop_time DATE := fnd_date.canonical_to_date ('2002/11/17 23:59:59'); l_tc_bb_id hxc_time_building_blocks.time_building_block_id%TYPE; l_day_bb_id hxc_time_building_blocks.time_building_block_id%TYPE; l_detail_bb_id hxc_time_building_blocks.time_building_block_id%TYPE; l_time_attribute_id hxc_time_attributes.time_attribute_id%TYPE; BEGIN -- First initialize your session, this needs to be done for internal reasons so -- the TimeStore knows who is trying to deposit the information. When you log -- into SS, the same is done for you by the framework, here however we have to do -- it manually. FND_GLOBAL.APPS_INITIALIZE( user_id => 12345 -– Replace with your own ID ,resp_id => 56789 -– Replace with your own ID ,resp_appl_id => 809 );-- This is the appl_id for OTL, do not change ---------------------------------------------------------- -- PART 1: POPULATE TABLES -- ---------------------------------------------------------- -- First populate the timecard PL/SQL table: ---------------------------------------------------------- -- Start with the TIMECARD BB ---------------------------------------------------------- hxc_timestore_deposit.create_timecard_bb ( p_start_time=> l_start_time, p_stop_time=> l_stop_time, p_resource_id=> l_person_id, p_comment_text=> 'Created using API: Weekly Project TC', p_app_blocks=> l_tbl_timecard_info, p_time_building_block_id=> l_tc_bb_id ); -- Now we create the DAY BB, 7 in total, and since they are all the same we -- will loop 7 times FOR i_day IN 0 .. 6 LOOP hxc_timestore_deposit.create_day_bb ( p_day => TRUNC (l_start_time) + i_day, p_parent_building_block_id=> l_tc_bb_id, -- returned by create_timecard_bb p_comment_text=> 'Created using API', p_app_blocks=> l_tbl_timecard_info, p_time_building_block_id=> l_day_bb_id ); -- The next call would also work but we choose to use the first one -- since we know the TIMECARD's Id. If you do not know the ID you should -- use this next call commented out here.
  • 74. /* hxc_timestore_deposit.create_day_bb ( p_day => TRUNC (l_start_time) + i_day, p_resource_id=> l_person_id, p_comment_text=> 'Created using API', p_app_blocks=> l_tbl_timecard_info, p_time_building_block_id=> l_day_bb_id ); */ -- We can attach the DETAIL BB for every DAY BB that represents 'normal' -- work hours as well here as they are all the same -- We only need to do this for weekdays though IF i_day < 5 THEN hxc_timestore_deposit.create_detail_bb ( p_type=> 'MEASURE', p_measure=> 8, p_parent_building_block_id=> l_day_bb_id, p_comment_text=> 'Created using API: NT', p_app_blocks=> l_tbl_timecard_info, p_app_attributes=> l_tbl_attributes_info, p_time_building_block_id=> l_detail_bb_id ); -- The next call would also work but we choose to use the first one -- since we know the DAY's Id. If you do not know the ID you should -- use this next call commented out here. In fact we use it ourselves -- later to add the overtime. /* hxc_timestore_deposit.create_time_entry ( p_measure=> 8, p_day => TRUNC (l_start_time) + i_day, p_resource_id=> l_person_id, p_comment_text=> 'Created using API: NT', p_app_blocks=> l_tbl_timecard_info, p_app_attributes=> l_tbl_attributes_info, p_time_building_block_id=> l_detail_bb_id ); */ -- We can also attach the attributes to every BB that represent -- 'normal' work hours -- Attribute1 hxc_timestore_deposit.create_attribute ( p_building_block_id=> l_detail_bb_id, p_attribute_name=> c_proj_attr1, p_attribute_value=> l_task_id, p_app_attributes=> l_tbl_attributes_info ); -- Attribute2 hxc_timestore_deposit.create_attribute ( p_building_block_id=> l_detail_bb_id, p_attribute_name=> c_proj_attr2, p_attribute_value=> l_project_id, p_app_attributes=> l_tbl_attributes_info );
  • 75. -- Attribute3 hxc_timestore_deposit.create_attribute ( p_building_block_id=> l_detail_bb_id, p_attribute_name=> c_proj_attr3, p_attribute_value=> l_expenditure_type, p_app_attributes=> l_tbl_attributes_info ); -- Attribute4 hxc_timestore_deposit.create_attribute ( p_building_block_id=> l_detail_bb_id, p_attribute_name=> c_proj_attr4, p_attribute_value=> 'Expenditure Comment created by API', p_app_attributes=> l_tbl_attributes_info ); -- Attribute5 hxc_timestore_deposit.create_attribute ( p_building_block_id=> l_detail_bb_id, p_attribute_name=> c_proj_attr5, p_attribute_value=> l_system_linkage_id, p_app_attributes=> l_tbl_attributes_info ); END IF; -- Only for weekdays END LOOP; -- End creating normal working days + time -- And now we add the Overtime to Tuesday and Wednesday -- We have to use create_time_entry here because we do not have the ID -- for the Wednesday TBB anymore, using create_time_entry we do not need it -- Tuesday hxc_timestore_deposit.create_time_entry ( p_measure=> 1, p_day => TRUNC (l_start_time) + 1, p_resource_id=> l_person_id, p_comment_text=> 'Created using API: OT', p_app_blocks=> l_tbl_timecard_info, p_app_attributes=> l_tbl_attributes_info, p_time_building_block_id=> l_detail_bb_id ); -- Attribute1 hxc_timestore_deposit.create_attribute ( p_building_block_id=> l_detail_bb_id, p_attribute_name=> c_proj_attr1, p_attribute_value=> l_task_id, p_app_attributes=> l_tbl_attributes_info ); -- Attribute2 hxc_timestore_deposit.create_attribute ( p_building_block_id=> l_detail_bb_id, p_attribute_name=> c_proj_attr2, p_attribute_value=> l_project_id, p_app_attributes=> l_tbl_attributes_info ); -- Attribute3
  • 76. hxc_timestore_deposit.create_attribute ( p_building_block_id=> l_detail_bb_id, p_attribute_name=> c_proj_attr3, p_attribute_value=> l_ot_expenditure_type, p_app_attributes=> l_tbl_attributes_info ); -- Attribute4 hxc_timestore_deposit.create_attribute ( p_building_block_id=> l_detail_bb_id, p_attribute_name=> c_proj_attr4, p_attribute_value=> 'Expenditure Comment created by API', p_app_attributes=> l_tbl_attributes_info ); -- Attribute5 hxc_timestore_deposit.create_attribute ( p_building_block_id=> l_detail_bb_id, p_attribute_name=> c_proj_attr5, p_attribute_value=> l_ot_system_linkage_id, p_app_attributes=> l_tbl_attributes_info ); -- Wednesday hxc_timestore_deposit.create_time_entry ( p_measure=> 2, p_day => TRUNC (l_start_time) + 2, p_resource_id=> l_person_id, p_comment_text=> 'Created using API: OT', p_app_blocks=> l_tbl_timecard_info, p_app_attributes=> l_tbl_attributes_info, p_time_building_block_id=> l_detail_bb_id ); -- Attribute1 hxc_timestore_deposit.create_attribute ( p_building_block_id=> l_detail_bb_id, p_attribute_name=> c_proj_attr1, p_attribute_value=> l_task_id, p_app_attributes=> l_tbl_attributes_info ); -- Attribute2 hxc_timestore_deposit.create_attribute ( p_building_block_id=> l_detail_bb_id, p_attribute_name=> c_proj_attr2, p_attribute_value=> l_project_id, p_app_attributes=> l_tbl_attributes_info ); -- Attribute3 hxc_timestore_deposit.create_attribute ( p_building_block_id=> l_detail_bb_id, p_attribute_name=> c_proj_attr3, p_attribute_value=> l_ot_expenditure_type, p_app_attributes=> l_tbl_attributes_info ); -- Attribute4 hxc_timestore_deposit.create_attribute ( p_building_block_id=> l_detail_bb_id, p_attribute_name=> c_proj_attr4,
  • 77. p_attribute_value=> 'Expenditure Comment created by API', p_app_attributes=> l_tbl_attributes_info ); -- Attribute5 hxc_timestore_deposit.create_attribute ( p_building_block_id=> l_detail_bb_id, p_attribute_name=> c_proj_attr5, p_attribute_value=> l_ot_system_linkage_id, p_app_attributes=> l_tbl_attributes_info ); ---------------------------------------------------------- -- END OF PART 1: POPULATE TABLES -- ---------------------------------------------------------- ---------------------------------------------------------- -- PART 2: DEPOSIT TIMECARD -- ---------------------------------------------------------- -- Now we call the deposit process, passing in the PL/SQL tables we just -- created and populated hxc_timestore_deposit.execute_deposit_process ( p_validate=> FALSE, p_app_blocks=> l_tbl_timecard_info, p_app_attributes=> l_tbl_attributes_info, p_messages=> l_tbl_messages, p_mode=> 'SUBMIT', p_deposit_process=> 'OTL Deposit Process', p_timecard_id=> l_new_timecard_id, p_timecard_ovn=> l_new_timecard_ovn ); ---------------------------------------------------------- -- END OF PART 2: DEPOSIT TIMECARD -- ---------------------------------------------------------- END;