39: l_legislation_code varchar2(150);
40: --
41: begin
42: --
43: hr_utility.set_location('Entering:'|| l_proc, 10);
44: --
45: -- Ensure that all the mandatory parameter are not null
46: --
47: hr_api.mandatory_arg_error
79: --
80: hr_api.set_legislation_context(l_legislation_code);
81: end if;
82: --
83: hr_utility.set_location(' Leaving:'|| l_proc, 20);
84: --
85: end set_security_group_id;
86: --
87: -- ---------------------------------------------------------------------------
108: l_proc varchar2(72) := g_package||'return_legislation_code';
109: --
110: Begin
111: --
112: hr_utility.set_location('Entering:'|| l_proc, 10);
113: --
114: -- Ensure that all the mandatory parameter are not null
115: --
116: hr_api.mandatory_arg_error
126: -- call to this function. Just return the value in the global
127: -- variable.
128: --
129: l_legislation_code := pay_rcu_bus.g_legislation_code;
130: hr_utility.set_location(l_proc, 20);
131: else
132: --
133: -- The ID is different to the last call to this function
134: -- or this is the first call to this function.
143: close csr_leg_code;
144: fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
145: fnd_message.raise_error;
146: end if;
147: hr_utility.set_location(l_proc,30);
148: --
149: -- Set the global variables so the values are
150: -- available for the next call to this function.
151: --
152: close csr_leg_code;
153: pay_rcu_bus.g_retro_component_usage_id := p_retro_component_usage_id;
154: pay_rcu_bus.g_legislation_code := l_legislation_code;
155: end if;
156: hr_utility.set_location(' Leaving:'|| l_proc, 40);
157: return l_legislation_code;
158: end return_legislation_code;
159: --
160: -- ----------------------------------------------------------------------------
207: fnd_message.set_token('STEP ', '5');
208: fnd_message.raise_error;
209: END IF;
210: --
211: hr_utility.set_location(l_proc, 10);
212: --
213: if nvl(p_rec.business_group_id, hr_api.g_number) <>
214: nvl(pay_rcu_shd.g_old_rec.business_group_id, hr_api.g_number) then
215: l_argument := 'business_group_id';
214: nvl(pay_rcu_shd.g_old_rec.business_group_id, hr_api.g_number) then
215: l_argument := 'business_group_id';
216: raise l_error;
217: end if;
218: hr_utility.set_location(l_proc, 15);
219: --
220: if nvl(p_rec.legislation_code, hr_api.g_varchar2) <>
221: nvl(pay_rcu_shd.g_old_rec.legislation_code, hr_api.g_varchar2) then
222: l_argument := 'legislation_code';
221: nvl(pay_rcu_shd.g_old_rec.legislation_code, hr_api.g_varchar2) then
222: l_argument := 'legislation_code';
223: raise l_error;
224: end if;
225: hr_utility.set_location(l_proc, 20);
226: --
227: if p_rec.retro_component_id <> pay_rcu_shd.g_old_rec.retro_component_id then
228: l_argument := 'retro_component_id';
229: raise l_error;
227: if p_rec.retro_component_id <> pay_rcu_shd.g_old_rec.retro_component_id then
228: l_argument := 'retro_component_id';
229: raise l_error;
230: end if;
231: hr_utility.set_location(l_proc, 25);
232: --
233: if p_rec.creator_type <> pay_rcu_shd.g_old_rec.creator_type then
234: l_argument := 'creator_type';
235: raise l_error;
233: if p_rec.creator_type <> pay_rcu_shd.g_old_rec.creator_type then
234: l_argument := 'creator_type';
235: raise l_error;
236: end if;
237: hr_utility.set_location(l_proc, 30);
238: --
239: if p_rec.creator_id <> pay_rcu_shd.g_old_rec.creator_id then
240: l_argument := 'creator_id';
241: raise l_error;
239: if p_rec.creator_id <> pay_rcu_shd.g_old_rec.creator_id then
240: l_argument := 'creator_id';
241: raise l_error;
242: end if;
243: hr_utility.set_location(l_proc, 35);
244:
245: exception
246: when l_error then
247: hr_api.argument_changed_error
350: = nvl(l_legislation_code, l_varchar2);
351:
352: --
353: begin
354: hr_utility.set_location('Entering:'|| l_proc, 10);
355: --
356: -- Check mandatory parameters have been set
357: --
358: hr_api.mandatory_arg_error
368: ,hr_api.return_legislation_code(p_business_group_id));
369: --
370: -- Check if the retro component exists.
371: --
372: hr_utility.set_location(l_proc, 20);
373: open csr_retro_component;
374: fetch csr_retro_component into l_exists;
375: if csr_retro_component%notfound then
376: close csr_retro_component;
380:
381: end if;
382: close csr_retro_component;
383:
384: hr_utility.set_location(' Leaving:'|| l_proc, 50);
385: end chk_retro_component_id;
386: --
387: -- -------------------------------------------------------------------------
388: -- |-------------------< chk_creator_type_creator_id >---------------------|
463: and nvl(business_group_id, nvl(p_business_group_id, l_number))
464: = nvl(p_business_group_id, l_number);
465: --
466: begin
467: hr_utility.set_location('Entering:'|| l_proc, 10);
468: --
469: -- Check mandatory parameters have been set
470: --
471: hr_api.mandatory_arg_error
493:
494: --
495: -- Check the creator type.
496: --
497: hr_utility.set_location(l_proc, 15);
498: if p_creator_type = 'ET' then
499:
500: --
501: -- Check if the element type exists.
499:
500: --
501: -- Check if the element type exists.
502: --
503: hr_utility.set_location(l_proc, 20);
504: open csr_element_type;
505: fetch csr_element_type into l_exists;
506: if csr_element_type%notfound then
507: close csr_element_type;
518:
519: --
520: -- Check if the element classification exists.
521: --
522: hr_utility.set_location(l_proc, 25);
523: open csr_classification;
524: fetch csr_classification into l_exists;
525: if csr_classification%notfound then
526: close csr_classification;
539: fnd_message.raise_error;
540:
541: end if;
542:
543: hr_utility.set_location(' Leaving:'|| l_proc, 50);
544: end chk_creator_type_creator_id;
545:
546: --
547: -- -------------------------------------------------------------------------
601: where retro_component_id = p_retro_component_id;
602:
603: --
604: begin
605: hr_utility.set_location('Entering:'|| l_proc, 10);
606: --
607: -- Check mandatory parameters have been set
608: --
609: hr_api.mandatory_arg_error
616: ,p_argument => 'effective_date'
617: ,p_argument_value => p_effective_date
618: );
619:
620: hr_utility.set_location(l_proc, 15);
621: --
622: -- Check if the retro component usage is being updated and ensure that
623: -- g_old_rec contains the values for this retro_component_usage_id.
624: --
626: pay_rcu_shd.api_updating
627: (p_retro_component_usage_id => p_retro_component_usage_id
628: ,p_object_version_number => p_object_version_number);
629:
630: hr_utility.set_location(l_proc, 20);
631: --
632: -- Only proceed with validation if:
633: -- a) During update, the value has actually changed to
634: -- another not null value.
638: pay_rcu_shd.g_old_rec.reprocess_type <> p_reprocess_type)
639: or
640: NOT l_api_updating) then
641: --
642: hr_utility.set_location(l_proc, 30);
643:
644: if hr_api.not_exists_in_hr_lookups
645: (p_effective_date => p_effective_date
646: ,p_lookup_type => 'RETRO_REPROCESS_TYPE'
671: end if;
672:
673: end if;
674:
675: hr_utility.set_location(' Leaving:'|| l_proc, 50);
676: end chk_reprocess_type;
677: --
678: --
679: -- -------------------------------------------------------------------------
754: );
755:
756:
757: begin
758: hr_utility.set_location('Entering:'|| l_proc, 10);
759: --
760: -- Check mandatory parameters have been set
761: --
762: hr_api.mandatory_arg_error
768: (p_api_name => l_proc
769: ,p_argument => 'effective_date'
770: ,p_argument_value => p_effective_date
771: );
772: hr_utility.set_location(l_proc, 15);
773: --
774: -- Check if the retro component usage is being updated and ensure that
775: -- g_old_rec contains the values for this retro_component_usage_id.
776: --
778: pay_rcu_shd.api_updating
779: (p_retro_component_usage_id => p_retro_component_usage_id
780: ,p_object_version_number => p_object_version_number);
781:
782: hr_utility.set_location(l_proc, 20);
783: --
784: -- Only proceed with validation if:
785: -- a) During update, the value has actually changed to
786: -- another not null value.
790: pay_rcu_shd.g_old_rec.default_component <> p_default_component)
791: or
792: NOT l_api_updating) then
793: --
794: hr_utility.set_location(l_proc, 30);
795:
796: if hr_api.not_exists_in_hr_lookups
797: (p_effective_date => p_effective_date
798: ,p_lookup_type => 'YES_NO'
805: fnd_message.set_token('LOOKUP_TYPE','YES_NO');
806: fnd_message.raise_error;
807:
808: end if;
809: hr_utility.set_location(l_proc, 35);
810:
811: --
812: -- If the default_component is set to Y, ensure another retro component
813: -- usage does not exist whose default_component being set to Y.
813: -- usage does not exist whose default_component being set to Y.
814: --
815: if p_default_component = 'Y' then
816:
817: hr_utility.set_location(l_proc, 40);
818: open csr_default_component_usage;
819: fetch csr_default_component_usage into l_exists;
820: if csr_default_component_usage%found then
821: close csr_default_component_usage;
829: end if;
830:
831: end if;
832:
833: hr_utility.set_location(' Leaving:'|| l_proc, 50);
834: end chk_default_component;
835: --
836: --
837: -- -------------------------------------------------------------------------
889: where retro_component_id = p_retro_component_id;
890: --
891: --
892: begin
893: hr_utility.set_location('Entering:'|| l_proc, 10);
894: --
895: -- Check mandatory parameters have been set
896: --
897: hr_api.mandatory_arg_error
898: (p_api_name => l_proc
899: ,p_argument => 'effective_date'
900: ,p_argument_value => p_effective_date
901: );
902: hr_utility.set_location(l_proc, 15);
903: --
904: -- Check if the retro component usage is being updated and ensure that
905: -- g_old_rec contains the values for this retro_component_usage_id.
906: --
908: pay_rcu_shd.api_updating
909: (p_retro_component_usage_id => p_retro_component_usage_id
910: ,p_object_version_number => p_object_version_number);
911:
912: hr_utility.set_location(l_proc, 20);
913: --
914: -- Only proceed with validation if:
915: -- a) During update, the value has actually changed.
916: -- b) During insert.
919: pay_rcu_shd.g_old_rec.replace_run_flag <> p_replace_run_flag )
920: or
921: NOT l_api_updating) then
922: --
923: hr_utility.set_location(l_proc, 30);
924:
925: if p_replace_run_flag is not null then
926:
927: if p_replace_run_flag = 'Y' then
950: fnd_message.raise_error;
951:
952: end if;
953: end if;
954: hr_utility.set_location(l_proc, 35);
955:
956: end if;
957:
958: hr_utility.set_location(' Leaving:'|| l_proc, 50);
954: hr_utility.set_location(l_proc, 35);
955:
956: end if;
957:
958: hr_utility.set_location(' Leaving:'|| l_proc, 50);
959: end chk_replace_run_flag;
960: --
961: --
962: -- -------------------------------------------------------------------------
1014: where retro_component_id = p_retro_component_id;
1015: --
1016: --
1017: begin
1018: hr_utility.set_location('Entering:'|| l_proc, 10);
1019: --
1020: -- Check mandatory parameters have been set
1021: --
1022: hr_api.mandatory_arg_error
1023: (p_api_name => l_proc
1024: ,p_argument => 'effective_date'
1025: ,p_argument_value => p_effective_date
1026: );
1027: hr_utility.set_location(l_proc, 15);
1028: --
1029: -- Check if the retro component usage is being updated and ensure that
1030: -- g_old_rec contains the values for this retro_component_usage_id.
1031: --
1033: pay_rcu_shd.api_updating
1034: (p_retro_component_usage_id => p_retro_component_usage_id
1035: ,p_object_version_number => p_object_version_number);
1036:
1037: hr_utility.set_location(l_proc, 20);
1038: --
1039: -- Only proceed with validation if:
1040: -- a) During update, the value has actually changed.
1041: -- b) During insert.
1044: pay_rcu_shd.g_old_rec.use_override_dates <> p_use_override_dates )
1045: or
1046: NOT l_api_updating) then
1047: --
1048: hr_utility.set_location(l_proc, 30);
1049:
1050: if p_use_override_dates is not null then
1051:
1052: if p_use_override_dates = 'Y' then
1075: fnd_message.raise_error;
1076:
1077: end if;
1078: end if;
1079: hr_utility.set_location(l_proc, 35);
1080:
1081: end if;
1082:
1083: hr_utility.set_location(' Leaving:'|| l_proc, 50);
1079: hr_utility.set_location(l_proc, 35);
1080:
1081: end if;
1082:
1083: hr_utility.set_location(' Leaving:'|| l_proc, 50);
1084: end chk_use_override_dates;
1085: --
1086: --
1087: -- ----------------------------------------------------------------------------
1094: --
1095: l_proc varchar2(72) := g_package||'insert_validate';
1096: --
1097: Begin
1098: hr_utility.set_location('Entering:'||l_proc, 5);
1099: --
1100: -- Call all supporting business operations
1101: --
1102: --
1192: ,p_effective_date => p_effective_date
1193: );
1194:
1195: --
1196: hr_utility.set_location(' Leaving:'||l_proc, 10);
1197: End insert_validate;
1198: --
1199: -- ----------------------------------------------------------------------------
1200: -- |---------------------------< update_validate >----------------------------|
1206: --
1207: l_proc varchar2(72) := g_package||'update_validate';
1208: --
1209: Begin
1210: hr_utility.set_location('Entering:'||l_proc, 5);
1211: --
1212: -- Call all supporting business operations
1213: --
1214: --
1289: ,p_effective_date => p_effective_date
1290: );
1291:
1292: --
1293: hr_utility.set_location(' Leaving:'||l_proc, 10);
1294: End update_validate;
1295: --
1296: -- ----------------------------------------------------------------------------
1297: -- |---------------------------< delete_validate >----------------------------|
1302: --
1303: l_proc varchar2(72) := g_package||'delete_validate';
1304: --
1305: Begin
1306: hr_utility.set_location('Entering:'||l_proc, 5);
1307: --
1308: --
1309: chk_startup_action(false
1310: ,pay_rcu_shd.g_old_rec.business_group_id
1324: END IF;
1325: --
1326: -- Call all supporting business operations
1327: --
1328: hr_utility.set_location(' Leaving:'||l_proc, 10);
1329: End delete_validate;
1330: --
1331: end pay_rcu_bus;