PAY Costing Detail

Description
Categories: Enginatics
Repository: Github
Imported from Concurrent Program
Application: Payroll
Source: Costing Detail Report
Short Name: PAYRPCDR

Download Blitz Report™ – World’s fastest reporting and data upload for Oracle EBS

Contact us to schedule a demo or if you need help with the installation

select
 x.consolidation_set_name,
 x.payroll_name,
 x.gre,
 x.last_name,
 x.first_name,
 x.middle_names,
 x.effective_date,
 x.element_name,
 x.input_value,
 x.uom,
 x.cost_allocation_segments,
 x.credit_amount,
 x.debit_amount,
 &lp_cost_alloc_segments
 x.organization_name,
 x.location_name,
 &lp_ni_number
 x.employee_number,
 x.assignment_number,
 x.element_classification,
 x.employment_category
from
 (select
   pcd.cost_type,
   pcd.consolidation_set_name,
   pcd.payroll_name,
   pcd.gre_name gre,
   pcd.organization_name,
   pcd.location_code location_name,
   pcd.last_name,
   pcd.first_name,
   pcd.middle_names,
   pcd.employee_number,
   pcd.national_identifier,
   (select
     pec.classification_name
    from
     pay_element_classifications pec
    where
     pcd.classification_id = pec.classification_id
   ) element_classification,
   (SELECT
     hrl.meaning
    from
     hr_lookups hrl,
     per_all_assignments_f paf
    where
     hrl.lookup_type = 'EMP_CAT' and
     hrl.lookup_code = paf.employment_category and
     paf.assignment_id = pcd.assignment_id and
     pcd.effective_date between paf.effective_start_date and paf.effective_end_date
   ) employment_category,
   pcd.assignment_number,
   pcd.assignment_id,
   nvl(pcd.reporting_name,pcd.element_name) element_name,
   pcd.input_value_name input_value,
   pcd.uom,
   pcd.credit_amount,
   pcd.debit_amount,
   pcd.effective_date,
   pcd.concatenated_segments cost_allocation_segments,
   pcd.segment1,
   pcd.segment2,
   pcd.segment3,
   pcd.segment4,
   pcd.segment5,
   pcd.segment6,
   pcd.segment7,
   pcd.segment8,
   pcd.segment9,
   pcd.segment10,
   pcd.segment11,
   pcd.segment12,
   pcd.segment13,
   pcd.segment14,
   pcd.segment15,
   pcd.segment16,
   pcd.segment17,
   pcd.segment18,
   pcd.segment19,
   pcd.segment20,
   pcd.segment21,
   pcd.segment22,
   pcd.segment23,
   pcd.segment24,
   pcd.segment25,
   pcd.segment26,
   pcd.segment27,
   pcd.segment28,
   pcd.segment29,
   pcd.segment30,
   pcd.run_result_id
  from
   pay_costing_details_v pcd
  where
   nvl(:p_selection_criteria,'?') = nvl(:p_selection_criteria,'?') and
   nvl(:p_eff_date_begin,sysdate) = nvl(:p_eff_date_begin,sysdate) and
   nvl(:p_eff_date_end,sysdate) = nvl(:p_eff_date_end,sysdate) and
   pcd.effective_date between :p_start_date and :p_end_date and
   pcd.business_group_id = :p_business_group_id and
   ( (:p_cost_type = 'EST_MODE_COST' and pcd.cost_type in ('COST_TMP','EST_COST')) or
     (:p_cost_type = 'EST_MODE_ALL' and pcd.cost_type in ('COST_TMP','EST_COST','EST_REVERSAL')) or
     (:p_cost_type is null and pcd.cost_type = 'COST_TMP')
   ) and
   1=1
 ) x
order by
 x.cost_type,
 x.last_name,
 x.first_name,
 x.middle_names,
 x.effective_date,
 x.cost_type
Parameter Name SQL text Validation
Costing Effective Date Begin
 
Date
Costing Effective Date End
 
Date
Costing Process
pcd.payroll_action_id = to_number(substr(:p_costing_name,instr(:p_costing_name,':',-1,1)+1,length(:p_costing_name)))
LOV
Selection Criterion
 
