25: --
26: cursor csr_sec_grp is
27: select pbg.security_group_id
28: from per_business_groups pbg
29: , per_requisitions req
30: where req.requisition_id = p_requisition_id
31: and pbg.business_group_id = req.business_group_id;
32: --
33: -- Declare local variables
85: --
86: cursor csr_leg_code is
87: select pbg.legislation_code
88: from per_business_groups pbg
89: , per_requisitions req
90: where req.requisition_id = p_requisition_id
91: and pbg.business_group_id = req.business_group_id;
92: --
93: -- Declare local variables
233: -- b) During insert.
234: --
235: hr_dflex_utility.ins_or_upd_descflex_attribs
236: (p_appl_short_name => 'PER'
237: ,p_descflex_name => 'PER_REQUISITIONS'
238: ,p_attribute_category => p_rec.attribute_category
239: ,p_attribute1_name => 'ATTRIBUTE1'
240: ,p_attribute1_value => p_rec.attribute1
241: ,p_attribute2_name => 'ATTRIBUTE2'
384: --
385: -- {End Of Comments}
386: -- ----------------------------------------------------------------------------
387: Procedure chk_name
388: (p_name in per_requisitions.name%type
389: ) IS
390: --
391: l_proc varchar2(72) := g_package || 'chk_name';
392: l_name varchar2(1);
394: -- Cursor to check that the requisition name does not exist previously
395: --
396: cursor csr_name is
397: select null
398: from per_requisitions
399: where name = p_name;
400: --
401: Begin
402: hr_utility.set_location('Entering:'||l_proc,10);
426: hr_utility.set_location(' Leaving:'||l_proc,40);
427: exception
428: when app_exception.application_exception then
429: if hr_multi_message.exception_add
430: (p_associated_column1 => 'PER_REQUISITIONS.NAME'
431: ) then
432: hr_utility.set_location(' Leaving:'|| l_proc, 50);
433: raise;
434: end if;
462: --
463: -- {End Of Comments}
464: -- ----------------------------------------------------------------------------
465: Procedure chk_requisition_dates
466: (p_date_from in per_requisitions.date_from%type
467: ,p_date_to in per_requisitions.date_to%type
468: ,p_requisition_id in per_requisitions.requisition_id%type
469: ,p_object_version_number in per_requisitions.object_version_number%type
470: ) IS
463: -- {End Of Comments}
464: -- ----------------------------------------------------------------------------
465: Procedure chk_requisition_dates
466: (p_date_from in per_requisitions.date_from%type
467: ,p_date_to in per_requisitions.date_to%type
468: ,p_requisition_id in per_requisitions.requisition_id%type
469: ,p_object_version_number in per_requisitions.object_version_number%type
470: ) IS
471: --
464: -- ----------------------------------------------------------------------------
465: Procedure chk_requisition_dates
466: (p_date_from in per_requisitions.date_from%type
467: ,p_date_to in per_requisitions.date_to%type
468: ,p_requisition_id in per_requisitions.requisition_id%type
469: ,p_object_version_number in per_requisitions.object_version_number%type
470: ) IS
471: --
472: l_proc varchar2(72) := g_package || 'chk_requisition_dates';
465: Procedure chk_requisition_dates
466: (p_date_from in per_requisitions.date_from%type
467: ,p_date_to in per_requisitions.date_to%type
468: ,p_requisition_id in per_requisitions.requisition_id%type
469: ,p_object_version_number in per_requisitions.object_version_number%type
470: ) IS
471: --
472: l_proc varchar2(72) := g_package || 'chk_requisition_dates';
473: l_api_updating boolean;
490: hr_utility.set_location(l_proc, 30);
491: if(p_date_from is NULL) then
492: fnd_message.set_name('PER','PER_289466_REQ_DATE_FROM_MAND');
493: hr_multi_message.add
494: (p_associated_column1 => 'PER_REQUISITIONS.DATE_FROM'
495: );
496:
497: end if;
498: --
501: hr_utility.set_location(l_proc, 40);
502: if(p_date_from > nvl(p_date_to,hr_api.g_eot)) then
503: fnd_message.set_name('PER','IRC_ALL_DATE_START_END');
504: hr_multi_message.add
505: (p_associated_column1 => 'PER_REQUISITIONS.DATE_FROM'
506: ,p_associated_column2 => 'PER_REQUISITIONS.DATE_TO'
507: );
508: end if;
509: end if;
502: if(p_date_from > nvl(p_date_to,hr_api.g_eot)) then
503: fnd_message.set_name('PER','IRC_ALL_DATE_START_END');
504: hr_multi_message.add
505: (p_associated_column1 => 'PER_REQUISITIONS.DATE_FROM'
506: ,p_associated_column2 => 'PER_REQUISITIONS.DATE_TO'
507: );
508: end if;
509: end if;
510: --
540: --
541: -- {End Of Comments}
542: -- ----------------------------------------------------------------------------
543: Procedure chk_person_id
544: (p_person_id in per_requisitions.person_id%type
545: ,p_requisition_id in per_requisitions.requisition_id%type
546: ,p_object_version_number in per_requisitions.object_version_number%type
547: ,p_date_from in per_requisitions.date_from%type
548: ,p_date_to in per_requisitions.date_to%type
541: -- {End Of Comments}
542: -- ----------------------------------------------------------------------------
543: Procedure chk_person_id
544: (p_person_id in per_requisitions.person_id%type
545: ,p_requisition_id in per_requisitions.requisition_id%type
546: ,p_object_version_number in per_requisitions.object_version_number%type
547: ,p_date_from in per_requisitions.date_from%type
548: ,p_date_to in per_requisitions.date_to%type
549: ) IS
542: -- ----------------------------------------------------------------------------
543: Procedure chk_person_id
544: (p_person_id in per_requisitions.person_id%type
545: ,p_requisition_id in per_requisitions.requisition_id%type
546: ,p_object_version_number in per_requisitions.object_version_number%type
547: ,p_date_from in per_requisitions.date_from%type
548: ,p_date_to in per_requisitions.date_to%type
549: ) IS
550: --
543: Procedure chk_person_id
544: (p_person_id in per_requisitions.person_id%type
545: ,p_requisition_id in per_requisitions.requisition_id%type
546: ,p_object_version_number in per_requisitions.object_version_number%type
547: ,p_date_from in per_requisitions.date_from%type
548: ,p_date_to in per_requisitions.date_to%type
549: ) IS
550: --
551: l_proc varchar2(72) := g_package || 'chk_person_id';
544: (p_person_id in per_requisitions.person_id%type
545: ,p_requisition_id in per_requisitions.requisition_id%type
546: ,p_object_version_number in per_requisitions.object_version_number%type
547: ,p_date_from in per_requisitions.date_from%type
548: ,p_date_to in per_requisitions.date_to%type
549: ) IS
550: --
551: l_proc varchar2(72) := g_package || 'chk_person_id';
552: l_person_id per_requisitions.person_id%type;
548: ,p_date_to in per_requisitions.date_to%type
549: ) IS
550: --
551: l_proc varchar2(72) := g_package || 'chk_person_id';
552: l_person_id per_requisitions.person_id%type;
553: l_api_updating boolean;
554: --
555: -- Cursor to check that the person_id exists in PER_ALL_PEOPLE_F
556: --
592: hr_utility.set_location(' Leaving:'||l_proc,40);
593: exception
594: when app_exception.application_exception then
595: if hr_multi_message.exception_add
596: (p_associated_column1 => 'PER_REQUISITIONS.PERSON_ID'
597: ) then
598: hr_utility.set_location(' Leaving:'|| l_proc, 60);
599: raise;
600: end if;