How to get the BPA number against to PO Number in Fusion:
SELECT
FromBlanketHeader.SEGMENT1 AS BPANUMBER,
FromBlanketHeader.attribute1
FROM
PO_LINES_ALL PurchasingDocumentLine,
PO_HEADERS_ALL PurchasingDocumentHeader,
PO_HEADERS_ALL ContractHeader,
PO_HEADERS_ALL FromBlanketHeader
WHERE
PurchasingDocumentLine.PO_HEADER_ID = PurchasingDocumentHeader.PO_HEADER_ID
AND PurchasingDocumentLine.CONTRACT_ID = ContractHeader.PO_HEADER_ID(+)
AND PurchasingDocumentLine.FROM_HEADER_ID = FromBlanketHeader.PO_HEADER_ID(+)
AND PurchasingDocumentHeader.SEGMENT1=:P_YOUR_PONUMBER
SELECT
FromBlanketHeader.SEGMENT1 AS BPANUMBER,
FromBlanketHeader.attribute1
FROM
PO_LINES_ALL PurchasingDocumentLine,
PO_HEADERS_ALL PurchasingDocumentHeader,
PO_HEADERS_ALL ContractHeader,
PO_HEADERS_ALL FromBlanketHeader
WHERE
PurchasingDocumentLine.PO_HEADER_ID = PurchasingDocumentHeader.PO_HEADER_ID
AND PurchasingDocumentLine.CONTRACT_ID = ContractHeader.PO_HEADER_ID(+)
AND PurchasingDocumentLine.FROM_HEADER_ID = FromBlanketHeader.PO_HEADER_ID(+)
AND PurchasingDocumentHeader.SEGMENT1=:P_YOUR_PONUMBER