[Home] [Help]
PACKAGE BODY: APPS.FF_ARC_BUS
Source
1 Package Body ff_arc_bus as
2 /* $Header: ffarcrhi.pkb 115.4 2002/12/23 13:59:55 arashid ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ff_arc_bus.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- (A.M Added) chk_non_updateable_args
12 -- ----------------------------------------------------------------------------
13 --
14 procedure chk_non_updateable_args
15 (p_rec in ff_arc_shd.g_rec_type) is
16 --
17 l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
18 l_error exception;
19 l_argument varchar2(30);
20 --
21 Begin
22 hr_utility.set_location('Entering:'||l_proc,10);
23 --
24 -- Only proceed with validation if a row exists for the current record
25 --
26 if not ff_arc_shd.api_updating
27 (p_archive_item_id => p_rec.archive_item_id,
28 p_object_version_number => p_rec.object_version_number)
29 then
30 hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
31 hr_utility.set_message_token('PROCEDURE', l_proc);
32 hr_utility.set_message_token('STEP','20');
33 end if;
34 --
35 hr_utility.set_location(l_proc,30);
36 --
37 if nvl(p_rec.user_entity_id, hr_api.g_number) <>
38 nvl(ff_arc_shd.g_old_rec.user_entity_id, hr_api.g_number) then
39 l_argument := 'user_entity_id';
40 raise l_error;
41 end if;
42 --
43 if nvl(p_rec.context1, hr_api.g_number) <>
44 nvl(ff_arc_shd.g_old_rec.context1, hr_api.g_number) then
45 l_argument := 'context1';
46 raise l_error;
47 end if;
48 --
49 if nvl(p_rec.archive_type, hr_api.g_varchar2) <>
50 nvl(ff_arc_shd.g_old_rec.archive_type, hr_api.g_varchar2) then
51 l_argument := 'archive_type';
52 raise l_error;
53 end if;
54 --
55 hr_utility.set_location(l_proc,40);
56 --
57 Exception
58 when l_error then
59 hr_api.argument_changed_error
60 (p_api_name => l_proc
61 ,p_argument => l_argument);
62 when others then raise;
63 hr_utility.set_location(l_proc,50);
64 end chk_non_updateable_args;
65
66 -- ----------------------------------------------------------------------------
67 -- |---------------------------< insert_validate >----------------------------|
68 -- ----------------------------------------------------------------------------
69 Procedure insert_validate(p_rec in ff_arc_shd.g_rec_type) is
70 --
71 l_proc varchar2(72) := g_package||'insert_validate';
72 --
73 Begin
74 hr_utility.set_location('Entering:'||l_proc, 5);
75 --
76 -- Call all supporting business operations
77 -- Check the value's data type.
78 --
79 ff_arc_shd.chk_value(p_rec.value, p_rec.user_entity_id);
80 --
81 --
82 hr_utility.set_location(' Leaving:'||l_proc, 10);
83 End insert_validate;
84 --
85 -- ----------------------------------------------------------------------------
86 -- |---------------------------< update_validate >----------------------------|
87 -- ----------------------------------------------------------------------------
88 Procedure update_validate(p_rec in ff_arc_shd.g_rec_type) is
89 --
90 l_proc varchar2(72) := g_package||'update_validate';
91 --
92 Begin
93 hr_utility.set_location('Entering:'||l_proc, 5);
94 --
95 -- Call all supporting business operations .
96 -- A.M. added call to check that the user has not tried
97 -- to update a non-updateable column.
98 --
99 chk_non_updateable_args(p_rec);
100 --
101 -- Check the value's data type.
102 --
103 ff_arc_shd.chk_value(p_rec.value, p_rec.user_entity_id);
104 --
105 hr_utility.set_location(' Leaving:'||l_proc, 10);
106 End update_validate;
107 --
108 end ff_arc_bus;