42: Begin
43: --
44: hr_utility.set_location('Entering:'||l_proc, 5);
45: --
46: l_api_updating := ben_xrs_shd.api_updating
47: (p_ext_rslt_id => p_ext_rslt_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_ext_rslt_id,hr_api.g_number)
52: <> ben_xrs_shd.g_old_rec.ext_rslt_id) then
53: --
54: -- raise error as PK has changed
55: --
56: ben_xrs_shd.constraint_error('BEN_EXT_RSLT_PK');
52: <> ben_xrs_shd.g_old_rec.ext_rslt_id) then
53: --
54: -- raise error as PK has changed
55: --
56: ben_xrs_shd.constraint_error('BEN_EXT_RSLT_PK');
57: --
58: elsif not l_api_updating then
59: --
60: -- check if PK is null
62: if p_ext_rslt_id is not null then
63: --
64: -- raise error as PK is not null
65: --
66: ben_xrs_shd.constraint_error('BEN_EXT_RSLT_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_xrs_shd.api_updating
119: (p_ext_rslt_id => p_ext_rslt_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_ext_dfn_id,hr_api.g_number)
124: <> nvl(ben_xrs_shd.g_old_rec.ext_dfn_id,hr_api.g_number)
125: or not l_api_updating) then
126: --
127: -- check if ext_dfn_id value exists in ben_ext_dfn table
128: --
135: --
136: -- raise error as FK does not relate to PK in ben_ext_dfn
137: -- table.
138: --
139: ben_xrs_shd.constraint_error('BEN_EXT_RSLT_FK1');
140: --
141: end if;
142: --
143: close c1;
185: Begin
186: --
187: hr_utility.set_location('Entering:'||l_proc, 5);
188: --
189: l_api_updating := ben_xrs_shd.api_updating
190: (p_ext_rslt_id => p_ext_rslt_id,
191: p_object_version_number => p_object_version_number);
192: --
193: if (l_api_updating
191: p_object_version_number => p_object_version_number);
192: --
193: if (l_api_updating
194: and p_ext_stat_cd
195: <> nvl(ben_xrs_shd.g_old_rec.ext_stat_cd,hr_api.g_varchar2)
196: or not l_api_updating)
197: and p_ext_stat_cd is not null then
198: --
199: -- check if value of lookup falls within lookup type.
310:
311: -- ----------------------------------------------------------------------------
312: -- |---------------------------< insert_validate >----------------------------|
313: -- ----------------------------------------------------------------------------
314: Procedure insert_validate(p_rec in ben_xrs_shd.g_rec_type
315: ,p_effective_date in date) is
316: --
317: l_proc varchar2(72) := g_package||'insert_validate';
318: --
355: --
356: -- ----------------------------------------------------------------------------
357: -- |---------------------------< update_validate >----------------------------|
358: -- ----------------------------------------------------------------------------
359: Procedure update_validate(p_rec in ben_xrs_shd.g_rec_type
360: ,p_effective_date in date) is
361: --
362: l_proc varchar2(72) := g_package||'update_validate';
363: --
398: --
399: -- ----------------------------------------------------------------------------
400: -- |---------------------------< delete_validate >----------------------------|
401: -- ----------------------------------------------------------------------------
402: Procedure delete_validate(p_rec in ben_xrs_shd.g_rec_type
403: ,p_effective_date in date) is
404: --
405: l_proc varchar2(72) := g_package||'delete_validate';
406: --