Forum Discussion

bouyazbekj's avatar
bouyazbekj
Helper I
7 years ago
Solved

Help with relationships

Hello everyone, not sure if this is something that you can help me with but thought I'd give it a shot. 

 

Im trying to build a relationship based on how the query manager in SAP has them. 

 

FROM OPCH T0

LEFT JOIN PCH1 T1 ON T0.[DocEntry]=T1.[DocEntry]

LEFT JOIN OITM T2 ON T1.[ItemCode]=T2.[ItemCode]

LEFT JOIN PDN1 T5 ON T1.[BaseEntry]=T5.[DocEntry] AND T1.BaseLine = T5.LineNum

LEFT JOIN OPDN T3 ON T3.[DocEntry]=T5.[DocEntry]

LEFT JOIN POR1 T7 ON T5.[BaseEntry]=T7.[DocEntry] AND T5.BaseLine = T7.LineNum

LEFT JOIN OPOR T6 ON T7.[DocEntry]=T6.[DocEntry]

LEFT JOIN OACT T8 ON T7.[AcctCode]=T8.[AcctCode]

LEFT JOIN OACT T9 ON T1.[AcctCode]=T9.[AcctCode]

/* WHERE T0.[DocType] = 'I' AND T2.[InvntItem] ='Y' */
WHERE T0.[DocDate] >= [%0] AND T0.[DocDate] <= [%1]

 

Can anyone help me with all the table/column relationships? 

1 Reply