OTL Setup
OTL Setup
OTL Setup
To enter a Time card we need minimum of one recurring element and n(1..n) number of
non recurring elements.
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
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.
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.
Overtime: Multiple-1.5
Premium: Multiple- 2
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.
Time entry rule groups are defined to associate all the rules together and define
the outcomes of each rule if it is violated.
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.
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
To calculate regular hours, premium hours, overtime, work not worked amount
on the basis of annual salary
IF Multiple = 0 then
(
PAY=ASG_HOURLY_SALARY* Hours
)
ELSE
(
PAY=ASG_HOURLY_SALARY* Hours*Multiple
)
RETURN PAY
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.
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
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.
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
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.
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.
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.
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.
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
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:
-- 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;
-- (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';
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.
----------------------------------------------------------
-- 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
); */
-- 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
);
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;