DBA Data[Home] [Help]

VIEW: APPS.CSD_RETURNS_BI_RCV_TXNS_V

Source

View Text - Preformatted

SELECT oh.header_id order_header_id, oe.line_id order_line_id, oe.inventory_item_id, mtl.primary_uom_code, rcv.quantity received_quantity, rcv.uom_code quantity_uom_code, rcv.organization_id inventory_org_id, trunc(rcv.transaction_date) transaction_date, oe.return_reason_code, csd.return_stream_code, oe.org_id operating_unit_id, (mtl.unit_weight*csd_returns_bi_util.convert_inv_uom( rcv.quantity, rcv.uom_code, mtl.primary_uom_code , null )) received_weight, mtl.weight_uom_code, (cic.item_cost* csd_returns_bi_util.convert_inv_uom( rcv.quantity, rcv.uom_code, mtl.primary_uom_code , null )) received_value, gl.currency_code from oe_order_lines_all oe, oe_order_headers_all oh , rcv_transactions rcv, mtl_system_items_kfv mtl, cst_item_costs cic, gl_sets_of_books gl, hr_operating_units hr, csd_return_stream_reasons csd WHERE oe.header_id = oh.header_id and rcv.oe_order_line_id = oe.line_id and rcv.oe_order_header_id = oe.header_id and rcv.transaction_type = 'DELIVER' and rcv.source_document_code = 'RMA' and mtl.inventory_item_id = oe.inventory_item_id and mtl.organization_id = rcv.organization_id and cic.inventory_item_id(+) = mtl.inventory_item_id and cic.organization_id(+) = mtl.organization_id and cic.cost_type_id(+) = 1 and hr.set_of_books_id = gl.set_of_books_id and hr.organization_id = oe.org_id and oe.return_reason_code = csd.return_reason_code
View Text - HTML Formatted

SELECT OH.HEADER_ID ORDER_HEADER_ID
, OE.LINE_ID ORDER_LINE_ID
, OE.INVENTORY_ITEM_ID
, MTL.PRIMARY_UOM_CODE
, RCV.QUANTITY RECEIVED_QUANTITY
, RCV.UOM_CODE QUANTITY_UOM_CODE
, RCV.ORGANIZATION_ID INVENTORY_ORG_ID
, TRUNC(RCV.TRANSACTION_DATE) TRANSACTION_DATE
, OE.RETURN_REASON_CODE
, CSD.RETURN_STREAM_CODE
, OE.ORG_ID OPERATING_UNIT_ID
, (MTL.UNIT_WEIGHT*CSD_RETURNS_BI_UTIL.CONVERT_INV_UOM( RCV.QUANTITY
, RCV.UOM_CODE
, MTL.PRIMARY_UOM_CODE
, NULL )) RECEIVED_WEIGHT
, MTL.WEIGHT_UOM_CODE
, (CIC.ITEM_COST* CSD_RETURNS_BI_UTIL.CONVERT_INV_UOM( RCV.QUANTITY
, RCV.UOM_CODE
, MTL.PRIMARY_UOM_CODE
, NULL )) RECEIVED_VALUE
, GL.CURRENCY_CODE
FROM OE_ORDER_LINES_ALL OE
, OE_ORDER_HEADERS_ALL OH
, RCV_TRANSACTIONS RCV
, MTL_SYSTEM_ITEMS_KFV MTL
, CST_ITEM_COSTS CIC
, GL_SETS_OF_BOOKS GL
, HR_OPERATING_UNITS HR
, CSD_RETURN_STREAM_REASONS CSD
WHERE OE.HEADER_ID = OH.HEADER_ID
AND RCV.OE_ORDER_LINE_ID = OE.LINE_ID
AND RCV.OE_ORDER_HEADER_ID = OE.HEADER_ID
AND RCV.TRANSACTION_TYPE = 'DELIVER'
AND RCV.SOURCE_DOCUMENT_CODE = 'RMA'
AND MTL.INVENTORY_ITEM_ID = OE.INVENTORY_ITEM_ID
AND MTL.ORGANIZATION_ID = RCV.ORGANIZATION_ID
AND CIC.INVENTORY_ITEM_ID(+) = MTL.INVENTORY_ITEM_ID
AND CIC.ORGANIZATION_ID(+) = MTL.ORGANIZATION_ID
AND CIC.COST_TYPE_ID(+) = 1
AND HR.SET_OF_BOOKS_ID = GL.SET_OF_BOOKS_ID
AND HR.ORGANIZATION_ID = OE.ORG_ID
AND OE.RETURN_REASON_CODE = CSD.RETURN_REASON_CODE