5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' hr_nmf_bus.'; -- Global package name
9: g_debug boolean := hr_utility.debug_enabled;
10: --
11: -- The following two global variables are only to be
12: -- used by the return_legislation_code function.
13: --
38: --
39: Begin
40: --
41: if g_debug then
42: hr_utility.set_location('Entering:'|| l_proc, 10);
43: end if;
44: --
45: -- Ensure that all the mandatory parameter are not null
46: --
58: -- variable.
59: --
60: l_legislation_code := hr_nmf_bus.g_legislation_code;
61: if g_debug then
62: hr_utility.set_location(l_proc, 20);
63: end if;
64: else
65: --
66: -- The ID is different to the last call to this function
77: fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
78: fnd_message.raise_error;
79: end if;
80: if g_debug then
81: hr_utility.set_location(l_proc,30);
82: end if;
83: --
84: -- Set the global variables so the values are
85: -- available for the next call to this function.
88: hr_nmf_bus.g_name_format_id := p_name_format_id;
89: hr_nmf_bus.g_legislation_code := l_legislation_code;
90: end if;
91: if g_debug then
92: hr_utility.set_location(' Leaving:'|| l_proc, 40);
93: end if;
94: return l_legislation_code;
95: end return_legislation_code;
96: --
131: --
132: Begin
133: --
134: if g_debug then
135: hr_utility.set_location('Entering:'||l_proc, 10);
136: end if;
137: --
138: -- Raise error if row is seeded
139: --
145: fnd_message.raise_error;
146: end if;
147: --
148: if g_debug then
149: hr_utility.set_location('Leaving:'||l_proc, 100);
150: end if;
151: End chk_delete;
152: --
153: -- ----------------------------------------------------------------------------
188: --
189: Begin
190: --
191: if g_debug then
192: hr_utility.set_location('Entering:'||l_proc, 10);
193: end if;
194: --
195: -- Only proceed with the validation if a row exists for the current
196: -- record in the HR Schema.
210: raise l_error;
211: end if;
212: --
213: if g_debug then
214: hr_utility.set_location(l_proc, 20);
215: end if;
216: --
217: if nvl(p_rec.legislation_code, hr_api.g_varchar2) <>
218: nvl(hr_nmf_shd.g_old_rec.legislation_code ,hr_api.g_varchar2)
221: raise l_error;
222: end if;
223: --
224: if g_debug then
225: hr_utility.set_location(l_proc, 30);
226: end if;
227: --
228: if nvl(p_rec.user_format_choice,hr_api.g_varchar2) <>
229: hr_nmf_shd.g_old_rec.user_format_choice then
231: raise l_error;
232: end if;
233: --
234: if g_debug then
235: hr_utility.set_location(' Leaving:'||l_proc, 100);
236: end if;
237: exception
238: when l_error then
239: hr_api.argument_changed_error
278: l_name_format_id number;
279: --
280: begin
281: if g_debug then
282: hr_utility.set_location('Entering: '||l_proc,5);
283: end if;
284: --
285: -----------------------------------
286: -- Check name format id not null --
290: p_argument => 'p_name_format_id',
291: p_argument_value => p_name_format_id);
292: --
293: if g_debug then
294: hr_utility.set_location('Leaving: '||l_proc,10);
295: end if;
296: end chk_name_format_id;
297: --
298: -- -----------------------------------------------------------------
330: l_api_updating boolean;
331: --
332: begin
333: if g_debug then
334: hr_utility.set_location('Entering: '||l_proc,5);
335: end if;
336: --
337: -- Check mandatory parameters have been set
338: --
366: end if;
367: end if;
368: --
369: if g_debug then
370: hr_utility.set_location('Leaving: '||l_proc,70);
371: end if;
372: --
373: Exception
374: when app_exception.application_exception then
374: when app_exception.application_exception then
375: if hr_multi_message.exception_add
376: (p_associated_column1 => 'HR_NAME_FORMATS.FORMAT_NAME') then
377: if g_debug then
378: hr_utility.set_location(' Leaving:'||l_proc, 80);
379: end if;
380: raise;
381: end if;
382: if g_debug then
379: end if;
380: raise;
381: end if;
382: if g_debug then
383: hr_utility.set_location(' Leaving:'||l_proc,90);
384: end if;
385: end chk_format_name;
386: --
387: --
416: l_value varchar2(240) := 'DUMMY';
417: --
418: begin
419: if g_debug then
420: hr_utility.set_location('Entering:'||l_proc, 5);
421: end if;
422: --
423: IF p_legislation_code IS NOT NULL THEN
424: l_value := hr_general.DECODE_TERRITORY(P_TERRITORY_CODE => p_legislation_code);
430: --
431: END IF;
432: --
433: if g_debug then
434: hr_utility.set_location('Leaving:'||l_proc, 70);
435: end if;
436: --
437: Exception
438: when app_exception.application_exception then
438: when app_exception.application_exception then
439: if hr_multi_message.exception_add
440: (p_associated_column1 => 'HR_NAME_FORMATS.LEGISLATION_CODE') then
441: if g_debug then
442: hr_utility.set_location(' Leaving:'||l_proc, 80);
443: end if;
444: raise;
445: end if;
446: if g_debug then
443: end if;
444: raise;
445: end if;
446: if g_debug then
447: hr_utility.set_location(' Leaving:'||l_proc,90);
448: end if;
449: end chk_legislation_code;
450: --
451: -- -----------------------------------------------------------------
487: l_proc varchar2(72) := g_package||' chk_user_format_choice';
488: --
489: begin
490: if g_debug then
491: hr_utility.set_location('Entering:'||l_proc, 5);
492: end if;
493: --
494: -- Check mandatory parameters have been set
495: --
511: ,p_argument_value => p_format_name
512: );
513: --
514: if g_debug then
515: hr_utility.set_location(l_proc, 10);
516: end if;
517: --
518: if p_user_format_choice is not null then
519: --
552: fnd_message.raise_error;
553: end if;
554: --
555: if g_debug then
556: hr_utility.set_location('Leaving:'||l_proc, 70);
557: end if;
558: Exception
559: when app_exception.application_exception then
560: if hr_multi_message.exception_add
559: when app_exception.application_exception then
560: if hr_multi_message.exception_add
561: (p_associated_column1 => 'HR_NAME_FORMATS.USER_FORMAT_CHOICE') then
562: if g_debug then
563: hr_utility.set_location(' Leaving:'||l_proc, 80);
564: end if;
565: raise;
566: end if;
567: if g_debug then
564: end if;
565: raise;
566: end if;
567: if g_debug then
568: hr_utility.set_location(' Leaving:'||l_proc,90);
569: end if;
570: End chk_user_format_choice;
571: --
572: -- -----------------------------------------------------------------
614: l_token fnd_lookup_values.lookup_code%TYPE;
615: --
616: begin
617: if g_debug then
618: hr_utility.set_location('Entering:'||l_proc, 5);
619: end if;
620: --
621: -- Check mandatory parameters have been set
622: --
670: end if;
671: end loop;
672: --
673: if g_debug then
674: hr_utility.set_location(' Leaving:'||l_proc,70);
675: end if;
676: Exception
677: when app_exception.application_exception then
678: if hr_multi_message.exception_add
677: when app_exception.application_exception then
678: if hr_multi_message.exception_add
679: (p_associated_column1 => 'HR_NAME_FORMATS.FORMAT_MASK') then
680: if g_debug then
681: hr_utility.set_location(' Leaving:'||l_proc, 80);
682: end if;
683: raise;
684: end if;
685: if g_debug then
682: end if;
683: raise;
684: end if;
685: if g_debug then
686: hr_utility.set_location(' Leaving:'||l_proc,90);
687: end if;
688:
689: End chk_format_mask;
690: --
735: and user_format_choice = p_user_choice;
736: --
737: Begin
738: if g_debug then
739: hr_utility.set_location('Entering:'||l_proc, 5);
740: end if;
741: --
742: -- Check mandatory parameters have been set
743: --
760: else
761: close csr_validate_combination;
762: end if;
763: if g_debug then
764: hr_utility.set_location(' Leaving:'||l_proc,70);
765: end if;
766: Exception
767: when app_exception.application_exception then
768: if hr_multi_message.exception_add
769: (p_associated_column1 => 'HR_NAME_FORMATS.FORMAT_NAME'
770: ,p_associated_column2 => 'HR_NAME_FORMATS.LEGISLATION_CODE'
771: ,p_associated_column3 => 'HR_NAME_FORMATS.USER_FORMAT_CHOICE') then
772: if g_debug then
773: hr_utility.set_location(' Leaving:'||l_proc, 80);
774: end if;
775: raise;
776: end if;
777: if g_debug then
774: end if;
775: raise;
776: end if;
777: if g_debug then
778: hr_utility.set_location(' Leaving:'||l_proc,90);
779: end if;
780:
781: End chk_format_and_legislation;
782: --
791: l_proc varchar2(72) := g_package||'insert_validate';
792: --
793: Begin
794: if g_debug then
795: hr_utility.set_location('Entering:'||l_proc, 5);
796: end if;
797: --
798: -- Call all supporting business operations
799: --
806: ,p_format_name => p_rec.format_name
807: ,p_object_version_number => p_rec.object_version_number
808: ,p_effective_date => p_effective_date);
809: if g_debug then
810: hr_utility.set_location(l_proc, 20);
811: end if;
812: --
813: -- Validate legislation code
814: --
813: -- Validate legislation code
814: --
815: chk_legislation_code(p_legislation_code => p_rec.legislation_code);
816: if g_debug then
817: hr_utility.set_location(l_proc, 30);
818: end if;
819: --
820: -- Validate user format choice
821: --
824: ,p_format_name => p_rec.format_name
825: ,p_effective_date => p_effective_date);
826: --
827: if g_debug then
828: hr_utility.set_location(l_proc, 40);
829: end if;
830: --
831: -- Validate format mask
832: --
833: chk_format_mask(p_format_mask => p_rec.format_mask
834: ,p_effective_date => p_effective_date);
835: --
836: if g_debug then
837: hr_utility.set_location(l_proc, 50);
838: end if;
839: --
840: -- Validate format name, legislation code and user format choice
841: --
845: ,p_user_format_choice => p_rec.user_format_choice);
846: --
847: --
848: if g_debug then
849: hr_utility.set_location(' Leaving:'||l_proc, 100);
850: end if;
851: End insert_validate;
852: --
853: -- ----------------------------------------------------------------------------
861: l_proc varchar2(72) := g_package||'update_validate';
862: --
863: Begin
864: if g_debug then
865: hr_utility.set_location('Entering:'||l_proc, 5);
866: end if;
867: --
868: -- Call all supporting business operations
869: --
876: ,p_rec => p_rec
877: );
878: --
879: if g_debug then
880: hr_utility.set_location(l_proc, 30);
881: end if;
882: --
883: -- Validate format mask
884: --
885: chk_format_mask(p_format_mask => p_rec.format_mask
886: ,p_effective_date => p_effective_date);
887: --
888: if g_debug then
889: hr_utility.set_location(l_proc, 50);
890: end if;
891: --
892: if g_debug then
893: hr_utility.set_location(' Leaving:'||l_proc, 100);
889: hr_utility.set_location(l_proc, 50);
890: end if;
891: --
892: if g_debug then
893: hr_utility.set_location(' Leaving:'||l_proc, 100);
894: end if;
895: End update_validate;
896: --
897: -- ----------------------------------------------------------------------------
904: l_proc varchar2(72) := g_package||' delete_validate';
905: --
906: Begin
907: if g_debug then
908: hr_utility.set_location('Entering:'||l_proc, 5);
909: end if;
910: --
911: -- Call all supporting business operations
912: --
912: --
913: chk_delete(p_name_format_id => p_rec.name_format_id);
914: --
915: if g_debug then
916: hr_utility.set_location(' Leaving:'||l_proc, 10);
917: end if;
918: End delete_validate;
919: --
920: end hr_nmf_bus;