132: else
133: begin
134: select 'Y' into l_hr_exists from dual
135: where exists
136: (select * from mtl_object_genealogy
137: where object_id = l_gen_object_id);
138: exception
139: when no_data_found then
140: l_hr_exists := 'N';
156:
157: -- Bug # 3372982
158: SELECT COUNT(*)
159: INTO l_parent_exists_in_mog
160: FROM mtl_object_genealogy mog, mtl_serial_numbers msn
161: WHERE mog.object_id = l_gen_object_id
162: AND msn.gen_object_id = mog.parent_object_id
163: AND mog.genealogy_type = 5
164: AND mog.start_date_active = l_pn_start_date