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

Query to get Parent and Child Accounts in Oracle APPS R12

SELECT ffv1.flex_value parent_account       ,ffvt1.description parent_account_desc   ,ffv2.flex_value child_account   ,ffvt2.description...