Char
Element Set
exists
(
select
pes.element_set_id
from
pay_element_sets pes,
pay_element_sets_tl pestl
where 
(pes.business_group_id=fnd_global.per_business_group_id or 
 (pes.business_group_id is null and 
  pes.legislation_code=
  (select legislation_code
   from per_business_groups
   where business_group_id= fnd_global.per_business_group_id
  )
 )
) and 
pes.element_set_type='C' and 
pestl.element_set_id=pes.element_set_id and 
pestl.language=userenv('LANG') and
pestl.element_set_name = :p_element_set_name and
exists
 (select 'x' 
  from   pay_element_type_rules petr
  where  petr.element_set_id = pes.element_set_id
  and    petr.element_type_id = pcd.element_type_id
  and    petr.include_or_exclude = 'I'
  union all
  select 'x' 
  from   pay_element_types_f pet1
  where  pet1.classification_id in
   (select classification_id
    from   pay_ele_classification_rules
    where  element_set_id = pes.element_set_id
   )
  and pet1.element_type_id = pcd.element_type_id
  minus
  select 'x' 
  from   pay_element_type_rules petr
  where  petr.element_set_id = pes.element_set_id
  and    petr.element_type_id = pcd.element_type_id
  and    petr.include_or_exclude = 'E'
 )
)
LOV
Element Classification
pcd.classification_id in
(
select
pec.classification_id 
from
pay_element_classifications pec
where 
nvl(pec.business_group_id,:p_business_group_id) = :p_business_group_id and 
(   pec.legislation_code is null or 
    pec.legislation_code in 
         (select hoi.org_information9
           from  hr_organization_information hoi
           where hoi.organization_id = :p_business_group_id
           and   hoi.org_information_context='Business Group Information'
         )
) and 
pec.classification_name = :p_classification_name
)
LOV
Element
pcd.element_type_id in
(
select
el.element_type_id 
from
fnd_sessions fd,
pay_element_types_f_tl tl,
pay_element_types_f el
where 
nvl(el.business_group_id,fnd_global.per_business_group_id) =fnd_global.per_business_group_id and 
(el.legislation_code is null or 
 el.legislation_code=
  (select legislation_code 
   from   per_business_groups b
   where b.business_group_id=fnd_global.per_business_group_id
  )
)
and tl.language=userenv('LANG')
and el.element_type_id=tl.element_type_id
and fd.session_id=userenv('sessionid')
and fd.effective_date between el.effective_start_date and el.effective_end_date
and tl.element_name = :p_element_name
)
LOV
Payroll
pcd.payroll_id in
(
select
ppf.payroll_id
from
pay_payrolls_f ppf,
fnd_sessions fnd
where 
ppf.business_group_id=:p_business_group_id and 
fnd.session_id=userenv('sessionid') and 
fnd.effective_date between ppf.effective_start_date and ppf.effective_end_date and
ppf.payroll_name = :p_payroll_name
)
LOV
Consolidation Set
pcd.consolidation_set_name = :p_consolidation_set_name
LOV
Government Reporting Entity
pcd.tax_unit_id =:p_tax_unit_id
LOV Oracle
Organization
pcd.organization_id = :p_organization_id
LOV Oracle
Location
pcd.location_id = :p_location_id
LOV Oracle
Employee
pcd.person_id = :p_person_id
LOV Oracle
Assignment Set
exists 
  (select 
    1
   from 
    hr_assignment_sets aset
   where
    aset.assignment_set_id = :p_assignment_set_id and
    nvl(aset.payroll_id,pcd.payroll_id) = pcd.payroll_id and
    (not exists 
     (select 
       1
      from 
       hr_assignment_set_amendments hasa
      where
       hasa.assignment_set_id = aset.assignment_set_id and
       hasa.include_or_exclude = 'I') or exists 
     (select 
       1
      from 
       hr_assignment_set_amendments hasa
      where
       hasa.assignment_set_id = aset.assignment_set_id and
       hasa.assignment_id = pcd.assignment_id and
       hasa.include_or_exclude = 'I')) and
    not exists 
     (select 
       1
      from 
       hr_assignment_set_amendments hasa
      where
       hasa.assignment_set_id = aset.assignment_set_id and
       hasa.assignment_id = pcd.assignment_id and
       hasa.include_or_exclude = 'E'
     )
  )
LOV Oracle
Include Accruals
 
LOV Oracle
Employment Category
(select 
   hrl.meaning
  from 
   hr_lookups hrl,
   per_all_assignments_f paf
  where
   hrl.lookup_type = 'EMP_CAT' and
   hrl.lookup_code = paf.employment_category and
   paf.assignment_id = pcd.assignment_id and
   pcd.effective_date between paf.effective_start_date and paf.effective_end_date
) = :p_emp_cat
LOV