194: l_shutdown_type VARCHAR2(30);
195:
196: CURSOR CON IS
197: select count(won.prior_operation)
198: from wip_operation_networks won
199: where
200: won.wip_entity_id = p_eam_op_comp_rec.wip_entity_id and
201: won.next_operation = p_eam_op_comp_rec.operation_seq_num and
202: exists (
208: );
209:
210: CURSOR CON1 IS
211: select count(won.next_operation)
212: from wip_operation_networks won
213: where
214: won.wip_entity_id = p_eam_op_comp_rec.wip_entity_id and
215: won.prior_operation = p_eam_op_comp_rec.operation_seq_num and
216: exists (
223:
224: --added for fix to bug 3543834:
225: CURSOR CON3 IS
226: select nvl(max(actual_end_date),sysdate-20000)
227: from eam_op_completion_txns eoct,wip_operation_networks won
228: where eoct.wip_entity_id = p_eam_op_comp_rec.wip_entity_id
229: and eoct.operation_seq_num=won.prior_operation
230: and won.wip_entity_id=eoct.wip_entity_id
231: and won.next_operation=p_eam_op_comp_rec.operation_seq_num