315: CURSOR c_all_gres(cp_bg_id number,
316: cp_eff_date date) IS
317: select hou.organization_id
318: from hr_organization_information hoi,
319: hr_all_organization_units hou
320: where hou.business_group_id = cp_bg_id
321: AND hou.organization_id = hoi.organization_id
322: AND hou.date_from <= cp_eff_date
323: AND nvl(hou.date_to,fnd_date.canonical_to_date('4712/12/31 00:00:00'))
826: begin
827: hr_utility.trace('Beginning of the sort_action cursor');
828:
829: sqlstr := 'select paa1.rowid
830: from hr_all_organization_units hou,
831: hr_all_organization_units hou1,
832: hr_locations_all loc,
833: per_all_people_f ppf,
834: per_all_assignments_f paf,
827: hr_utility.trace('Beginning of the sort_action cursor');
828:
829: sqlstr := 'select paa1.rowid
830: from hr_all_organization_units hou,
831: hr_all_organization_units hou1,
832: hr_locations_all loc,
833: per_all_people_f ppf,
834: per_all_assignments_f paf,
835: pay_assignment_actions paa1,