Skip to Content

Query needed for relating purchase order and purchase request

Dear Experts,

We need required columns from purchase order and purchase request

PR NO PR DATE ITEM DECRIPTION QTY P O NO PO DATE PO QTY

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Apr 12, 2017 at 11:37 AM

    Hi,

    try this query:

    SELECT T0.[DocNum] as 'Req-#', T0.[DocDate], T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[OpenQty], T3.DocNum as 'P.O-#', T3.DocDate as 'P.O-Date', T2.ItemCode, T2.OpenQty, T2.Shipdate
    FROM OPRQ T0 
    INNER JOIN PRQ1 T1 ON T0.[DocEntry] = T1.[DocEntry]
    LEFT JOIN POR1 T2 on T1.DocEntry = T2.BaseEntry and T2.baseType = '1470000113' and T1.ItemCode = T2.ItemCode
    LEFT JOIN OPOR T3 on T2.DocEntry = T3.DocEntry
    Add comment
    10|10000 characters needed characters exceeded