DBA Data[Home] [Help]

VIEW: APPS.WSM_COPY_NEXT_OPERATIONS_V

Source

View Text - Preformatted

SELECT WCO.wip_entity_id, wo.operation_seq_num fm_operation_seq_num, wo2.operation_seq_num + nvl(wp.OP_SEQ_NUM_INCREMENT,10) to_wo_operation_seq_num, wco.operation_seq_num to_wco_operation_seq_num, wo.operation_sequence_id fm_operation_seq_id, wco.operation_sequence_id to_operation_seq_id, bso.operation_code, wco.standard_operation_code next_operation_code, wco.operation_description, wco.standard_operation_id, wco.department_code, wco.department_id, wcon.recommended recommended_next_operation, wco.recommended recommended_operation from wsm_copy_operations wco, wsm_copy_op_networks wcon, wip_operations wo, wip_operations wo2, wsm_parameters wp, bom_standard_operations bso WHERE WO.wip_entity_id = WCO.wip_entity_id AND bso.standard_operation_id(+) = wo.standard_operation_id AND WCON.wip_entity_id = WCO.wip_entity_id AND WCON.from_op_seq_num=WO.WSM_OP_SEQ_NUM AND WCO.operation_sequence_id = WCON.to_op_seq_id AND WO.organization_id = WP.organization_id and wo.wip_entity_id=wo2.wip_entity_id and wo2.operation_seq_num = ( select max(operation_seq_num) from wip_operations where wip_entity_id = wo2.wip_entity_id ) UNION select wo.wip_entity_id, wo.operation_seq_num fm_operation_seq_num, wo.operation_seq_num to_wo_operation_seq_num, bos.operation_seq_num to_wco_operation_seq_num, wo.operation_sequence_id fm_operation_seq_id, bos.operation_sequence_id to_operation_seq_id, bso.operation_code, bso.operation_code next_operation_code, NVL(bso.operation_description, bos.operation_description) operation_description, wo.standard_operation_id, bd.department_code, wo.department_id, to_char(null) recommended_next_operation, to_char(null) recommended_operation from bom_operation_sequences bos, bom_standard_operations bso, bom_departments bd, wip_operations wo, wip_discrete_jobs wdj where bos.operation_sequence_id = wo.operation_sequence_id and bso.standard_operation_id(+) = bos.standard_operation_id and wo.wip_entity_id = wdj.wip_entity_id and wo.organization_id = wdj.organization_id and bd.department_id = bos.department_id UNION SELECT wo.wip_entity_id, wo.operation_seq_num fm_operation_seq_num, wo.operation_seq_num to_wo_operation_seq_num, wco.operation_seq_num to_wco_operation_seq_num, wo.operation_sequence_id fm_operation_seq_id, wco.operation_sequence_id to_operation_seq_id, bso.operation_code, bso.operation_code next_operation_code, wco.operation_description operation_description, wo.standard_operation_id, bd.department_code, wo.department_id, to_char(NULL) recommended_next_operation, to_char(NULL) recommended_operation FROM wsm_copy_operations wco, bom_standard_operations bso, bom_departments bd, wip_operations wo, wip_discrete_jobs wdj WHERE wco.operation_sequence_id = wo.operation_sequence_id AND bso.standard_operation_id(+) = wco.standard_operation_id AND wo.wip_entity_id = wdj.wip_entity_id AND wo.organization_id = wdj.organization_id AND bd.department_id = wco.department_id and wco.wip_entity_id = wdj.wip_entity_id and wo.organization_id = wdj.organization_id
View Text - HTML Formatted

