42: Begin
43: --
44: hr_utility.set_location('Entering:'||l_proc, 5);
45: --
46: l_api_updating := ben_bpi_shd.api_updating
47: (p_batch_proc_id => p_batch_proc_id,
48: p_object_version_number => p_object_version_number);
49: --
50: if (l_api_updating
48: p_object_version_number => p_object_version_number);
49: --
50: if (l_api_updating
51: and nvl(p_batch_proc_id,hr_api.g_number)
52: <> ben_bpi_shd.g_old_rec.batch_proc_id) then
53: --
54: -- raise error as PK has changed
55: --
56: ben_bpi_shd.constraint_error('BEN_BATCH_PROC_INFO_PK');
52: <> ben_bpi_shd.g_old_rec.batch_proc_id) then
53: --
54: -- raise error as PK has changed
55: --
56: ben_bpi_shd.constraint_error('BEN_BATCH_PROC_INFO_PK');
57: --
58: elsif not l_api_updating then
59: --
60: -- check if PK is null
62: if p_batch_proc_id is not null then
63: --
64: -- raise error as PK is not null
65: --
66: ben_bpi_shd.constraint_error('BEN_BATCH_PROC_INFO_PK');
67: --
68: end if;
69: --
70: end if;
114: Begin
115: --
116: hr_utility.set_location('Entering:'||l_proc,5);
117: --
118: l_api_updating := ben_bpi_shd.api_updating
119: (p_batch_proc_id => p_batch_proc_id,
120: p_object_version_number => p_object_version_number);
121: --
122: if (l_api_updating
120: p_object_version_number => p_object_version_number);
121: --
122: if (l_api_updating
123: and nvl(p_benefit_action_id,hr_api.g_number)
124: <> nvl(ben_bpi_shd.g_old_rec.benefit_action_id,hr_api.g_number)
125: or not l_api_updating) then
126: --
127: -- check if benefit_action_id value exists in ben_benefit_actions table
128: --
135: --
136: -- raise error as FK does not relate to PK in ben_benefit_actions
137: -- table.
138: --
139: ben_bpi_shd.constraint_error('BEN_BATCH_PROC_INFO_FK1');
140: --
141: end if;
142: --
143: close c1;
150: --
151: -- ----------------------------------------------------------------------------
152: -- |---------------------------< insert_validate >----------------------------|
153: -- ----------------------------------------------------------------------------
154: Procedure insert_validate(p_rec in ben_bpi_shd.g_rec_type) is
155: --
156: l_proc varchar2(72) := g_package||'insert_validate';
157: --
158: Begin
177: --
178: -- ----------------------------------------------------------------------------
179: -- |---------------------------< update_validate >----------------------------|
180: -- ----------------------------------------------------------------------------
181: Procedure update_validate(p_rec in ben_bpi_shd.g_rec_type) is
182: --
183: l_proc varchar2(72) := g_package||'update_validate';
184: --
185: Begin
204: --
205: -- ----------------------------------------------------------------------------
206: -- |---------------------------< delete_validate >----------------------------|
207: -- ----------------------------------------------------------------------------
208: Procedure delete_validate(p_rec in ben_bpi_shd.g_rec_type) is
209: --
210: l_proc varchar2(72) := g_package||'delete_validate';
211: --
212: Begin