Friday, February 7, 2025

Query to check Standard Purchase Order linked with Blanket Agreement

 SELECT pha.segment1 po_number

, pha.type_lookup_code
, pha.enabled_flag
, fu.user_name standard_po_created_by
, pha.vendor_id
, pha.vendor_site_id
, pha.authorization_status
, pla.line_num
, pla.item_id
, pla.unit_price
, pla.quantity
, pla.from_header_id
, pla.from_line_id
, pha1.segment1 BPA_NUM
, pha1.global_agreement_flag
, pha1.type_lookup_code
, fu1.user_name bpa_created_by
, pha1.vendor_id
, pha1.vendor_site_id
, pha1.authorization_status
, pla1.item_id
, pla1.unit_price
, pla1.from_header_id
, pla1.from_line_id

FROM po_headers_all pha

, po_lines_all pla
, po_headers_all pha1
, po_lines_all pla1
, fnd_user fu
, fnd_user fu1

WHERE pha.po_header_id   = pla.po_header_id

  AND pla.from_header_id = pha1.po_header_id
  AND pla.from_line_id     = pla1.po_line_id
  AND pha.created_by       = fu.user_id
  AND pha1.created_by     = fu1.user_id
  --
  AND pha.segment1 IN ('5800999942', '5800999943')
  AND pla.line_num = 10;

---> Check at PO line level.. Columns - from header id and from line id, also the Global agreement flag should by Y for Blanket Agreement.

No comments:

Post a Comment

Query to get Concurrent Program Data Template details

 SELECT  fcpt.user_concurrent_program_name       , fcp.concurrent_program_name       , fet.user_executable_name executable_name       , fe....