Skip to Content
0

Query needed for relating purchase order and purchase request

Apr 12, 2017 at 10:24 AM

185

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Markus Schaefer Apr 12, 2017 at 11:37 AM
1

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
Share
10 |10000 characters needed characters left characters exceeded