40: l_api_updating boolean;
41: --
42: Begin
43: --
44: hr_utility.set_location('Entering:'||l_proc, 5);
45: --
46: l_api_updating := per_pss_shd.api_updating
47: (p_salary_survey_id => p_salary_survey_id,
48: p_object_version_number => p_object_version_number);
68: end if;
69: --
70: end if;
71: --
72: hr_utility.set_location('Leaving:'||l_proc, 10);
73: --
74: End chk_salary_survey_id;
75: --
76: --
125: and salary_survey_id <> nvl(p_salary_survey_id,hr_api.g_number);
126: --
127: Begin
128: --
129: hr_utility.set_location('Entering:'||l_proc, 5);
130: --
131: -- Check that survey_name is not null. Error if it is.
132: --
133: if p_survey_name is null then
134: fnd_message.set_name('PER','PER_50331_PSS_MAND_SURV_NAME');
135: fnd_message.raise_error;
136: end if;
137: --
138: hr_utility.set_location('Entering:'||l_proc, 10);
139: --
140: -- Check that survey_company_code is not null. Error if it is.
141: --
142: if p_survey_company_code is null then
143: fnd_message.set_name('PER','PER_50332_PSS_MAND_SURV_COMP');
144: fnd_message.raise_error;
145: end if;
146: --
147: hr_utility.set_location('Entering:'||l_proc, 15);
148: --
149: -- Only proceed with validation if:
150: -- The current g_old_rec is current and
151: -- The survey_name value has changed or
156: (p_salary_survey_id => p_salary_survey_id
157: ,p_object_version_number => p_object_version_number
158: );
159: --
160: hr_utility.set_location(l_proc, 20);
161: --
162: if ((l_api_updating
163: and nvl(per_pss_shd.g_old_rec.survey_name, hr_api.g_varchar2)
164: <> nvl(p_survey_name,hr_api.g_varchar2))
172: --
173: -- c) Check that survey_name forms a unique combination with
174: -- survey_company_code.
175: --
176: hr_utility.set_location(l_proc, 25);
177: --
178: open csr_unique_surv_name_comp_code;
179: --
180: fetch csr_unique_surv_name_comp_code into l_exists;
185: 'PER_SALARY_SURVEYS_UK1');
186: --
187: end if;
188: --
189: hr_utility.set_location(l_proc, 30);
190: --
191: end if;
192: --
193: hr_utility.set_location('Leaving:'||l_proc, 35);
189: hr_utility.set_location(l_proc, 30);
190: --
191: end if;
192: --
193: hr_utility.set_location('Leaving:'||l_proc, 35);
194: --
195: End chk_survey_name_company_code;
196: --
197: -- ---------------------------------------------------------------
236: g_package||'chk_survey_company_code';
237: l_api_updating boolean;
238: --
239: begin
240: hr_utility.set_location('Entering:'|| l_proc, 10);
241: --
242: -- Check mandatory parameters have been set
243: --
244: hr_api.mandatory_arg_error
258: hr_api.g_varchar2))
259: or
260: (p_salary_survey_id is null)) then
261: --
262: hr_utility.set_location(l_proc, 20);
263: --
264: -- If survey_company_code is not null then
265: -- Check if the survey_company_code value exists
266: -- in hr_standard_lookups where the lookup_type is 'SURVEY_COMPANY'
278: fnd_message.raise_error;
279: end if;
280: -- code change ended for bug5439193 by amigarg
281: --
282: hr_utility.set_location(l_proc, 30);
283: --
284: end if;
285: end if;
286: --
283: --
284: end if;
285: end if;
286: --
287: hr_utility.set_location(' Leaving:'|| l_proc, 40);
288: --
289: end chk_survey_company_code;
290: --
291: -- ---------------------------------------------------------------
323: l_api_updating boolean;
324: --
325: begin
326: --
327: hr_utility.set_location('Entering:'||l_proc, 10);
328: --
329: -- Check that identifier is not null.
330: --
331: if p_identifier is null then
332: fnd_message.set_name('PER','PER_50334_PSS_MAND_IDENTIFIER');
333: fnd_message.raise_error;
334: end if;
335: --
336: hr_utility.set_location('Leaving:'||l_proc, 20);
337: --
338: end chk_identifier;
339: --
340: /*ras
386: from fnd_currencies_vl fcv
387: where fcv.currency_code = p_currency_code;
388: --
389: begin
390: hr_utility.set_location('Entering:'|| l_proc, 10);
391: hr_utility.set_location(l_proc, 15);
392: --
393: -- Check that currency_code is not null
394: --
387: where fcv.currency_code = p_currency_code;
388: --
389: begin
390: hr_utility.set_location('Entering:'|| l_proc, 10);
391: hr_utility.set_location(l_proc, 15);
392: --
393: -- Check that currency_code is not null
394: --
395: if p_currency_code is null then
396: fnd_message.set_name('PER','PER_50335_PSS_MAND_CURRENCY');
397: fnd_message.raise_error;
398: end if;
399: --
400: hr_utility.set_location(l_proc, 17);
401: --
402: -- Only proceed with validation if:
403: -- a) During update, the value has actually changed to
404: -- another not null value.
410: hr_api.g_varchar2))
411: or
412: (p_salary_survey_id is null)) then
413: --
414: hr_utility.set_location(l_proc, 20);
415: --
416: -- If currency_code is not null then
417: -- Check if the currency_code value exists
418: -- in fnd_currencies_vl.
430: fnd_message.raise_error;
431: --
432: end if;
433: --
434: hr_utility.set_location(l_proc, 30);
435: --
436: end if;
437: --
438: hr_utility.set_location(' Leaving:'|| l_proc, 40);
434: hr_utility.set_location(l_proc, 30);
435: --
436: end if;
437: --
438: hr_utility.set_location(' Leaving:'|| l_proc, 40);
439: --
440: end chk_currency_code; ras */
441: --
442: -- ---------------------------------------------------------------
482: g_package||'chk_survey_type_code';
483: l_api_updating boolean;
484: --
485: begin
486: hr_utility.set_location('Entering:'|| l_proc, 10);
487: --
488: -- Check mandatory parameters have been set
489: --
490: hr_api.mandatory_arg_error
499: fnd_message.set_name('PER', 'PER_50337_PSS_MAND_SURV_TYPE');
500: fnd_message.raise_error;
501: end if;
502: --
503: hr_utility.set_location('Entering:'|| l_proc, 15);
504: --
505: -- Only proceed with validation if:
506: -- a) During update, the value has actually changed to
507: -- another not null value.
513: hr_api.g_varchar2))
514: or
515: (p_salary_survey_id is null)) then
516: --
517: hr_utility.set_location(l_proc, 20);
518: --
519: -- If survey_type_code is not null then
520: -- Check if the survey_type_code value exists
521: -- in hr_standard_lookups where the lookup_type is 'PAY_BASIS'
529: fnd_message.set_name('PER', 'PER_50338_PSS_INV_SURV_TYPE');
530: fnd_message.raise_error;
531: end if;
532: --
533: hr_utility.set_location(l_proc, 30);
534: --
535: end if;
536: --
537: hr_utility.set_location(' Leaving:'|| l_proc, 40);
533: hr_utility.set_location(l_proc, 30);
534: --
535: end if;
536: --
537: hr_utility.set_location(' Leaving:'|| l_proc, 40);
538: --
539: end chk_survey_type_code;
540:
541: --
580: --
581: --
582: Begin
583: --
584: hr_utility.set_location('Entering:'||l_proc, 10);
585: --
586: open csr_survey_line_exists;
587: --
588: fetch csr_survey_line_exists into l_exists;
597: end if;
598: --
599: close csr_survey_line_exists;
600: --
601: hr_utility.set_location('Entering:'||l_proc, 20);
602: --
603: End chk_delete;
604: --
605: --
640: l_error exception;
641: l_argument varchar2(30);
642: --
643: Begin
644: hr_utility.set_location('Entering:'||l_proc, 10);
645: --
646: -- Only proceed with validation if a row exists for
647: -- the current record in the HR Schema
648: --
649: if not per_pss_shd.api_updating
650: (p_salary_survey_id => p_rec.salary_survey_id
651: ,p_object_version_number => p_rec.object_version_number
652: ) then
653: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
654: hr_utility.set_message_token('PROCEDURE', l_proc);
655: hr_utility.set_message_token('STEP', '20');
656: end if;
657: --
650: (p_salary_survey_id => p_rec.salary_survey_id
651: ,p_object_version_number => p_rec.object_version_number
652: ) then
653: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
654: hr_utility.set_message_token('PROCEDURE', l_proc);
655: hr_utility.set_message_token('STEP', '20');
656: end if;
657: --
658: hr_utility.set_location(l_proc, 30);
651: ,p_object_version_number => p_rec.object_version_number
652: ) then
653: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
654: hr_utility.set_message_token('PROCEDURE', l_proc);
655: hr_utility.set_message_token('STEP', '20');
656: end if;
657: --
658: hr_utility.set_location(l_proc, 30);
659: --
654: hr_utility.set_message_token('PROCEDURE', l_proc);
655: hr_utility.set_message_token('STEP', '20');
656: end if;
657: --
658: hr_utility.set_location(l_proc, 30);
659: --
660: if nvl(p_rec.survey_company_code, hr_api.g_varchar2) <>
661: nvl(per_pss_shd.g_old_rec.survey_company_code,hr_api.g_varchar2)
662: then
663: l_argument := 'survey_company_code';
664: raise l_error;
665: end if;
666: --
667: hr_utility.set_location(l_proc, 40);
668: --
669: if nvl(p_rec.identifier, hr_api.g_varchar2) <>
670: nvl(per_pss_shd.g_old_rec.identifier,hr_api.g_varchar2)
671: then
672: l_argument := 'identifier';
673: raise l_error;
674: end if;
675: --
676: hr_utility.set_location(l_proc, 50);
677: --
678: exception
679: when l_error then
680: hr_api.argument_changed_error
682: ,p_argument => l_argument
683: );
684: when others then
685: raise;
686: hr_utility.set_location(' Leaving:'||l_proc, 60);
687: end chk_non_updateable_args;
688: --
689: --
690: --
720: --
721: l_proc varchar2(72) := g_package||'chk_df';
722: --
723: begin
724: hr_utility.set_location('Entering:'||l_proc, 10);
725: --
726: if ((p_rec.salary_survey_id is not null) and (
727: nvl(per_pss_shd.g_old_rec.attribute_category, hr_api.g_varchar2) <>
728: nvl(p_rec.attribute_category, hr_api.g_varchar2) or
821: );
822:
823: end if;
824: --
825: hr_utility.set_location(' Leaving:'||l_proc, 20);
826: end chk_df;
827:
828: --
829: -- ----------------------------------------------------------------------------
834: --
835: l_proc varchar2(72) := g_package||'insert_validate';
836: --
837: Begin
838: hr_utility.set_location('Entering:'||l_proc, 5);
839: --
840: -- Call all supporting business operations
841: --
842: -- a) Check SALARY_SURVEY_ID.
843: --
844: chk_salary_survey_id(p_salary_survey_id => p_rec.salary_survey_id
845: ,p_object_version_number => p_rec.object_version_number);
846: --
847: hr_utility.set_location(l_proc, 10);
848: --
849: -- b) Check SURVEY_NAME and SURVEY_COMPANY_CODE.
850: --
851: chk_survey_name_company_code(p_salary_survey_id => p_rec.salary_survey_id
852: ,p_object_version_number => p_rec.object_version_number
853: ,p_survey_name => p_rec.survey_name
854: ,p_survey_company_code => p_rec.survey_company_code);
855: --
856: hr_utility.set_location(l_proc, 15);
857: --
858: -- c) Check SURVEY_COMPANY_CODE specific rules.
859: --
860: chk_survey_company_code(p_salary_survey_id => p_rec.salary_survey_id
860: chk_survey_company_code(p_salary_survey_id => p_rec.salary_survey_id
861: ,p_survey_company_code => p_rec.survey_company_code
862: ,p_effective_date => p_effective_date);
863: --
864: hr_utility.set_location(l_proc, 20);
865: --
866: -- d) Check IDENTIFIER.
867: --
868: chk_identifier(p_identifier => p_rec.identifier);
866: -- d) Check IDENTIFIER.
867: --
868: chk_identifier(p_identifier => p_rec.identifier);
869: --
870: hr_utility.set_location(l_proc, 25);
871: --
872: -- e) Check CURRENCY_CODE.
873: --
874: --ras chk_currency_code(p_salary_survey_id => p_rec.salary_survey_id
873: --
874: --ras chk_currency_code(p_salary_survey_id => p_rec.salary_survey_id
875: --ras ,p_currency_code => p_rec.currency_code);
876: --
877: hr_utility.set_location(l_proc, 27);
878: --
879: -- f) Check SURVEY_TYPE_CODE.
880: --
881: chk_survey_type_code(p_salary_survey_id => p_rec.salary_survey_id
881: chk_survey_type_code(p_salary_survey_id => p_rec.salary_survey_id
882: ,p_survey_type_code => p_rec.survey_type_code
883: ,p_effective_date => p_effective_date);
884: --
885: hr_utility.set_location(l_proc, 30);
886: --
887:
888: --
889: -- Call descriptive flexfield validation routines
889: -- Call descriptive flexfield validation routines
890: --
891: per_pss_bus.chk_df(p_rec => p_rec);
892: --
893: hr_utility.set_location(' Leaving:'||l_proc, 35);
894: --
895: End insert_validate;
896: --
897: -- ----------------------------------------------------------------------------
902: --
903: l_proc varchar2(72) := g_package||'update_validate';
904: --
905: Begin
906: hr_utility.set_location('Entering:'||l_proc, 5);
907: --
908: -- Call all supporting business operations
909: --
910: -- a) Check for non updateable arguments.
911: --
912: chk_non_updateable_args(p_rec => p_rec
913: ,p_effective_date => p_effective_date);
914: --
915: hr_utility.set_location(l_proc, 10);
916: --
917: -- b) Check SALARY_SURVEY_ID.
918: --
919: chk_salary_survey_id(p_salary_survey_id => p_rec.salary_survey_id
918: --
919: chk_salary_survey_id(p_salary_survey_id => p_rec.salary_survey_id
920: ,p_object_version_number => p_rec.object_version_number);
921: --
922: hr_utility.set_location(l_proc, 15);
923: --
924: -- c) Check SURVEY_NAME and SURVEY_COMPANY_CODE have a unique combination.
925: --
926: chk_survey_name_company_code(p_salary_survey_id => p_rec.salary_survey_id
927: ,p_object_version_number => p_rec.object_version_number
928: ,p_survey_name => p_rec.survey_name
929: ,p_survey_company_code => p_rec.survey_company_code);
930: --
931: hr_utility.set_location(l_proc, 20);
932: --
933: -- d) Check CURRENCY_CODE.
934: --
935: --ras chk_currency_code(p_salary_survey_id => p_rec.salary_survey_id
934: --
935: --ras chk_currency_code(p_salary_survey_id => p_rec.salary_survey_id
936: --ras ,p_currency_code => p_rec.currency_code);
937: --
938: hr_utility.set_location(l_proc, 23);
939: --
940: -- e) Check SURVEY_TYPE_CODE.
941: --
942: chk_survey_type_code(p_salary_survey_id => p_rec.salary_survey_id
942: chk_survey_type_code(p_salary_survey_id => p_rec.salary_survey_id
943: ,p_survey_type_code => p_rec.survey_type_code
944: ,p_effective_date => p_effective_date);
945: --
946: hr_utility.set_location(l_proc, 25);
947: --
948: --
949: -- Call descriptive flexfield validation routines
950: --
949: -- Call descriptive flexfield validation routines
950: --
951: per_pss_bus.chk_df(p_rec => p_rec);
952: --
953: hr_utility.set_location(' Leaving:'||l_proc, 35);
954: --
955: End update_validate;
956: --
957: -- ----------------------------------------------------------------------------
961: --
962: l_proc varchar2(72) := g_package||'delete_validate';
963: --
964: Begin
965: hr_utility.set_location('Entering:'||l_proc, 5);
966: --
967: -- Call all supporting business operations
968: --
969: -- Check there are no rows in PER_SALARY_SURVEY_LINES.
969: -- Check there are no rows in PER_SALARY_SURVEY_LINES.
970: --
971: chk_delete(p_salary_survey_id => p_rec.salary_survey_id);
972: --
973: hr_utility.set_location(' Leaving:'||l_proc, 10);
974: End delete_validate;
975: --
976: end per_pss_bus;