40: begin
41: hr_utility.set_location('Entering: '||l_proc_name, 10);
42: -- ------------------------------------------------------------
43: -- Query formula info (ie. the formula attached to this
44: -- element's Standard status proc rule.
45: -- ------------------------------------------------------------
46: for fra_rec in csr_fra (c_element_type_id => p_element_type_id)
47: loop
48: hr_utility.set_location('..FF Name :'||fra_rec.formula_name,15);
257: ,p_scheme_prefix in Varchar2
258: ,p_reporting_name in Varchar2
259: ,p_scheme_description in Varchar2
260: ,p_termination_rule in Varchar2
261: ,p_standard_link in Varchar2
262: ,p_effective_start_date in Date
263: ,p_effective_end_date in Date
264: ,p_security_group_id in Number
265: ,p_business_group_id in Number
757: -- ---------------------------------------------------------------------
758: -- |-------------------< Update Shadow Structure >----------------------|
759: -- ---------------------------------------------------------------------
760: -- Get Element Type id and update user-specified Classification,
761: -- Category, Processing Type and Standard Link on Base Element
762: -- as well as other element created for the Scheme
763: -- ---------------------------------------------------------------------
764: -- 1.
765: for csr_rec in csr_shd_ele (p_scheme_prefix||' Special Inputs')
781: l_shadow_element(l_count).reporting_name := nvl(p_reporting_name,p_scheme_prefix);
782: l_shadow_element(l_count).description := 'Element for '||p_scheme_prefix
783: ||' Pension Deduction';
784: end loop;
785: -- 3.
786: for csr_rec in csr_shd_ele (p_scheme_prefix||' SI Gross Standard Adjustment')
787: loop
788: l_count := l_count +1;
789: l_shadow_element(l_count).element_type_id := csr_rec.element_type_id;
782: l_shadow_element(l_count).description := 'Element for '||p_scheme_prefix
783: ||' Pension Deduction';
784: end loop;
785: -- 3.
786: for csr_rec in csr_shd_ele (p_scheme_prefix||' SI Gross Standard Adjustment')
787: loop
788: l_count := l_count +1;
789: l_shadow_element(l_count).element_type_id := csr_rec.element_type_id;
790: l_shadow_element(l_count).object_version_number := csr_rec.object_version_number;
790: l_shadow_element(l_count).object_version_number := csr_rec.object_version_number;
791: l_shadow_element(l_count).reporting_name := nvl(p_reporting_name,p_scheme_prefix)
792: ||' SI Gross Std. Adj.';
793: l_shadow_element(l_count).description := 'Element for '||p_scheme_prefix
794: ||' SI Gross Standard Adjustment';
795: end loop;
796: -- 4.
797: for csr_rec in csr_shd_ele (p_scheme_prefix||' Standard Tax Adjustment')
798: loop
792: ||' SI Gross Std. Adj.';
793: l_shadow_element(l_count).description := 'Element for '||p_scheme_prefix
794: ||' SI Gross Standard Adjustment';
795: end loop;
796: -- 4.
797: for csr_rec in csr_shd_ele (p_scheme_prefix||' Standard Tax Adjustment')
798: loop
799: l_count := l_count + 1;
800: l_shadow_element(l_count).element_type_id := csr_rec.element_type_id;
793: l_shadow_element(l_count).description := 'Element for '||p_scheme_prefix
794: ||' SI Gross Standard Adjustment';
795: end loop;
796: -- 4.
797: for csr_rec in csr_shd_ele (p_scheme_prefix||' Standard Tax Adjustment')
798: loop
799: l_count := l_count + 1;
800: l_shadow_element(l_count).element_type_id := csr_rec.element_type_id;
801: l_shadow_element(l_count).object_version_number := csr_rec.object_version_number;
801: l_shadow_element(l_count).object_version_number := csr_rec.object_version_number;
802: l_shadow_element(l_count).reporting_name := nvl(p_reporting_name,p_scheme_prefix)
803: ||' Std. Tax Adj.';
804: l_shadow_element(l_count).description := 'Element for '||p_scheme_prefix
805: ||' Standard Tax Adjustment';
806: end loop;
807: -- 5.
808: for csr_rec in csr_shd_ele (p_scheme_prefix||' SI Income Standard Adjustment')
809: loop
803: ||' Std. Tax Adj.';
804: l_shadow_element(l_count).description := 'Element for '||p_scheme_prefix
805: ||' Standard Tax Adjustment';
806: end loop;
807: -- 5.
808: for csr_rec in csr_shd_ele (p_scheme_prefix||' SI Income Standard Adjustment')
809: loop
810: l_count := l_count + 1;
811: l_shadow_element(l_count).element_type_id := csr_rec.element_type_id;
804: l_shadow_element(l_count).description := 'Element for '||p_scheme_prefix
805: ||' Standard Tax Adjustment';
806: end loop;
807: -- 5.
808: for csr_rec in csr_shd_ele (p_scheme_prefix||' SI Income Standard Adjustment')
809: loop
810: l_count := l_count + 1;
811: l_shadow_element(l_count).element_type_id := csr_rec.element_type_id;
812: l_shadow_element(l_count).object_version_number := csr_rec.object_version_number;
812: l_shadow_element(l_count).object_version_number := csr_rec.object_version_number;
813: l_shadow_element(l_count).reporting_name := nvl(p_reporting_name,p_scheme_prefix)
814: ||' SI Income Std. Adj.';
815: l_shadow_element(l_count).description := 'Element for '||p_scheme_prefix
816: ||' SI Income Standard Adjustment';
817: end loop;
818: -- 6.
819: for csr_rec in csr_shd_ele (p_scheme_prefix||' SI Gross Special Adjustment')
820: loop
914:
915: hr_utility.set_location('..Updating the scheme shadow elements', 30);
916: for i in 1..l_count
917: loop
918: -- Set the standard link flag only for EE and ER elements
919: -- if the standard link is Y
920: IF UPPER(p_standard_link) = 'Y' THEN
921: IF l_shadow_element(i).description LIKE '%Pension Deduction' OR
922: l_shadow_element(i).description LIKE '%Employer Pension Contribution' THEN
915: hr_utility.set_location('..Updating the scheme shadow elements', 30);
916: for i in 1..l_count
917: loop
918: -- Set the standard link flag only for EE and ER elements
919: -- if the standard link is Y
920: IF UPPER(p_standard_link) = 'Y' THEN
921: IF l_shadow_element(i).description LIKE '%Pension Deduction' OR
922: l_shadow_element(i).description LIKE '%Employer Pension Contribution' THEN
923: l_std_link_flag := 'Y';
916: for i in 1..l_count
917: loop
918: -- Set the standard link flag only for EE and ER elements
919: -- if the standard link is Y
920: IF UPPER(p_standard_link) = 'Y' THEN
921: IF l_shadow_element(i).description LIKE '%Pension Deduction' OR
922: l_shadow_element(i).description LIKE '%Employer Pension Contribution' THEN
923: l_std_link_flag := 'Y';
924: ELSE
932: ,p_element_type_id => l_shadow_element(i).element_type_id
933: ,p_description => l_shadow_element(i).description
934: ,p_reporting_name => l_shadow_element(i).reporting_name
935: ,p_post_termination_rule => p_termination_rule
936: ,p_standard_link_flag => nvl(l_std_link_flag, hr_api.g_varchar2)
937: ,p_object_version_number => l_shadow_element(i).object_version_number
938: );
939:
940: -- Reset the value for standard link flag.
936: ,p_standard_link_flag => nvl(l_std_link_flag, hr_api.g_varchar2)
937: ,p_object_version_number => l_shadow_element(i).object_version_number
938: );
939:
940: -- Reset the value for standard link flag.
941: l_std_link_flag := 'N';
942:
943: end loop;
944: hr_utility.set_location('..After Updating the scheme shadow elements', 50);
1570: -- Create the Balance feeds for the eligible comp balance
1571: -- ---------------------------------------------------------------------
1572: Create_Pen_Sal_Bal_Feeds ;
1573: -- ---------------------------------------------------------------------
1574: -- Compile the base element's standard formula
1575: -- ---------------------------------------------------------------------
1576:
1577:
1578: Compile_Formula
1620: ,p_scheme_prefix in Varchar2
1621: ,p_reporting_name in Varchar2
1622: ,p_scheme_description in Varchar2
1623: ,p_termination_rule in Varchar2
1624: ,p_standard_link in Varchar2
1625: ,p_effective_start_date in Date
1626: ,p_effective_end_date in Date
1627: ,p_security_group_id in Number
1628: ,p_business_group_id in Number
1678: ,p_scheme_prefix => p_scheme_prefix
1679: ,p_reporting_name => p_reporting_name
1680: ,p_scheme_description => p_scheme_description
1681: ,p_termination_rule => p_termination_rule
1682: ,p_standard_link => p_standard_link
1683: ,p_effective_start_date => p_effective_start_date
1684: ,p_effective_end_date => p_effective_end_date
1685: ,p_security_group_id => p_security_group_id
1686: ,p_business_group_id => p_business_group_id