Lists the costing configuration done at the element eligibility level. It is really helpful to verify or reconcile the costing configuration before going live with the payroll application or after any mass changes.
Only 5 segments are listed as a sample. You may include more segments as configured in your cost allocation key flexfield.
Element eligibility costing
SELECT petl.element_name
,pelf.element_link_name
,to_char(trunc(pci_inputval.effective_start_date),'DD/MM/YYYY') Cost_rec_stdt
,to_char(trunc(pci_inputval.effective_end_date),'DD/MM/YYYY') Cost_rec_enddt
,ldg.name LDG_Name
,pivtl.name Inputval
,pci_inputval.costable_type Costing_Type
,pci_inputval.transfer_to_gl_flag GL_Flag
,ccost.segment1 Cost_seg1
,ccost.segment2 Cost_seg2
,ccost.segment3 Cost_seg3
,ccost.segment4 Cost_seg4
,ccost.segment5 Cost_seg5
,balcost.segment1 Bal_seg1
,balcost.segment2 Bal_seg2
,balcost.segment3 Bal_seg3
,balcost.segment4 Bal_seg4
,balcost.segment5 Bal_seg5
FROM pay_element_types_f petf
,per_legislative_data_groups_tl ldg
,pay_element_types_tl petl
,pay_element_links_f pelf
,pay_link_input_values_f plivf
,pay_input_values_tl pivtl
,pay_cost_allocations_f pcaf
,pay_cost_info_f pci
,pay_cost_info_f pci_inputval
,pay_cost_alloc_accounts ccost
,pay_cost_alloc_accounts balcost
WHERE 1 = 1
AND petl.element_type_id = petf.element_type_id
AND TRUNC (SYSDATE) BETWEEN petf.effective_start_date AND petf.effective_end_date
AND TRUNC (SYSDATE) BETWEEN pelf.effective_start_date AND pelf.effective_end_date
AND petl.language = 'US'
AND petf.element_type_id = pelf.element_type_id
AND ldg.language(+) = 'US'
AND ldg.legislative_data_group_id(+) = petf.legislative_data_group_id
AND pelf.element_link_id = plivf.element_link_id
AND pivtl.input_value_id = plivf.input_value_id
AND pivtl.language = 'US'
AND pcaf.source_type = 'EL'
AND pcaf.source_id = pelf.element_link_id
AND TRUNC(SYSDATE) BETWEEN pcaf.effective_start_date AND pcaf.effective_end_date
AND balcost.source_sub_type = 'BAL'
AND balcost.cost_allocation_record_id = pcaf.cost_allocation_record_id
AND ccost.source_sub_type = 'COST'
AND ccost.cost_allocation_record_id = pcaf.cost_allocation_record_id
AND pci_inputval.source_type = 'EL'
AND pci_inputval.source_id = pelf.element_link_id
AND pci.source_id = plivf.link_input_value_id
AND TRUNC(SYSDATE) BETWEEN pci.effective_start_date AND pci.effective_end_date
AND TRUNC(SYSDATE) BETWEEN pci_inputval.effective_start_date AND pci_inputval.effective_end_date;
Tips for using the queries
- Create a BI Publisher data model, add a new SQL Query data set that uses the HCM application database as its data source, and paste the query in. Remove the trailing semicolon as the data model editor rejects it.
- Match the segment columns to your cost allocation key flexfield structure, as the number of segments differs between implementations.