cancel
Showing results for 
Search instead for 
Did you mean: 

Link between ODLN and ORDR?

Former Member
0 Kudos

I'm working on a report on sales order that also includes delivery information. I figured out that in order to do this I would need to link the ORDR with ODLN table. Does anyone know what the common key between them is?

Accepted Solutions (0)

Answers (2)

Answers (2)

Hi,

This is link between ORDR and ODLN :

SELECT t0.DocEntry,t1.LineNum
FROM ODLN t0
INNER JOIN DLN1 t1 ON t0.DocEntry=t1.DocEntry
LEFT JOIN RDR1 t2 ON t1.BaseEntry=t2.DocEntry AND t1.BaseLine=t2.LineNum AND t1.BaseType=17 --(17 is sales order object type)
LEFT JOIN ORDR t3 ON t2.DocEntry=t3.DocEntry

Hope this helps 🙂

Regards

former_member292966
Active Contributor
0 Kudos

Hi Vy,

Without knowing what program your database is coming from no one here can answer that question. This would be something you need to ask either your vendor that made the program or your database administrator.

Brian