26: cursor csr_sec_grp is
27: select pbg.security_group_id
28: from per_business_groups pbg
29: , pqp_exception_report_groups erg
30: , pqp_exception_reports exr
31: where erg.exception_group_id = p_exception_group_id
32: and pbg.business_group_id = exr.business_group_id
33: and exr.exception_report_id = erg.exception_report_id;
34: --
88: cursor csr_leg_code is
89: select pbg.legislation_code
90: from per_business_groups pbg
91: , pqp_exception_report_groups erg
92: , pqp_exception_reports exr
93: where erg.exception_group_id = p_exception_group_id
94: and exr.exception_report_id = erg.exception_report_id
95: and pbg.business_group_id = exr.business_group_id;
96: --
291: l_dummy varchar2(1);
292: --
293: cursor c1 is
294: select null
295: from pqp_exception_reports a
296: where a.exception_report_id = p_exception_report_id;
297: --
298: Begin
299: --
314: <> nvl(pqp_erg_shd.g_old_rec.exception_report_id,hr_api.g_number)
315: or not l_api_updating) and
316: p_exception_report_id is not null then
317: --
318: -- check if exception_report_id value exists in pqp_exception_reports table
319: --
320: open c1;
321: --
322: fetch c1 into l_dummy;
323: if c1%notfound then
324: --
325: close c1;
326: --
327: -- raise error as FK does not relate to PK in pqp_exception_reports
328: -- table.
329: --
330: pqp_erg_shd.constraint_error('PQP_REPORT_GROUPS_FK1');
331: --
395: <> nvl(pqp_erg_shd.g_old_rec.consolidation_set_id,hr_api.g_number)
396: or not l_api_updating) and
397: p_consolidation_set_id is not null then
398: --
399: -- check if consolidation_set_id value exists in pqp_exception_reports table
400: --
401: open c1;
402: --
403: fetch c1 into l_dummy;
404: if c1%notfound then
405: --
406: close c1;
407: --
408: -- raise error as FK does not relate to PK in pqp_exception_reports
409: -- table.
410: --
411: pqp_erg_shd.constraint_error('PQP_REPORT_GROUPS_FK2');
412: --
476: <> nvl(pqp_erg_shd.g_old_rec.payroll_id,hr_api.g_number)
477: or not l_api_updating) and
478: p_payroll_id is not null then
479: --
480: -- check if payroll_id value exists in pqp_exception_reports table
481: --
482: open c1;
483: --
484: fetch c1 into l_dummy;
485: if c1%notfound then
486: --
487: close c1;
488: --
489: -- raise error as FK does not relate to PK in pqp_exception_reports
490: -- table.
491: --
492: pqp_erg_shd.constraint_error('PQP_REPORT_GROUPS_FK3');
493: --