Sunteți pe pagina 1din 3

SELECT (SELECT routing_name

FROM rcv_routing_headers
WHERE routing_header_id = rct.routing_header_id) receipt_routing
, msi.concatenated_segments part_num
, msi.inventory_item_id
, msi.description part_desc
, rct.quantity receipt_qty
, wpl.license_plate_number lpn
, pv.vendor_name supplier
, pha.segment1 purchase_order
, rct.creation_date current_date,
mmtt.transfer_subinventory tugger_route
FROM po_vendors pv
, po_headers_all pha
, rcv_transactions rct
, rcv_shipment_headers rsh
, rcv_shipment_lines rsl
, mtl_system_items_b_kfv msi
, wms_license_plate_numbers wpl
, mtl_material_transactions_temp mmtt
WHERE pv.vendor_id = pha.vendor_id
AND rct.po_header_id = pha.po_header_id
AND rct.shipment_header_id = rsh.shipment_header_id
AND rct.shipment_line_id = rsl.shipment_line_id
AND rsh.shipment_header_id = rsl.shipment_header_id
AND rsl.item_id = msi.inventory_item_id
AND rct.organization_id = msi.organization_id
AND msi.organization_id = :P_ORGANIZATION_ID
AND rct.transaction_type = 'RECEIVE'
-- and msi.concatenated_segments='5317164'
AND rct.transfer_lpn_id = wpl.lpn_id
AND rsh.receipt_num IS NOT NULL
--AND rct.shipment_header_id = p_shipment_header_id
-- AND rct.routing_header_id = 2
and wpl.license_plate_number='R3187972'
and mmtt.INVENTORY_ITEM_ID=
AND wpl.lpn_id = mmtt.lpn_id(+)

and rct.request_id = (
SELECT MAX(request_id)
FROM rcv_transactions
WHERE shipment_header_id = p_shipment_header_id

select * From mtl_system_items_b where segment1='5317164'

select * from wms_license_plate_numbers where


license_plate_number='R3187972'

select * from wms_license_plate_numbers wlp,


mtl_material_transactions_temp mmtt,
-- wms_dispatched_tasks wdt,
mtl_txn_request_lines mtr
where wlp.license_plate_number='R3187972'
AND wlp.lpn_id = mmtt.lpn_id(+)
-- AND mmtt.transaction_temp_id =
wdt.transaction_temp_id(+)
and mmtt.lpn_id=mtr.lpn_id(+)

AND wlp.lpn_id(+) = mmtt.lpn_id

select
* from wms_dispatched_tasks
where TRANSACTION_TEMP_ID='488912940'

SELECT * FROM mtl_material_transactions_temp mmtt,


-- wms_dispatched_tasks wdt,
wms_license_plate_numbers wlpn,
mtl_txn_request_lines mtr
WHERE 1=1
AND mmtt.organization_id =
:p_organization_id
-- AND mmtt.transaction_temp_id =
wdt.transaction_temp_id
-- AND wdt.organization_id =
:p_organization_id
AND wlpn.lpn_id = mmtt.lpn_id(+)
and
mmtt.INVENTORY_ITEM_ID=mtr.INVENTORY_ITEM_ID(+)
and wlpn.license_plate_number='R3187972'

select * From mtl_txn_request_lines where


LPN_id=3569207--- INVENTORY_ITEM_ID=99117 and FROM_SUBINVENTORY_CODE='S1'

select transfer_subinventory,TRANSFER_TO_LOCATION,a.*
FROM mtl_material_transactions_temp a
where
a.INVENTORY_ITEM_ID=96979---TRANSACTION_QUANTITY='50'

-------------------------------------

XXWMS5282_LOAD_UNLOAD_LPN_PKG

xxwms_receipt_lpn_label_pkg

select * From XXWMS_5282_LABEL_TAB where lpn='R3187972'

SELECT l.license_plate_number lpn


, m.transfer_lpn_id lpn_id
, m.transfer_subinventory to_sub
, TRANSFER_TO_LOCATION locator
--mil.segment1 ||'.'|| mil.segment2 locator
FROM wms_dispatched_tasks w
, mtl_material_transactions_temp m
, mtl_system_items_kfv i
, wms_license_plate_numbers l
, mtl_txn_request_lines mtrl
-- , mtl_item_locations mil
WHERE 1=1
AND w.organization_id = :p_organization_id
AND w.status = 4
AND w.transaction_temp_id = m.transaction_temp_id
AND m.organization_id = i.organization_id
AND m.inventory_item_id = i.inventory_item_id
AND m.organization_id = l.organization_id
AND w.task_type IN (1,4,5)
AND m.transfer_lpn_id = l.lpn_id
AND m.move_order_line_id = mtrl.line_id (+)
AND l.attribute10 IS NULL
--AND m.transfer_to_location = mil.inventory_location_id
AND (m.parent_line_id IS NULL
OR
(m.parent_line_id IS NOT NULL
AND
m.parent_line_id = m.transaction_temp_id
)
)
-- and m.transfer_subinventory='30'
and l.license_plate_number ='R3187972'
ORDER BY 1

)a
where a.lpn like 'R4931499';

S-ar putea să vă placă și