cancel
Showing results for 
Search instead for 
Did you mean: 

Link between opkl with ordr, Oinv, oldn

shahmed
Participant
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

former_member185682
Active Contributor
0 Kudos

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

shahmed
Participant
0 Kudos

Bang On. Thanks Diego.

shahmed
Participant
0 Kudos

Hi Diego.

can we also link it with Invoice (OINV)?

former_member185682
Active Contributor
0 Kudos

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

Answers (0)