39:
40: --
41: -- Global Variables
42: --
43: g_standard_links t_element_link_tab;
44: g_pg_links pay_asg_link_usages_pkg.t_pg_link_tab;
45: g_link_initialized boolean:= false;
46: g_pact_rec t_payroll_action_rec;
47: g_err_batch_link_id number;
196: ,p_balancing_keyflex_id => l_bat_rec.balancing_keyflex_id
197: ,p_element_set_id => l_bat_rec.element_set_id
198: ,p_pay_basis_id => l_bat_rec.pay_basis_id
199: ,p_link_to_all_payrolls_flag => l_bat_rec.link_to_all_payrolls_flag
200: ,p_standard_link_flag => l_bat_rec.standard_link_flag
201: ,p_transfer_to_gl_flag => l_bat_rec.transfer_to_gl_flag
202: ,p_comments => null
203: ,p_employment_category => l_bat_rec.employment_category
204: ,p_qualifying_age => l_bat_rec.qualifying_age
247: and effective_end_date = l_link_rec.effective_end_date
248: ;
249: end if;
250: --
251: -- If this is a standard link or people group link then
252: -- further processing needs to be done in batch mode.
253: --
254: if (l_bat_rec.standard_link_flag = 'Y')
255: or (l_bat_rec.people_group_id is not null) then
250: --
251: -- If this is a standard link or people group link then
252: -- further processing needs to be done in batch mode.
253: --
254: if (l_bat_rec.standard_link_flag = 'Y')
255: or (l_bat_rec.people_group_id is not null) then
256: --
257: -- Set the batch object status
258: --
531: ,pel.location_id
532: ,pel.pay_basis_id
533: ,pel.employment_category
534: ,pel.people_group_id
535: ,pel.standard_link_flag
536: --
537: ,bos.payroll_action_id
538: ,bos.object_status
539: from
544: and ( pel.element_link_id = p_elelink_id
545: or ( p_gen_link_type = 'A'
546: and bos.object_status <> 'C'))
547: and pel.business_group_id = p_bgid
548: and (pel.standard_link_flag = 'Y'
549: or pel.people_group_id is not null)
550: and bos.object_type = 'EL'
551: and bos.object_id = pel.element_link_id
552: -- not processed by this payroll action
567: ,pel.location_id
568: ,pel.pay_basis_id
569: ,pel.employment_category
570: ,pel.people_group_id
571: ,pel.standard_link_flag
572: --
573: ,bos.payroll_action_id
574: ,bos.object_status
575: --
591: ,pel.location_id
592: ,pel.pay_basis_id
593: ,pel.employment_category
594: ,pel.people_group_id
595: ,pel.standard_link_flag
596: --
597: ,bos.payroll_action_id
598: ,bos.object_status
599: from
603: bos.payroll_action_id = p_pact_id
604: and bos.object_type = 'EL'
605: and pel.element_link_id = bos.object_id
606: and pel.business_group_id = p_bgid
607: and (pel.standard_link_flag = 'Y'
608: or pel.people_group_id is not null)
609: group by
610: pel.element_link_id
611: ,pel.element_type_id
618: ,pel.location_id
619: ,pel.pay_basis_id
620: ,pel.employment_category
621: ,pel.people_group_id
622: ,pel.standard_link_flag
623: --
624: ,bos.payroll_action_id
625: ,bos.object_status
626: order by
667: end if;
668: --
669: -- Initialise globals
670: --
671: g_standard_links.delete;
672: g_pg_links.delete;
673: --
674: for l_rec in csr_elelink
675: (p_pact_rec.gen_link_type
678: ,p_pact_rec.payroll_action_id
679: ,p_phase)
680: loop
681:
682: if l_rec.standard_link_flag = 'Y' then
683: --
684: -- Add a standard link record.
685: --
686: l_link.element_link_id := l_rec.element_link_id;
680: loop
681:
682: if l_rec.standard_link_flag = 'Y' then
683: --
684: -- Add a standard link record.
685: --
686: l_link.element_link_id := l_rec.element_link_id;
687: l_link.element_type_id := l_rec.element_type_id;
688: l_link.effective_start_date := l_rec.effective_start_date;
697: l_link.pay_basis_id := l_rec.pay_basis_id;
698: l_link.employment_category := l_rec.employment_category;
699: l_link.people_group_id := l_rec.people_group_id;
700:
701: g_standard_links(g_standard_links.count+1) := l_link;
702:
703: end if;
704: --
705: if l_rec.people_group_id is not null then
903: --
904: -- Create assignment actions only when there are element links
905: -- to process.
906: --
907: if g_standard_links.count = 0 and
908: g_pg_links.count = 0 then
909:
910: l_sql := 'select nvl(1,:payroll_action_id) from dual where 1 = 0';
911:
1057: -- asg_action_main
1058: --
1059: -- Description:
1060: -- Assignment action level main process.
1061: -- Creates ALUs and standard link entries.
1062: -- ---------------------------------------------------------------------------
1063: procedure asg_action_main
1064: (p_assignment_id in number
1065: )
1083: hr_utility.set_location(l_proc, 10);
1084: --
1085: -- Populate element entries
1086: --
1087: for i in 1..g_standard_links.count loop
1088: --
1089: l_link := g_standard_links(i);
1090: --
1091: hrentmnt.maintain_entries_el
1085: -- Populate element entries
1086: --
1087: for i in 1..g_standard_links.count loop
1088: --
1089: l_link := g_standard_links(i);
1090: --
1091: hrentmnt.maintain_entries_el
1092: (p_business_group_id => g_pact_rec.business_group_id
1093: ,p_element_link_id => l_link.element_link_id