DBA Data[Home] [Help]

VIEW: APPS.MTL_TRANSACTION_DETAILS_V

Source

View Text - Preformatted

SELECT msn.gen_object_id , 2 , mmt.transaction_id , mmt.transaction_date , mp.organization_code , mmt.organization_id , mmt.subinventory_code , mmt.locator_id , mtst.transaction_source_type_name , substr(DECODE( mmt.transaction_source_type_id ,13 ,mmt.transaction_source_name , Inv_Object_Genealogy.getSource ( mmt.organization_id , mmt.transaction_source_type_id , mmt.transaction_source_id ) ),1,30) , substr(Inv_Object_Genealogy.getTradingPartner ( mmt.organization_id , mmt.transaction_source_type_id , mmt.transaction_source_id , mmt.trx_source_line_id , mmt.transfer_organization_id ),1,30) , substr(ptv.project_name, 1, 30) , ptv.task_name , 1 , mmt.transaction_uom , 1 , mmt.created_by , mmt.source_code , mmt.source_line_id , mmt.transaction_type_id , wlpn1.lpn_id , wlpn2.lpn_id , wlpn3.lpn_id , wlpn1.license_plate_number , wlpn2.license_plate_number , wlpn3.license_plate_number , mmt.original_transaction_temp_id , mmt.vendor_lot_number , null , null , null FROM mtl_unit_transactions msnt , mtl_serial_numbers msn , mtl_material_transactions mmt , mtl_txn_source_types mtst , mtl_parameters mp , pjm_tasks_v ptv , wms_license_plate_numbers wlpn1 , wms_license_plate_numbers wlpn2 , wms_license_plate_numbers wlpn3 WHERE msn.serial_number = msnt.serial_number AND msn.inventory_item_id = msnt.inventory_item_id AND msnt.transaction_id = mmt.transaction_id AND mmt.transaction_source_type_id = mtst.transaction_source_type_id AND mmt.transaction_action_id not in (24,30) AND mmt.organization_id = mp.organization_id AND mmt.project_id = ptv.project_id(+) AND mmt.task_id = ptv.task_id(+) AND mmt.lpn_id = wlpn1.lpn_id(+) AND mmt.transfer_lpn_id = wlpn2.lpn_id(+) AND mmt.content_lpn_id = wlpn3.lpn_id(+) UNION ALL (SELECT mln.gen_object_id , 1 , mmt.transaction_id , mmt.transaction_date , mp.organization_code , mmt.organization_id , mmt.subinventory_code , mmt.locator_id , mtst.transaction_source_type_name , substr(DECODE(mmt.transaction_source_type_id ,13 ,mmt.transaction_source_name , Inv_Object_Genealogy.getSource ( mmt.organization_id , mmt.transaction_source_type_id , mmt.transaction_source_id ) ),1,30) , substr(Inv_Object_Genealogy.getTradingPartner (mmt.organization_id , mmt.transaction_source_type_id , mmt.transaction_source_id , mmt.trx_source_line_id , mmt.transfer_organization_id ),1,30) , substr(ptv.project_name, 1, 30) , ptv.task_name , mtln.transaction_quantity , mmt.transaction_uom , mtln.primary_quantity , mmt.created_by , mmt.source_code , mmt.source_line_id , mmt.transaction_type_id , wlpn1.lpn_id , wlpn2.lpn_id , wlpn3.lpn_id , wlpn1.license_plate_number , wlpn2.license_plate_number , wlpn3.license_plate_number , mmt.original_transaction_temp_id , nvl( mtln.supplier_lot_number, mmt.vendor_lot_number) , mtln.lot_number , mtln.secondary_transaction_quantity , mtln.grade_code FROM mtl_transaction_lot_numbers mtln , mtl_lot_numbers mln , mtl_material_transactions mmt , mtl_txn_source_types mtst , mtl_parameters mp , pjm_tasks_v ptv , wms_license_plate_numbers wlpn1 , wms_license_plate_numbers wlpn2 , wms_license_plate_numbers wlpn3 WHERE mln.lot_number = mtln.lot_number AND mln.inventory_item_id = mtln.inventory_item_id AND mtln.transaction_id = mmt.transaction_id AND mtln.organization_id = mmt.organization_id AND mmt.transaction_source_type_id = mtst.transaction_source_type_id AND mmt.transaction_action_id not in (24,30) AND mmt.organization_id = mp.organization_id AND mmt.project_id = ptv.project_id(+) AND mmt.task_id = ptv.task_id(+) AND mmt.lpn_id = wlpn1.lpn_id(+) AND mmt.transfer_lpn_id = wlpn2.lpn_id(+) AND mmt.content_lpn_id = wlpn3.lpn_id(+)) UNION ALL (SELECT msn.gen_object_id , 2 , mmt.transaction_id , mmt.transaction_date , mp.organization_code , mmt.organization_id , mmt.subinventory_code , mmt.locator_id , mtst.transaction_source_type_name , substr(DECODE(mmt.transaction_source_type_id ,13 ,mmt.transaction_source_name , Inv_Object_Genealogy.getSource ( mmt.organization_id , mmt.transaction_source_type_id , mmt.transaction_source_id ) ),1,30) , substr(Inv_Object_Genealogy.getTradingPartner (mmt.organization_id, mmt.transaction_source_type_id, mmt.transaction_source_id, mmt.trx_source_line_id, mmt.transfer_organization_id ),1,30) , substr(ptv.project_name, 1, 30) , ptv.task_name , 1 , mmt.transaction_uom , 1 , mmt.created_by , mmt.source_code , mmt.source_line_id , mmt.transaction_type_id , wlpn1.lpn_id , wlpn2.lpn_id , wlpn3.lpn_id , wlpn1.license_plate_number , wlpn2.license_plate_number , wlpn3.license_plate_number , mmt.original_transaction_temp_id , nvl( mtln.supplier_lot_number, mmt.vendor_lot_number) , mtln.lot_number , null , null FROM mtl_unit_transactions msnt , mtl_serial_numbers msn , mtl_material_transactions mmt , mtl_txn_source_types mtst , mtl_parameters mp , pjm_tasks_v ptv , wms_license_plate_numbers wlpn1 , wms_license_plate_numbers wlpn2 , wms_license_plate_numbers wlpn3 , mtl_transaction_lot_numbers mtln WHERE msn.serial_number = msnt.serial_number AND mtln.serial_transaction_id = msnt.transaction_id AND mmt.transaction_id = mtln.transaction_id AND msn.inventory_item_id = msnt.inventory_item_id AND mmt.transaction_source_type_id = mtst.transaction_source_type_id AND mmt.transaction_action_id not in (24, 30) AND mmt.organization_id = mp.organization_id AND mmt.project_id = ptv.project_id(+) AND mmt.task_id = ptv.task_id(+) AND mmt.lpn_id = wlpn1.lpn_id(+) AND mmt.transfer_lpn_id = wlpn2.lpn_id(+) AND mmt.content_lpn_id = wlpn3.lpn_id(+))
View Text - HTML Formatted

