PO Type Definition
I have a PO that is of type "Blanket Purchase Agreement".
I am writing a query to get the type_name etc by matching the following tables:
po_headers_all poh, PO_DOCUMENT_TYPES_ALL_B PDT,PO_DOCUMENT_TYPES_ALL_TL PDTL
However, for each Document_TYPE, "BLANKET" there are 2 type_names i,e Blanket Release and Blanket Purchase Agreement
Can anyone tell me how to find the right match for the PO.
It should only be picking up the "Blanket Purchase Agreement" from the PO_DOCUMENT_TYPES_ALL_TL table.
Here is the query and can anyone help me to find the correct joins for the following query: