You are on page 1of 4

Person:

PER_ALL_PEOPLE_F
PER_PERSON_NAMES_F_V
PER_PERSON_TYPES_VL

Person Email,User,Address:
PER_USERS
PER_EMAIL_ADDRESSES_V
PER_PERSON_ADDRESSES_V

Assignment:
PER_ALL_ASSIGNMENTS_F
PER_ALL_ASSIGNMENTS_M
PER_ASSIGNMENT_SUPERVISORS_F_V
PER_ASSIGNMENT_STATUS_TYPES_VL
PER_PERIODS_OF_SERVICE_V

Integration Table: This table is used to get the source system id for each object
like person,assignment,email,work relationship,Work terms etc. This table will have
data when you integrate other system to fusion cloud HCM to load employees into
fusion.

HRC_INTEGRATION_KEY_MAP

Grade,Job,Location,Actions:
HR_ORGANIZATION_UNITS
PER_GRADES_F_VL
PER_JOBS_F_VL
HR_ALL_POSITIONS_F_VL
PER_LOCATION_DETAILS_F_VL
PER_ACTIONS_VL
PER_ACTION_REASONS_VL
PER_ACTION_OCCURRENCES

Query to get Source System Id related to Employee in Fusion HCM Cloud


---------------------------------------------------------------------
#Please change the source system owner for which you want to check data before
running below queries.

Person:
-------
select source_system_id
from fusion.HRC_INTEGRATION_KEY_MAP h
,PER_PERSON_NAMES_F_V P
where 1=1
and h.object_name='Person'
and h.source_system_owner='HRC_SQLLOADER'
and h.surrogate_id=p."PERSON_ID";

PersonName:
-----------
select source_system_id
from fusion.HRC_INTEGRATION_KEY_MAP H
,PER_PERSON_NAMES_F_V P
WHERE 1=1
and h.object_name ='PersonName'
and h.surrogate_id=p.person_name_id
and h.SOURCE_SYSTEM_OWNER ='HRC_SQLLOADER';
Assignment:
-----------
select source_system_id
from fusion.HRC_INTEGRATION_KEY_MAP H
,PER_ALL_ASSIGNMENTS_M PA
where 1=1
and H.object_name='Assignment'
and H.source_system_owner='HRC_SQLLOADER'
and H.surrogate_id=PA."ASSIGNMENT_ID"

Assignment Supervisor:
----------------------
select source_system_id
from fusion.HRC_INTEGRATION_KEY_MAP H
,PER_ASSIGNMENT_SUPERVISORS_F_V PA
,PER_PERSON_NAMES_F_V PER_PERSON_NAMES_F_V
,PER_ALL_ASSIGNMENTS_M PER_ALL_ASSIGNMENTS_M
where 1=1
and H.object_name='AssignmentSupervisor'
and H.source_system_owner='HRC_SQLLOADER'
and H.surrogate_id=pa.assignment_supervisor_id
and pa.person_id="PER_PERSON_NAMES_F_V"."PERSON_ID"
and pa.assignment_id="PER_ALL_ASSIGNMENTS_M"."ASSIGNMENT_ID"

Work Term Assignment


---------------------
select source_system_id
from fusion.HRC_INTEGRATION_KEY_MAP H
,PER_ALL_ASSIGNMENTS_M PER_ALL_ASSIGNMENTS_M
where 1=1
and H.object_name='Assignment'
and H.source_system_owner='HRC_SQLLOADER'
and H.surrogate_id="PER_ALL_ASSIGNMENTS_M".work_terms_assignment_id;

Address:
--------
select source_system_id
from fusion.HRC_INTEGRATION_KEY_MAP H
,PER_PERSON_ADDRESSES_V PER_PERSON_ADDRESSES_V
WHERE 1=1
and h.object_name = 'Address'
and h.surrogate_id=PER_PERSON_ADDRESSES_V.address_id
and h.SOURCE_SYSTEM_OWNER ='HRC_SQLLOADER';

Email Address:
--------------
select H.source_system_id
from fusion.HRC_INTEGRATION_KEY_MAP H
,PER_EMAIL_ADDRESSES_V PER_EMAIL_ADDRESSES_V
,PER_PERSON_NAMES_F_V PER_PERSON_NAMES_F_V
WHERE 1=1
and h.object_name = 'EmailAddress'
and h.SOURCE_SYSTEM_OWNER ='HRC_SQLLOADER'
and h.surrogate_id=PER_EMAIL_ADDRESSES_V.email_address_id
and PER_EMAIL_ADDRESSES_V.PERSON_ID="PER_PERSON_NAMES_F_V"."PERSON_ID"
and TRUNC(SYSDATE) between DATE_FROM and NVL(DATE_TO,SYSDATE+1)

------------------------------------------------------------------------
#Payroll Batch Loader Error Query
select ml.*
from pay_bl_message_lines_vl ml
, pay_batch_lines bl
, pay_batch_headers bh
where bh.batch_id = bl.batch_id
and bl.batch_line_id = ml.source_id
and bh.batch_name = 'BATCH NAME'
and bl.batch_line_status = 'E';

#Full Query for all PBL errors with batch name, task name, task action name,
assignment number and error message

SELECT pbh.batch_name,

pbh.legislative_data_group_id,pbt.display_task_name,pbta.display_task_action_name,
pivot_line_value_data.action_parameter_name1,pivot_line_value_data.action_parameter
_value1,pivot_line_value_data.action_parameter_name2,pivot_line_value_data.action_p
arameter_value2,
pbmlv.message_text
FROM
(SELECT batch_line_id,
MAX(decode(rn,1,display_action_parameter_name))
action_parameter_name1,MAX(decode(rn,1,action_parameter_value))
action_parameter_value1,
MAX(decode(rn,2,display_action_parameter_name))
action_parameter_name2,MAX(decode(rn,2,action_parameter_value))
action_parameter_value2,
MAX(decode(rn,3,display_action_parameter_name))
action_parameter_name3,MAX(decode(rn,3,action_parameter_value))
action_parameter_value3,
MAX(decode(rn,4,display_action_parameter_name))
action_parameter_name4,MAX(decode(rn,4,action_parameter_value))
action_parameter_value4
FROM ( SELECT batch_line_id,
action_parameter_name,
action_parameter_value,
display_action_parameter_name,
row_number() over (partition by batch_line_id
order by batch_line_id,
action_parameter_name ) rn
FROM (SELECT pbavl.element_name action_parameter_name,
pbavl.parameter_name display_action_parameter_name,
pblv.action_parameter_value,
pblv.batch_line_id
FROM pay_task_parameters_vl pbavl, pay_batch_line_values pblv
WHERE pbavl.base_task_parameter_id = pblv.action_parameter_id
AND pbavl.display_flag <> 'N' )
)
GROUP BY batch_line_id) pivot_line_value_data,
pay_batch_lines pbl ,
pay_batch_headers pbh,
pay_bl_message_lines_vl pbmlv,
PAY_BL_TASK_ACTIONS_VL pbta,PAY_BL_TASKS_VL pbt
WHERE pivot_line_value_data.batch_line_id = pbl.batch_line_id
AND pbl.batch_id = pbh.batch_id
AND pbl.batch_line_id = pbmlv.source_id
AND pbl.batch_line_status = 'E'
AND pbh.batch_name like '%Pay%%%'
AND pbt.task_id=pbta.task_id
and pbl.task_action_id=pbta.task_action_id