Query to find the operating unit org_id for the blanket agreement header, the approval status, and the style id value.
select segment1, creation_date, po_header_id, org_id, authorization_status, style_id
from po_headers_all
where segment1 in ('&BPAorGBPA-Number')
order by po_header_id desc
Query to find the document styles, and style_allowed_values for various PURCHASE_BASES (Purchase Basis) values
select * from po_doc_style_values
where style_id in
(select distinct style_id
from po_headers_all
where segment1 in ('&BPAorGBPA-Number')
)
and STYLE_ATTRIBUTE_NAME = 'PURCHASE_BASES'
Query to find the line types that use the same Purchase Basis as those used on the BPA or GBPA
select * from po_line_types_b
where purchase_basis in
(
select distinct style_allowed_value from po_doc_style_values
where style_id in
(select distinct style_id
from po_headers_all
where segment1 in ('&BPAorGBPA-Number')
)
and STYLE_ATTRIBUTE_NAME = 'PURCHASE_BASES'
)
order by line_type_id
Comments
Post a Comment