Skip to Content

Link between opkl with ordr, Oinv, oldn

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Sep 20, 2017 at 09:02 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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