[Home] [Help]
1: PACKAGE BODY flm_execution_util AS
2: /* $Header: FLMEXUTB.pls 120.22.12020000.3 2012/08/16 10:04:31 sisankar ship $ */
3:
4: G_PKG_NAME CONSTANT VARCHAR2(30) := 'FLM_EXECUTION_UTIL';
5: G_ORG_ID NUMBER := -1;
1: PACKAGE BODY flm_execution_util AS
2: /* $Header: FLMEXUTB.pls 120.22.12020000.3 2012/08/16 10:04:31 sisankar ship $ */
3:
4: G_PKG_NAME CONSTANT VARCHAR2(30) := 'FLM_EXECUTION_UTIL';
5: G_ORG_ID NUMBER := -1;
6: G_LINE_ID NUMBER := -1;
7: G_STD_OP_ID NUMBER := -1;
8: G_VIEW_ALL_SCHEDULES VARCHAR2(1) := 'U';
372: from bom_operation_networks
373: where transition_type in (1, 2)
374: start with to_op_seq_id = i_op_seq_id
375: connect by level = 1 and prior from_op_seq_id = to_op_seq_id
376: and flm_execution_util.workstation_enabled(from_op_seq_id) = 'Y';
377:
378: v_bon_exists c_bon_exists%ROWTYPE;
379: l_retStatus varchar2(1);
380: l_count number;
470: CURSOR sch_cur_op_csr IS
471: select next_op_seq_id seq_id
472: from flm_exe_operations
473: where wip_entity_id = i_wip_entity_id
474: and flm_execution_util.workstation_enabled(next_op_seq_id) = 'N'
475: order by next_op_seq_id;
476: l_view_all_sch VARCHAR2(1);
477: l_retStatus VARCHAR2(1);
478: l_enabled VARCHAR2(1);
568: END IF;
569:
570: --find out if connection from start op to this operation consist of all disbaled workstations
571: FOR op_rec IN start_op_csr LOOP
572: l_enabled := flm_execution_util.workstation_enabled(op_rec.seq_id);
573: if(l_enabled = 'N') then
574: select count(*)
575: into l_cnt
576: from bom_operation_networks
574: select count(*)
575: into l_cnt
576: from bom_operation_networks
577: where to_op_seq_id = l_op_seq_id
578: and flm_execution_util.workstation_enabled(from_op_seq_id) = 'N'
579: --and flm_execution_util.workstation_enabled(op_rec.seq_id) = 'N'
580: start with from_op_seq_id = op_rec.seq_id
581: connect by prior to_op_seq_id = from_op_seq_id
582: and transition_type in (1, 2)
575: into l_cnt
576: from bom_operation_networks
577: where to_op_seq_id = l_op_seq_id
578: and flm_execution_util.workstation_enabled(from_op_seq_id) = 'N'
579: --and flm_execution_util.workstation_enabled(op_rec.seq_id) = 'N'
580: start with from_op_seq_id = op_rec.seq_id
581: connect by prior to_op_seq_id = from_op_seq_id
582: and transition_type in (1, 2)
583: and flm_execution_util.workstation_enabled(from_op_seq_id) = 'N';
579: --and flm_execution_util.workstation_enabled(op_rec.seq_id) = 'N'
580: start with from_op_seq_id = op_rec.seq_id
581: connect by prior to_op_seq_id = from_op_seq_id
582: and transition_type in (1, 2)
583: and flm_execution_util.workstation_enabled(from_op_seq_id) = 'N';
584: IF l_cnt > 0 THEN
585: --wip_logger.log('disbaled workstations validation Y', l_retStatus);
586: RETURN 'Y';
587: END IF;
593: select count(*)
594: into l_cnt
595: from bom_operation_networks
596: where to_op_seq_id = l_op_seq_id
597: and flm_execution_util.workstation_enabled(from_op_seq_id) = 'N'
598: start with from_op_seq_id = op_rec.seq_id
599: connect by prior to_op_seq_id = from_op_seq_id
600: and transition_type in (1, 2)
601: and flm_execution_util.workstation_enabled(from_op_seq_id) = 'N';
597: and flm_execution_util.workstation_enabled(from_op_seq_id) = 'N'
598: start with from_op_seq_id = op_rec.seq_id
599: connect by prior to_op_seq_id = from_op_seq_id
600: and transition_type in (1, 2)
601: and flm_execution_util.workstation_enabled(from_op_seq_id) = 'N';
602: IF l_cnt > 0 THEN
603: --wip_logger.log('connection between current op and given lineop Y', l_retStatus);
604: RETURN 'Y';
605: END IF;
1385: if(l_rtg_seq_id is null) then
1386: return;
1387: end if;
1388:
1389: flm_execution_util.merge_backflush_comps(
1390: p_wip_ent_id => p_wip_ent_id,
1391: p_line_id => p_line_id,
1392: p_assyID => p_assyID,
1393: p_orgID => p_orgID,
2271: return l_event_exist;
2272:
2273: END event_exist;
2274:
2275: END flm_execution_util;