SELECT MSN.GEN_OBJECT_ID
, 2
, MMT.TRANSACTION_ID
, MMT.TRANSACTION_DATE
, MP.ORGANIZATION_CODE
, MMT.ORGANIZATION_ID
, MMT.SUBINVENTORY_CODE
, MMT.LOCATOR_ID
, MTST.TRANSACTION_SOURCE_TYPE_NAME
, SUBSTR(DECODE( MMT.TRANSACTION_SOURCE_TYPE_ID
, 13
, MMT.TRANSACTION_SOURCE_NAME
, INV_OBJECT_GENEALOGY.GETSOURCE ( MMT.ORGANIZATION_ID
, MMT.TRANSACTION_SOURCE_TYPE_ID
, MMT.TRANSACTION_SOURCE_ID ) )
, 1
, 30)
, SUBSTR(INV_OBJECT_GENEALOGY.GETTRADINGPARTNER ( MMT.ORGANIZATION_ID
, MMT.TRANSACTION_SOURCE_TYPE_ID
, MMT.TRANSACTION_SOURCE_ID
, MMT.TRX_SOURCE_LINE_ID
, MMT.TRANSFER_ORGANIZATION_ID )
, 1
, 30)
, SUBSTR(PTV.PROJECT_NAME
, 1
, 30)
, PTV.TASK_NAME
, 1
, MMT.TRANSACTION_UOM
, 1
, MMT.CREATED_BY
, MMT.SOURCE_CODE
, MMT.SOURCE_LINE_ID
, MMT.TRANSACTION_TYPE_ID
, WLPN1.LPN_ID
, WLPN2.LPN_ID
, WLPN3.LPN_ID
, WLPN1.LICENSE_PLATE_NUMBER
, WLPN2.LICENSE_PLATE_NUMBER
, WLPN3.LICENSE_PLATE_NUMBER
, MMT.ORIGINAL_TRANSACTION_TEMP_ID
, MMT.VENDOR_LOT_NUMBER
, NULL
, NULL
, NULL
FROM MTL_UNIT_TRANSACTIONS MSNT
, MTL_SERIAL_NUMBERS MSN
, MTL_MATERIAL_TRANSACTIONS MMT
, MTL_TXN_SOURCE_TYPES MTST
, MTL_PARAMETERS MP
, PJM_TASKS_V PTV
, WMS_LICENSE_PLATE_NUMBERS WLPN1
, WMS_LICENSE_PLATE_NUMBERS WLPN2
, WMS_LICENSE_PLATE_NUMBERS WLPN3
WHERE MSN.SERIAL_NUMBER = MSNT.SERIAL_NUMBER
AND MSN.INVENTORY_ITEM_ID = MSNT.INVENTORY_ITEM_ID
AND MSNT.TRANSACTION_ID = MMT.TRANSACTION_ID
AND MMT.TRANSACTION_SOURCE_TYPE_ID = MTST.TRANSACTION_SOURCE_TYPE_ID
AND MMT.TRANSACTION_ACTION_ID NOT IN (24
, 30)
AND MMT.ORGANIZATION_ID = MP.ORGANIZATION_ID
AND MMT.PROJECT_ID = PTV.PROJECT_ID(+)
AND MMT.TASK_ID = PTV.TASK_ID(+)
AND MMT.LPN_ID = WLPN1.LPN_ID(+)
AND MMT.TRANSFER_LPN_ID = WLPN2.LPN_ID(+)
AND MMT.CONTENT_LPN_ID = WLPN3.LPN_ID(+) UNION ALL (SELECT MLN.GEN_OBJECT_ID
, 1
, MMT.TRANSACTION_ID
, MMT.TRANSACTION_DATE
, MP.ORGANIZATION_CODE
, MMT.ORGANIZATION_ID
, MMT.SUBINVENTORY_CODE
, MMT.LOCATOR_ID
, MTST.TRANSACTION_SOURCE_TYPE_NAME
, SUBSTR(DECODE(MMT.TRANSACTION_SOURCE_TYPE_ID
, 13
, MMT.TRANSACTION_SOURCE_NAME
, INV_OBJECT_GENEALOGY.GETSOURCE ( MMT.ORGANIZATION_ID
, MMT.TRANSACTION_SOURCE_TYPE_ID
, MMT.TRANSACTION_SOURCE_ID ) )
, 1
, 30)
, SUBSTR(INV_OBJECT_GENEALOGY.GETTRADINGPARTNER (MMT.ORGANIZATION_ID
, MMT.TRANSACTION_SOURCE_TYPE_ID
, MMT.TRANSACTION_SOURCE_ID
, MMT.TRX_SOURCE_LINE_ID
, MMT.TRANSFER_ORGANIZATION_ID )
, 1
, 30)
, SUBSTR(PTV.PROJECT_NAME
, 1
, 30)
, PTV.TASK_NAME
, MTLN.TRANSACTION_QUANTITY
, MMT.TRANSACTION_UOM
, MTLN.PRIMARY_QUANTITY
, MMT.CREATED_BY
, MMT.SOURCE_CODE
, MMT.SOURCE_LINE_ID
, MMT.TRANSACTION_TYPE_ID
, WLPN1.LPN_ID
, WLPN2.LPN_ID
, WLPN3.LPN_ID
, WLPN1.LICENSE_PLATE_NUMBER
, WLPN2.LICENSE_PLATE_NUMBER
, WLPN3.LICENSE_PLATE_NUMBER
, MMT.ORIGINAL_TRANSACTION_TEMP_ID
, NVL( MTLN.SUPPLIER_LOT_NUMBER
, MMT.VENDOR_LOT_NUMBER)
, MTLN.LOT_NUMBER
, MTLN.SECONDARY_TRANSACTION_QUANTITY
, MTLN.GRADE_CODE
FROM MTL_TRANSACTION_LOT_NUMBERS MTLN
, MTL_LOT_NUMBERS MLN
, MTL_MATERIAL_TRANSACTIONS MMT
, MTL_TXN_SOURCE_TYPES MTST
, MTL_PARAMETERS MP
, PJM_TASKS_V PTV
, WMS_LICENSE_PLATE_NUMBERS WLPN1
, WMS_LICENSE_PLATE_NUMBERS WLPN2
, WMS_LICENSE_PLATE_NUMBERS WLPN3
WHERE MLN.LOT_NUMBER = MTLN.LOT_NUMBER
AND MLN.INVENTORY_ITEM_ID = MTLN.INVENTORY_ITEM_ID
AND MTLN.TRANSACTION_ID = MMT.TRANSACTION_ID
AND MTLN.ORGANIZATION_ID = MMT.ORGANIZATION_ID
AND MMT.TRANSACTION_SOURCE_TYPE_ID = MTST.TRANSACTION_SOURCE_TYPE_ID
AND MMT.TRANSACTION_ACTION_ID NOT IN (24
, 30)
AND MMT.ORGANIZATION_ID = MP.ORGANIZATION_ID
AND MMT.PROJECT_ID = PTV.PROJECT_ID(+)
AND MMT.TASK_ID = PTV.TASK_ID(+)
AND MMT.LPN_ID = WLPN1.LPN_ID(+)
AND MMT.TRANSFER_LPN_ID = WLPN2.LPN_ID(+)
AND MMT.CONTENT_LPN_ID = WLPN3.LPN_ID(+)) UNION ALL (SELECT MSN.GEN_OBJECT_ID
, 2
, MMT.TRANSACTION_ID
, MMT.TRANSACTION_DATE
, MP.ORGANIZATION_CODE
, MMT.ORGANIZATION_ID
, MMT.SUBINVENTORY_CODE
, MMT.LOCATOR_ID
, MTST.TRANSACTION_SOURCE_TYPE_NAME
, SUBSTR(DECODE(MMT.TRANSACTION_SOURCE_TYPE_ID
, 13
, MMT.TRANSACTION_SOURCE_NAME
, INV_OBJECT_GENEALOGY.GETSOURCE ( MMT.ORGANIZATION_ID
, MMT.TRANSACTION_SOURCE_TYPE_ID
, MMT.TRANSACTION_SOURCE_ID ) )
, 1
, 30)
, SUBSTR(INV_OBJECT_GENEALOGY.GETTRADINGPARTNER (MMT.ORGANIZATION_ID
, MMT.TRANSACTION_SOURCE_TYPE_ID
, MMT.TRANSACTION_SOURCE_ID
, MMT.TRX_SOURCE_LINE_ID
, MMT.TRANSFER_ORGANIZATION_ID )
, 1
, 30)
, SUBSTR(PTV.PROJECT_NAME
, 1
, 30)
, PTV.TASK_NAME
, 1
, MMT.TRANSACTION_UOM
, 1
, MMT.CREATED_BY
, MMT.SOURCE_CODE
, MMT.SOURCE_LINE_ID
, MMT.TRANSACTION_TYPE_ID
, WLPN1.LPN_ID
, WLPN2.LPN_ID
, WLPN3.LPN_ID
, WLPN1.LICENSE_PLATE_NUMBER
, WLPN2.LICENSE_PLATE_NUMBER
, WLPN3.LICENSE_PLATE_NUMBER
, MMT.ORIGINAL_TRANSACTION_TEMP_ID
, NVL( MTLN.SUPPLIER_LOT_NUMBER
, MMT.VENDOR_LOT_NUMBER)
, MTLN.LOT_NUMBER
, NULL
, NULL
FROM MTL_UNIT_TRANSACTIONS MSNT
, MTL_SERIAL_NUMBERS MSN
, MTL_MATERIAL_TRANSACTIONS MMT
, MTL_TXN_SOURCE_TYPES MTST
, MTL_PARAMETERS MP
, PJM_TASKS_V PTV
, WMS_LICENSE_PLATE_NUMBERS WLPN1
, WMS_LICENSE_PLATE_NUMBERS WLPN2
, WMS_LICENSE_PLATE_NUMBERS WLPN3
, MTL_TRANSACTION_LOT_NUMBERS MTLN
WHERE MSN.SERIAL_NUMBER = MSNT.SERIAL_NUMBER
AND MTLN.SERIAL_TRANSACTION_ID = MSNT.TRANSACTION_ID
AND MMT.TRANSACTION_ID = MTLN.TRANSACTION_ID
AND MSN.INVENTORY_ITEM_ID = MSNT.INVENTORY_ITEM_ID
AND MMT.TRANSACTION_SOURCE_TYPE_ID = MTST.TRANSACTION_SOURCE_TYPE_ID
AND MMT.TRANSACTION_ACTION_ID NOT IN (24
, 30)
AND MMT.ORGANIZATION_ID = MP.ORGANIZATION_ID
AND MMT.PROJECT_ID = PTV.PROJECT_ID(+)
AND MMT.TASK_ID = PTV.TASK_ID(+)
AND MMT.LPN_ID = WLPN1.LPN_ID(+)
AND MMT.TRANSFER_LPN_ID = WLPN2.LPN_ID(+)
AND MMT.CONTENT_LPN_ID = WLPN3.LPN_ID(+))