47:
48: IF p_end_dt > SYSDATE THEN
49:
50:
51: p_message_name := 'IGS_OR_UNIT_END_DT_LE_CURR_DT';
52:
53:
54: RETURN FALSE;
55:
62:
63: IF p_end_dt < p_start_dt THEN
64:
65:
66: p_message_name := 'IGS_OR_UNIT_END_DT_GE_CURR_DT';
67:
68:
69: RETURN FALSE;
70:
131:
132: SELECT org_unit_cd
133:
134:
135: FROM IGS_OR_UNIT
136:
137:
138: WHERE org_unit_cd = p_org_unit_cd
139:
155:
156: FOR ou IN c_ou LOOP
157:
158:
159: p_message_name := 'IGS_OR_UNIT_ALREADY_EXISTS';
160:
161:
162: RETURN FALSE;
163:
297:
298: CURSOR c_our_ou_os_parent (
299:
300:
301: cp_org_unit_cd IGS_OR_UNIT.org_unit_cd%TYPE,
302:
303:
304: cp_start_dt IGS_OR_UNIT.start_dt%TYPE) IS
305:
300:
301: cp_org_unit_cd IGS_OR_UNIT.org_unit_cd%TYPE,
302:
303:
304: cp_start_dt IGS_OR_UNIT.start_dt%TYPE) IS
305:
306:
307: SELECT parent_org_unit_cd,
308:
312:
313: s_org_status
314:
315:
316: FROM IGS_OR_UNIT_REL,
317:
318:
319: IGS_OR_UNIT,
320:
315:
316: FROM IGS_OR_UNIT_REL,
317:
318:
319: IGS_OR_UNIT,
320:
321:
322: IGS_OR_STATUS
323:
336:
337: AND start_dt = parent_start_dt
338:
339:
340: AND IGS_OR_UNIT.org_status = IGS_OR_STATUS.org_status;
341:
342:
343: -- Fetch active child records.
344:
351:
352: child_start_dt
353:
354:
355: FROM IGS_OR_UNIT_REL,
356:
357:
358: IGS_OR_UNIT,
359:
354:
355: FROM IGS_OR_UNIT_REL,
356:
357:
358: IGS_OR_UNIT,
359:
360:
361: IGS_OR_STATUS
362:
375:
376: AND start_dt = child_start_dt
377:
378:
379: AND IGS_OR_UNIT.org_status = IGS_OR_STATUS.org_status
380:
381:
382: AND s_org_status = 'ACTIVE';
383:
828:
829: end_dt
830:
831:
832: FROM IGS_OR_UNIT
833:
834:
835: WHERE org_unit_cd = p_org_unit_cd
836:
840:
841: v_other_detail VARCHAR2(255);
842:
843:
844: v_end_dt IGS_OR_UNIT.end_dt%TYPE;
845:
846:
847: BEGIN
848: