Skip to Content
0

Link between opkl with ordr, Oinv, oldn

Sep 20, 2017 at 08:28 PM

149

avatar image

Is there any way to link opkl with any of the table ordr, oinv, oldn? i need a query which tells me pick list number against delivery or sales order.

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

1 Answer

Best Answer
DIEGO LOTHER Sep 20, 2017 at 09:02 PM
0

Hi Shahzad,

You can link OPKL with PKL1 and then link with the order(ORDR).

On PKL1 you are able to see the doc line (OrderLine), doc entry (OrderEntry) and document type (BaseObject)

SELECT 
	T0.AbsEntry,
	T1.PickEntry, 
	T1.OrderEntry,
	T1.OrderLine,
	T1.BaseObject
FROM
	OPKL T0
	INNER JOIN PKL1 T1 ON T0.AbsEntry = T1.AbsEntry

On result below, the line 0(PickEntry) of Pick list 15 (AbsEntry) is linked with Order (BaseObject = 17) with DocEntry 199 (OrderEntry) line 0 (OrderLine)

Then the link with ORDR

SELECT 
	T0.AbsEntry,
	T1.PickEntry, 
	T1.OrderEntry,
	T1.OrderLine,
	T1.BaseObject
FROM
	OPKL T0
	INNER JOIN PKL1 T1 ON T0.AbsEntry = T1.AbsEntry
	INNER JOIN RDR1 T2 ON T2.LineNum = T1.OrderLine AND T1.OrderEntry = T2.DocEntry AND T1.BaseObject = 17
	INNER JOIN ORDR T3 ON T3.DocEntry = T2.DocEntry

P.S: If you create your deliveries from pick lists you are able to see on line of delivery(DLN1) the picklist number used and then link DLN1.PickIdNo with OPKL.AbsEntry.

Hope it helps.

Kind Regards,

Diego Lother


img1.png (4.8 kB)
Show 3 Share
10 |10000 characters needed characters left characters exceeded

Bang On. Thanks Diego.

0

Hi Diego.

can we also link it with Invoice (OINV)?

0

Hi Shahzad,

Directly from PKL1 to OINV is not possible. But if your order was copy to a invoice is possible to connect the RDR1 with INV1 and then connect INV1 with OINV.

Hope it helps.

Kind Regards,

Diego Lother

0