62: from ame_approval_group_members
63: where approval_group_id = p_approval_group_id
64: and orig_system not in ('FND_USR','PER');
65: Begin
66: hr_utility.set_location('Entering:'||l_proc,10);
67:
68: -- find the value of config variable allowAllApproverTypes for the current
69: -- transaction type
70: open C_Sel1;
99: fnd_message.set_name('PER','AME_400617_APG_INV_APPR_TYPE');
100: fnd_message.set_token('GRP_NAME',l_group_name);
101: fnd_message.raise_error;
102: end if;
103: hr_utility.set_location(' Leaving:'||l_proc,30);
104: exception
105: when app_exception.application_exception then
106: if hr_multi_message.exception_add
107: (p_associated_column1 => 'AME_APPROVAL_GROUP_CONFIG.APPLICATION_ID'
105: when app_exception.application_exception then
106: if hr_multi_message.exception_add
107: (p_associated_column1 => 'AME_APPROVAL_GROUP_CONFIG.APPLICATION_ID'
108: ) then
109: hr_utility.set_location(' Leaving:'||l_proc, 40);
110: raise;
111: end if;
112: hr_utility.set_location( ' Leaving:'||l_proc,50 );
113: end chk_approver_type;
108: ) then
109: hr_utility.set_location(' Leaving:'||l_proc, 40);
110: raise;
111: end if;
112: hr_utility.set_location( ' Leaving:'||l_proc,50 );
113: end chk_approver_type;
114:
115: -- ----------------------------------------------------------------------------
116: -- |-------------------------< CHK_DELETE >---------------------------|
188: and ame_utility_pkg.is_seed_user(created_by) = ame_util.seededDataCreatedById
189: and p_effective_date between start_date
190: and nvl(end_date - (1/86400), p_effective_date);
191: Begin
192: hr_utility.set_location('Entering:'||l_proc,10);
193:
194: -- Check if the group action is being used by an active rule in
195: --current transaction type.
196: open C_Sel1;
200: fnd_message.set_name('PER','AME_400558_RULES_EXIST_FOR_APG');
201: fnd_message.raise_error;
202: end if;
203:
204: hr_utility.set_location(' Leaving:'||l_proc,30);
205: exception
206: when app_exception.application_exception then
207: if hr_multi_message.exception_add
208: (p_associated_column1 => 'AME_APPROVAL_GROUP_CONFIG.APPLICATION_ID'
206: when app_exception.application_exception then
207: if hr_multi_message.exception_add
208: (p_associated_column1 => 'AME_APPROVAL_GROUP_CONFIG.APPLICATION_ID'
209: ) then
210: hr_utility.set_location(' Leaving:'||l_proc, 40);
211: raise;
212: end if;
213: hr_utility.set_location( ' Leaving:'||l_proc,50 );
214: end chk_delete;
209: ) then
210: hr_utility.set_location(' Leaving:'||l_proc, 40);
211: raise;
212: end if;
213: hr_utility.set_location( ' Leaving:'||l_proc,50 );
214: end chk_delete;
215:
216:
217: -- ----------------------------------------------------------------------------
255: where t.application_id = p_application_id
256: and p_effective_date between t.start_date and nvl(t.end_date-(1/84600),sysdate);
257:
258: Begin
259: hr_utility.set_location('Entering:'||l_proc,10);
260: hr_api.mandatory_arg_error(p_api_name => l_proc
261: ,p_argument => 'APPLICATION_ID'
262: ,p_argument_value => p_application_id
263: );
268: if l_count = 0 then
269: fnd_message.set_name('PER','AME_400474_INV_APPLICATION_ID');
270: fnd_message.raise_error;
271: end if;
272: hr_utility.set_location(' Leaving:'||l_proc,30);
273: exception
274: when app_exception.application_exception then
275: if hr_multi_message.exception_add
276: (p_associated_column1 => 'AME_APPROVAL_GROUP_CONFIG.APPLICATION_ID'
274: when app_exception.application_exception then
275: if hr_multi_message.exception_add
276: (p_associated_column1 => 'AME_APPROVAL_GROUP_CONFIG.APPLICATION_ID'
277: ) then
278: hr_utility.set_location(' Leaving:'||l_proc, 40);
279: raise;
280: end if;
281: hr_utility.set_location( ' Leaving:'||l_proc,50 );
282: End chk_application_id;
277: ) then
278: hr_utility.set_location(' Leaving:'||l_proc, 40);
279: raise;
280: end if;
281: hr_utility.set_location( ' Leaving:'||l_proc,50 );
282: End chk_application_id;
283:
284:
285: -- ----------------------------------------------------------------------------
323: where t.approval_group_id = p_approval_group_id
324: and p_effective_date between t.start_date and t.end_date;
325:
326: Begin
327: hr_utility.set_location('Entering:'||l_proc,10);
328: hr_api.mandatory_arg_error(p_api_name => l_proc
329: ,p_argument => 'APPROVAL_GROUP_ID'
330: ,p_argument_value => p_approval_group_id
331: );
336: if l_count = 0 then
337: fnd_message.set_name('PER','AME_400557_INVALID_APG_ID');
338: fnd_message.raise_error;
339: end if;
340: hr_utility.set_location(' Leaving:'||l_proc,30);
341: exception
342: when app_exception.application_exception then
343: if hr_multi_message.exception_add
344: (p_associated_column1 => 'AME_APPROVAL_GROUP_CONFIG.APPROVAL_GROUP_ID'
342: when app_exception.application_exception then
343: if hr_multi_message.exception_add
344: (p_associated_column1 => 'AME_APPROVAL_GROUP_CONFIG.APPROVAL_GROUP_ID'
345: ) then
346: hr_utility.set_location(' Leaving:'||l_proc, 40);
347: raise;
348: end if;
349: hr_utility.set_location( ' Leaving:'||l_proc,50 );
350: End chk_approval_group_id;
345: ) then
346: hr_utility.set_location(' Leaving:'||l_proc, 40);
347: raise;
348: end if;
349: hr_utility.set_location( ' Leaving:'||l_proc,50 );
350: End chk_approval_group_id;
351:
352:
353: -- ----------------------------------------------------------------------------
381: l_proc varchar2(72) := g_package || 'CHK_VOTING_REGIME';
382: --
383:
384: Begin
385: hr_utility.set_location('Entering:'||l_proc,10);
386: hr_api.mandatory_arg_error(p_api_name => l_proc
387: ,p_argument => 'VOTING_REGIME'
388: ,p_argument_value => p_voting_regime
389: );
391: if p_voting_regime not in ('C','F','O','S') then
392: fnd_message.set_name('PER','AME_400564_APG_INVALID_VOT_REG');
393: fnd_message.raise_error;
394: end if;
395: hr_utility.set_location(' Leaving:'||l_proc,30);
396: exception
397: when app_exception.application_exception then
398: if hr_multi_message.exception_add
399: (p_associated_column1 => 'AME_APPROVAL_GROUP_CONFIG.VOTING_REGIME'
397: when app_exception.application_exception then
398: if hr_multi_message.exception_add
399: (p_associated_column1 => 'AME_APPROVAL_GROUP_CONFIG.VOTING_REGIME'
400: ) then
401: hr_utility.set_location(' Leaving:'||l_proc, 40);
402: raise;
403: end if;
404: hr_utility.set_location( ' Leaving:'||l_proc,50 );
405: End chk_voting_regime;
400: ) then
401: hr_utility.set_location(' Leaving:'||l_proc, 40);
402: raise;
403: end if;
404: hr_utility.set_location( ' Leaving:'||l_proc,50 );
405: End chk_voting_regime;
406:
407: -- ----------------------------------------------------------------------------
408: -- |-------------------------< CHK_ORDER_NUMBER >---------------------------|
435: l_proc varchar2(72) := g_package || 'CHK_ORDER_NUMBER';
436: --
437:
438: Begin
439: hr_utility.set_location('Entering:'||l_proc,10);
440: hr_api.mandatory_arg_error(p_api_name => l_proc
441: ,p_argument => 'ORDER_NUMBER'
442: ,p_argument_value => p_order_number
443: );
445: if p_order_number <= 0 then
446: fnd_message.set_name('PER','AME_400565_INVALID_ORDER_NUM');
447: fnd_message.raise_error;
448: end if;
449: hr_utility.set_location(' Leaving:'||l_proc,30);
450: exception
451: when app_exception.application_exception then
452: if hr_multi_message.exception_add
453: (p_associated_column1 => 'AME_APPROVAL_GROUP_CONFIG.ORDER_NUMBER'
451: when app_exception.application_exception then
452: if hr_multi_message.exception_add
453: (p_associated_column1 => 'AME_APPROVAL_GROUP_CONFIG.ORDER_NUMBER'
454: ) then
455: hr_utility.set_location(' Leaving:'||l_proc, 40);
456: raise;
457: end if;
458: hr_utility.set_location( ' Leaving:'||l_proc,50 );
459: End chk_order_number;
454: ) then
455: hr_utility.set_location(' Leaving:'||l_proc, 40);
456: raise;
457: end if;
458: hr_utility.set_location( ' Leaving:'||l_proc,50 );
459: End chk_order_number;
460:
461: -- ----------------------------------------------------------------------------
462: -- |-------------------------< CHK_UNIQUE >---------------------------|
497: and application_id = p_application_id
498: and sysdate between start_date and end_date;
499:
500: Begin
501: hr_utility.set_location('Entering:'||l_proc,10);
502: -- Check if the configuration already exists
503: open CSel1;
504: fetch CSel1 into l_count;
505: close CSel1;
506: if l_count <> 0 then
507: fnd_message.set_name('PER','AME_400566_APG_CFG_EXISTS');
508: fnd_message.raise_error;
509: end if;
510: hr_utility.set_location(' Leaving:'||l_proc,30);
511: exception
512: when app_exception.application_exception then
513: if hr_multi_message.exception_add
514: (p_associated_column1 => 'AME_APPROVAL_GROUP_CONFIG.APPLICATION_ID'
512: when app_exception.application_exception then
513: if hr_multi_message.exception_add
514: (p_associated_column1 => 'AME_APPROVAL_GROUP_CONFIG.APPLICATION_ID'
515: ) then
516: hr_utility.set_location(' Leaving:'||l_proc, 40);
517: raise;
518: end if;
519: hr_utility.set_location( ' Leaving:'||l_proc,50 );
520: End chk_unique;
515: ) then
516: hr_utility.set_location(' Leaving:'||l_proc, 40);
517: raise;
518: end if;
519: hr_utility.set_location( ' Leaving:'||l_proc,50 );
520: End chk_unique;
521:
522: -- ----------------------------------------------------------------------------
523: -- |-----------------------< chk_non_updateable_args >------------------------|
764: --
765: l_proc varchar2(72) := g_package||'insert_validate';
766: --
767: Begin
768: hr_utility.set_location('Entering:'||l_proc, 5);
769: --
770: -- Validate Dependent Attributes
771: --
772: --
792: );
793: /* chk_order_number(
794: p_order_number => p_rec.order_number
795: );*/
796: hr_utility.set_location(' Leaving:'||l_proc, 10);
797: End insert_validate;
798: --
799: -- ----------------------------------------------------------------------------
800: -- |---------------------------< update_validate >----------------------------|
809: --
810: l_proc varchar2(72) := g_package||'update_validate';
811: --
812: Begin
813: hr_utility.set_location('Entering:'||l_proc, 5);
814: --
815: -- Validate Dependent Attributes
816: --
817: -- Call the datetrack update integrity operation
836: chk_order_number(
837: p_order_number => p_rec.order_number
838: );
839:
840: hr_utility.set_location(' Leaving:'||l_proc, 10);
841: End update_validate;
842: --
843: -- ----------------------------------------------------------------------------
844: -- |---------------------------< delete_validate >----------------------------|
853: --
854: l_proc varchar2(72) := g_package||'delete_validate';
855: --
856: Begin
857: hr_utility.set_location('Entering:'||l_proc, 5);
858: --
859: -- Call all supporting business operations
860: --
861: dt_delete_validate
870: ,p_approval_group_id => p_rec.approval_group_id
871: ,p_effective_date => sysdate
872: );
873: --
874: hr_utility.set_location(' Leaving:'||l_proc, 10);
875: End delete_validate;
876: --
877: end ame_gcf_bus;