1: Package Body ben_cpd_bus as
2: /* $Header: becpdrhi.pkb 120.4.12020000.3 2013/01/02 07:16:14 kmsuresh ship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' ben_cpd_bus.'; -- Global package name
9: --
10: -- The following two global variables are only to be
11: -- used by the return_legislation_code function.
12: --
157: ,p_argument => 'oipl_id'
158: ,p_argument_value => p_oipl_id
159: );
160: --
161: if (( nvl(ben_cpd_bus.g_pl_id, hr_api.g_number)
162: = p_pl_id)
163: and ( nvl(ben_cpd_bus.g_lf_evt_ocrd_dt, hr_api.g_date)
164: = p_lf_evt_ocrd_dt)
165: and ( nvl(ben_cpd_bus.g_oipl_id, hr_api.g_number)
159: );
160: --
161: if (( nvl(ben_cpd_bus.g_pl_id, hr_api.g_number)
162: = p_pl_id)
163: and ( nvl(ben_cpd_bus.g_lf_evt_ocrd_dt, hr_api.g_date)
164: = p_lf_evt_ocrd_dt)
165: and ( nvl(ben_cpd_bus.g_oipl_id, hr_api.g_number)
166: = p_oipl_id)) then
167: --
161: if (( nvl(ben_cpd_bus.g_pl_id, hr_api.g_number)
162: = p_pl_id)
163: and ( nvl(ben_cpd_bus.g_lf_evt_ocrd_dt, hr_api.g_date)
164: = p_lf_evt_ocrd_dt)
165: and ( nvl(ben_cpd_bus.g_oipl_id, hr_api.g_number)
166: = p_oipl_id)) then
167: --
168: -- The legislation code has already been found with a previous
169: -- call to this function. Just return the value in the global
168: -- The legislation code has already been found with a previous
169: -- call to this function. Just return the value in the global
170: -- variable.
171: --
172: l_legislation_code := ben_cpd_bus.g_legislation_code;
173: hr_utility.set_location(l_proc, 20);
174: else
175: --
176: -- The ID is different to the last call to this function
192: -- Set the global variables so the values are
193: -- available for the next call to this function.
194: --
195: close csr_leg_code;
196: ben_cpd_bus.g_pl_id := p_pl_id;
197: ben_cpd_bus.g_lf_evt_ocrd_dt := p_lf_evt_ocrd_dt;
198: ben_cpd_bus.g_oipl_id := p_oipl_id;
199: ben_cpd_bus.g_legislation_code := l_legislation_code;
200: end if;
193: -- available for the next call to this function.
194: --
195: close csr_leg_code;
196: ben_cpd_bus.g_pl_id := p_pl_id;
197: ben_cpd_bus.g_lf_evt_ocrd_dt := p_lf_evt_ocrd_dt;
198: ben_cpd_bus.g_oipl_id := p_oipl_id;
199: ben_cpd_bus.g_legislation_code := l_legislation_code;
200: end if;
201: hr_utility.set_location(' Leaving:'|| l_proc, 40);
194: --
195: close csr_leg_code;
196: ben_cpd_bus.g_pl_id := p_pl_id;
197: ben_cpd_bus.g_lf_evt_ocrd_dt := p_lf_evt_ocrd_dt;
198: ben_cpd_bus.g_oipl_id := p_oipl_id;
199: ben_cpd_bus.g_legislation_code := l_legislation_code;
200: end if;
201: hr_utility.set_location(' Leaving:'|| l_proc, 40);
202: return l_legislation_code;
195: close csr_leg_code;
196: ben_cpd_bus.g_pl_id := p_pl_id;
197: ben_cpd_bus.g_lf_evt_ocrd_dt := p_lf_evt_ocrd_dt;
198: ben_cpd_bus.g_oipl_id := p_oipl_id;
199: ben_cpd_bus.g_legislation_code := l_legislation_code;
200: end if;
201: hr_utility.set_location(' Leaving:'|| l_proc, 40);
202: return l_legislation_code;
203: end return_legislation_code;
339: --
340: hr_utility.set_location(' Leaving:'||l_proc, 10);
341: End delete_validate;
342: --
343: end ben_cpd_bus;