Monday, October 23, 2017

Query to get PO Number for Given Transaction ID

SELECT mmt.transaction_id,
  mmt.transaction_type_id,
  mmt.transaction_source_name,
  ph.segment1 "PO number"
FROM po_headers_all ph,
  rcv_transactions rt,
  mtl_material_transactions mmt
WHERE ph.po_header_id = rt.po_header_id
AND rt.transaction_id = mmt.trx_source_line_id
AND mmt.transaction_type_id = 28
AND mmt.transaction_source_name = 'LCM ADJUSTMENT'
AND mmt.transaction_id = 182997889 --Material Transaction ID

No comments:

Post a Comment

SupplierAddressImportTemplate.xlsm South Africa Suburb Field mapping in POZ_SUPPLIER_ADDRESSES_INT

Suburb mpping in Supplier Address Import Template will be mapped to Address Element Attribute2 (HZ_LOCATIONS. ADDR_ELEMENT_ATTRIBUTE2)