137: AND wdj.wip_entity_id = we.wip_entity_id;
138:
139: CURSOR CON IS
140: select count(won.prior_operation)
141: from wip_operation_networks won
142: where
143: won.wip_entity_id = p_wip_entity_id and
144: won.next_operation = p_operation_seq_num and
145: exists (
150: nvl(operation_completed,'N') <> 'Y'
151: );
152: CURSOR CON1 IS
153: select count(won.next_operation)
154: from wip_operation_networks won
155: where
156: won.wip_entity_id = p_wip_entity_id and
157: won.prior_operation = p_operation_seq_num and
158: exists (
166:
167: --added for fix to bug 3543834:
168: CURSOR CON3 IS
169: select nvl(max(actual_end_date),sysdate-20000)
170: from eam_op_completion_txns eoct,wip_operation_networks won
171: where eoct.wip_entity_id = p_wip_entity_id
172: and eoct.operation_seq_num=won.prior_operation
173: and won.wip_entity_id=eoct.wip_entity_id
174: and won.next_operation=p_operation_seq_num
536:
537: l_is_last_operation := 'N';
538: select DECODE(count(won.next_operation),0,'Y','N')
539: INTO l_is_last_operation
540: from wip_operation_networks won
541: where won.wip_entity_id = p_wip_entity_id and
542: won.prior_operation =p_operation_seq_num;
543:
544: SELECT EAM_WORKFLOW_EVENT_S.NEXTVAL
621: begin
622: --fix for 3543834.changed queries to fetch correct data
623: select max(actual_end_date)
624: into l_max_prior_end_date
625: from eam_op_completion_txns eoct,wip_operation_networks won
626: where eoct.wip_entity_id = p_wip_entity_id
627: and eoct.operation_seq_num=won.prior_operation
628: and won.wip_entity_id=eoct.wip_entity_id
629: and won.next_operation=p_operation_seq_num