DBA Data[Home] [Help]

VIEW: APPS.CSF_M_TXN_SUB_TYPES_V

Source

View Text - Preformatted

SELECT acc.access_id access_id , cit.sub_type_id , cit.cs_transaction_type_id , cst.transaction_type_id , cit.src_reference_reqd , cit.src_change_owner , cit.src_change_owner_to_code , cit.src_status_id , cit.src_revision_reqd , cit.parent_reference_reqd , NVL(cst.update_ib_flag, 'N'), cit.src_return_reqd FROM csm_ib_txn_types_acc acc , csi_ib_txn_types cit , csi_source_ib_types cst , csi_txn_types ctt , csi_instance_statuses cis , cs_transaction_types_b ttb WHERE acc.sub_type_id = cit.sub_type_id AND cit.cs_transaction_type_id = ttb.transaction_type_id(+) AND ctt.source_application_id = 513 AND ctt.source_transaction_type = 'FIELD_SERVICE_REPORT' AND cst.sub_type_id = cit.sub_type_id AND ctt.transaction_type_id = cst.transaction_type_id AND cit.src_status_id = cis.instance_status_id(+) AND (NVL(cst.update_IB_flag, 'N') = 'N' OR ( cst.update_ib_flag = 'Y' and trunc(sysdate) between nvl(cis.start_date_active,trunc(sysdate)) and nvl(cis.end_date_active,trunc(sysdate)) and nvl(cis.terminated_flag, 'N') <> 'Y' and ( ( cit.src_change_owner_to_code = 'I' and nvl(cit.parent_reference_reqd, 'N') = 'N' and ttb.line_order_category_code ='RETURN' and cit.src_change_owner = 'Y' and nvl(cit.src_return_reqd, 'N') = 'N' ) or ( cit.src_change_owner_to_code = 'E' and ttb.line_order_category_code='ORDER' and cit.src_change_owner = 'Y' and nvl(cit.src_return_reqd, 'N') = 'N' ) or ( ttb.line_order_category_code='ORDER' and NVL(cit.src_change_owner,'N') = 'N' and nvl(cit.src_return_reqd, 'Y') = 'Y' AND NVL(cit.src_change_owner_to_code,'N') ='N' ) ) ) )
View Text - HTML Formatted

SELECT ACC.ACCESS_ID ACCESS_ID
, CIT.SUB_TYPE_ID
, CIT.CS_TRANSACTION_TYPE_ID
, CST.TRANSACTION_TYPE_ID
, CIT.SRC_REFERENCE_REQD
, CIT.SRC_CHANGE_OWNER
, CIT.SRC_CHANGE_OWNER_TO_CODE
, CIT.SRC_STATUS_ID
, CIT.SRC_REVISION_REQD
, CIT.PARENT_REFERENCE_REQD
, NVL(CST.UPDATE_IB_FLAG
, 'N')
, CIT.SRC_RETURN_REQD
FROM CSM_IB_TXN_TYPES_ACC ACC
, CSI_IB_TXN_TYPES CIT
, CSI_SOURCE_IB_TYPES CST
, CSI_TXN_TYPES CTT
, CSI_INSTANCE_STATUSES CIS
, CS_TRANSACTION_TYPES_B TTB
WHERE ACC.SUB_TYPE_ID = CIT.SUB_TYPE_ID
AND CIT.CS_TRANSACTION_TYPE_ID = TTB.TRANSACTION_TYPE_ID(+)
AND CTT.SOURCE_APPLICATION_ID = 513
AND CTT.SOURCE_TRANSACTION_TYPE = 'FIELD_SERVICE_REPORT'
AND CST.SUB_TYPE_ID = CIT.SUB_TYPE_ID
AND CTT.TRANSACTION_TYPE_ID = CST.TRANSACTION_TYPE_ID
AND CIT.SRC_STATUS_ID = CIS.INSTANCE_STATUS_ID(+)
AND (NVL(CST.UPDATE_IB_FLAG
, 'N') = 'N' OR ( CST.UPDATE_IB_FLAG = 'Y'
AND TRUNC(SYSDATE) BETWEEN NVL(CIS.START_DATE_ACTIVE
, TRUNC(SYSDATE))
AND NVL(CIS.END_DATE_ACTIVE
, TRUNC(SYSDATE))
AND NVL(CIS.TERMINATED_FLAG
, 'N') <> 'Y'
AND ( ( CIT.SRC_CHANGE_OWNER_TO_CODE = 'I'
AND NVL(CIT.PARENT_REFERENCE_REQD
, 'N') = 'N'
AND TTB.LINE_ORDER_CATEGORY_CODE ='RETURN'
AND CIT.SRC_CHANGE_OWNER = 'Y'
AND NVL(CIT.SRC_RETURN_REQD
, 'N') = 'N' ) OR ( CIT.SRC_CHANGE_OWNER_TO_CODE = 'E'
AND TTB.LINE_ORDER_CATEGORY_CODE='ORDER'
AND CIT.SRC_CHANGE_OWNER = 'Y'
AND NVL(CIT.SRC_RETURN_REQD
, 'N') = 'N' ) OR ( TTB.LINE_ORDER_CATEGORY_CODE='ORDER'
AND NVL(CIT.SRC_CHANGE_OWNER
, 'N') = 'N'
AND NVL(CIT.SRC_RETURN_REQD
, 'Y') = 'Y'
AND NVL(CIT.SRC_CHANGE_OWNER_TO_CODE
, 'N') ='N' ) ) ) )