SELECT WCO.WIP_ENTITY_ID
, WO.OPERATION_SEQ_NUM FM_OPERATION_SEQ_NUM
, WO2.OPERATION_SEQ_NUM + NVL(WP.OP_SEQ_NUM_INCREMENT
, 10) TO_WO_OPERATION_SEQ_NUM
, WCO.OPERATION_SEQ_NUM TO_WCO_OPERATION_SEQ_NUM
, WO.OPERATION_SEQUENCE_ID FM_OPERATION_SEQ_ID
, WCO.OPERATION_SEQUENCE_ID TO_OPERATION_SEQ_ID
, BSO.OPERATION_CODE
, WCO.STANDARD_OPERATION_CODE NEXT_OPERATION_CODE
, WCO.OPERATION_DESCRIPTION
, WCO.STANDARD_OPERATION_ID
, WCO.DEPARTMENT_CODE
, WCO.DEPARTMENT_ID
, WCON.RECOMMENDED RECOMMENDED_NEXT_OPERATION
, WCO.RECOMMENDED RECOMMENDED_OPERATION
FROM WSM_COPY_OPERATIONS WCO
, WSM_COPY_OP_NETWORKS WCON
, WIP_OPERATIONS WO
, WIP_OPERATIONS WO2
, WSM_PARAMETERS WP
, BOM_STANDARD_OPERATIONS BSO
WHERE WO.WIP_ENTITY_ID = WCO.WIP_ENTITY_ID
AND BSO.STANDARD_OPERATION_ID(+) = WO.STANDARD_OPERATION_ID
AND WCON.WIP_ENTITY_ID = WCO.WIP_ENTITY_ID
AND WCON.FROM_OP_SEQ_NUM=WO.WSM_OP_SEQ_NUM
AND WCO.OPERATION_SEQUENCE_ID = WCON.TO_OP_SEQ_ID
AND WO.ORGANIZATION_ID = WP.ORGANIZATION_ID
AND WO.WIP_ENTITY_ID=WO2.WIP_ENTITY_ID
AND WO2.OPERATION_SEQ_NUM = ( SELECT MAX(OPERATION_SEQ_NUM)
FROM WIP_OPERATIONS
WHERE WIP_ENTITY_ID = WO2.WIP_ENTITY_ID ) UNION SELECT WO.WIP_ENTITY_ID
, WO.OPERATION_SEQ_NUM FM_OPERATION_SEQ_NUM
, WO.OPERATION_SEQ_NUM TO_WO_OPERATION_SEQ_NUM
, BOS.OPERATION_SEQ_NUM TO_WCO_OPERATION_SEQ_NUM
, WO.OPERATION_SEQUENCE_ID FM_OPERATION_SEQ_ID
, BOS.OPERATION_SEQUENCE_ID TO_OPERATION_SEQ_ID
, BSO.OPERATION_CODE
, BSO.OPERATION_CODE NEXT_OPERATION_CODE
, NVL(BSO.OPERATION_DESCRIPTION
, BOS.OPERATION_DESCRIPTION) OPERATION_DESCRIPTION
, WO.STANDARD_OPERATION_ID
, BD.DEPARTMENT_CODE
, WO.DEPARTMENT_ID
, TO_CHAR(NULL) RECOMMENDED_NEXT_OPERATION
, TO_CHAR(NULL) RECOMMENDED_OPERATION
FROM BOM_OPERATION_SEQUENCES BOS
, BOM_STANDARD_OPERATIONS BSO
, BOM_DEPARTMENTS BD
, WIP_OPERATIONS WO
, WIP_DISCRETE_JOBS WDJ
WHERE BOS.OPERATION_SEQUENCE_ID = WO.OPERATION_SEQUENCE_ID
AND BSO.STANDARD_OPERATION_ID(+) = BOS.STANDARD_OPERATION_ID
AND WO.WIP_ENTITY_ID = WDJ.WIP_ENTITY_ID
AND WO.ORGANIZATION_ID = WDJ.ORGANIZATION_ID
AND BD.DEPARTMENT_ID = BOS.DEPARTMENT_ID UNION SELECT WO.WIP_ENTITY_ID
, WO.OPERATION_SEQ_NUM FM_OPERATION_SEQ_NUM
, WO.OPERATION_SEQ_NUM TO_WO_OPERATION_SEQ_NUM
, WCO.OPERATION_SEQ_NUM TO_WCO_OPERATION_SEQ_NUM
, WO.OPERATION_SEQUENCE_ID FM_OPERATION_SEQ_ID
, WCO.OPERATION_SEQUENCE_ID TO_OPERATION_SEQ_ID
, BSO.OPERATION_CODE
, BSO.OPERATION_CODE NEXT_OPERATION_CODE
, WCO.OPERATION_DESCRIPTION OPERATION_DESCRIPTION
, WO.STANDARD_OPERATION_ID
, BD.DEPARTMENT_CODE
, WO.DEPARTMENT_ID
, TO_CHAR(NULL) RECOMMENDED_NEXT_OPERATION
, TO_CHAR(NULL) RECOMMENDED_OPERATION
FROM WSM_COPY_OPERATIONS WCO
, BOM_STANDARD_OPERATIONS BSO
, BOM_DEPARTMENTS BD
, WIP_OPERATIONS WO
, WIP_DISCRETE_JOBS WDJ
WHERE WCO.OPERATION_SEQUENCE_ID = WO.OPERATION_SEQUENCE_ID
AND BSO.STANDARD_OPERATION_ID(+) = WCO.STANDARD_OPERATION_ID
AND WO.WIP_ENTITY_ID = WDJ.WIP_ENTITY_ID
AND WO.ORGANIZATION_ID = WDJ.ORGANIZATION_ID
AND BD.DEPARTMENT_ID = WCO.DEPARTMENT_ID
AND WCO.WIP_ENTITY_ID = WDJ.WIP_ENTITY_ID
AND WO.ORGANIZATION_ID = WDJ.ORGANIZATION_ID