Skip to Content
0
Jan 24, 2019 at 06:06 PM

OACT and OASC link issue

82 Views

Experts,

I need to add the Segment Details to a query and are getting duplicate lines on this query.... Results are attached.

Your assistance would be most welcome!

results.txt

SELECT T0.[DocNum], T0.[CtlAccount], T1.[AcctCode], T3.[SegmentId], T3.[Code], T3.[Name]

FROM OPCH T0
INNER JOIN PCH1 T1 ON T0.[DocEntry] = T1.[DocEntry]
Inner JOIN OACT T2 ON T0.[CtlAccount] = T2.[AcctCode]
RIGHT OUTER JOIN OASC T3 ON T2.Segment_1 = T3.Code

WHERE T0.[DocNum] = '161682' OR T0.[DocNum] = '161737' OR T0.[DocNum] = '161738'
AND (T3.SegmentID=1 AND T2.Segment_1 = T3.Code)

Attachments

results.txt (594 B)