Skip to Content
0
Aug 25, 2023 at 07:50 AM

po line items to grpo

149 Views

i have 2 condtions in my query if my line item from po (container no) having a grpo so it should display 'shipment received' if no grpo so it should display 'no shipment received' need your expertie here please.

SELECT OPOR.DocNum , POR1.U_ContainerNo , CASE WHEN POR1.U_ContainerNo IS NOT NULL THEN 'Shipment Received' ELSE 'No Shipment Received' END FROM OPOR INNER JOIN POR1 ON POR1.DocEntry = OPOR.DocEntry LEFT JOIN OPDN ON OPOR.DocEntry = OPDN.DocEntry LEFT JOIN PDN1 ON POR1.DocEntry = PDN1.BaseEntry