DBA Data[Home] [Help]

VIEW: APPS.EAM_PRIOR_OPERATIONS_V

Source

View Text - Preformatted

SELECT wo.operation_seq_num, wo.description, bd.department_code, lkp.meaning, wo.first_unit_start_date, wo.last_unit_completion_date, round((wo.last_unit_completion_date-wo.first_unit_start_date)*24), decode(upper(wo.operation_completed),'Y',eoct.actual_start_date,null), decode(upper(wo.operation_completed),'Y',eoct.actual_end_date,null), won.wip_entity_id, won.next_operation from wip_operations wo, eam_op_completion_txns eoct, wip_operation_networks won, bom_departments bd, fnd_lookup_values lkp WHERE (wo.wip_entity_id=won.wip_entity_id and won.wip_entity_id=eoct.wip_entity_id(+)) and (wo.operation_seq_num=won.prior_operation and won.prior_operation=eoct.operation_seq_num(+)) and bd.department_id=wo.department_id and nvl(eoct.transaction_id,0)=(select nvl(max(transaction_id),0) from eam_op_completion_txns where wip_entity_id=won.wip_entity_id and operation_seq_num=won.prior_operation) and lkp.language=userenv('LANG') and lkp.lookup_type='EAM_YES_NO' and lkp.lookup_code=nvl(wo.operation_completed,'N')
View Text - HTML Formatted

SELECT WO.OPERATION_SEQ_NUM
, WO.DESCRIPTION
, BD.DEPARTMENT_CODE
, LKP.MEANING
, WO.FIRST_UNIT_START_DATE
, WO.LAST_UNIT_COMPLETION_DATE
, ROUND((WO.LAST_UNIT_COMPLETION_DATE-WO.FIRST_UNIT_START_DATE)*24)
, DECODE(UPPER(WO.OPERATION_COMPLETED)
, 'Y'
, EOCT.ACTUAL_START_DATE
, NULL)
, DECODE(UPPER(WO.OPERATION_COMPLETED)
, 'Y'
, EOCT.ACTUAL_END_DATE
, NULL)
, WON.WIP_ENTITY_ID
, WON.NEXT_OPERATION
FROM WIP_OPERATIONS WO
, EAM_OP_COMPLETION_TXNS EOCT
, WIP_OPERATION_NETWORKS WON
, BOM_DEPARTMENTS BD
, FND_LOOKUP_VALUES LKP
WHERE (WO.WIP_ENTITY_ID=WON.WIP_ENTITY_ID
AND WON.WIP_ENTITY_ID=EOCT.WIP_ENTITY_ID(+))
AND (WO.OPERATION_SEQ_NUM=WON.PRIOR_OPERATION
AND WON.PRIOR_OPERATION=EOCT.OPERATION_SEQ_NUM(+))
AND BD.DEPARTMENT_ID=WO.DEPARTMENT_ID
AND NVL(EOCT.TRANSACTION_ID
, 0)=(SELECT NVL(MAX(TRANSACTION_ID)
, 0)
FROM EAM_OP_COMPLETION_TXNS
WHERE WIP_ENTITY_ID=WON.WIP_ENTITY_ID
AND OPERATION_SEQ_NUM=WON.PRIOR_OPERATION)
AND LKP.LANGUAGE=USERENV('LANG')
AND LKP.LOOKUP_TYPE='EAM_YES_NO'
AND LKP.LOOKUP_CODE=NVL(WO.OPERATION_COMPLETED
, 'N')