Skip to Content
0

SAP B1 Query for Pick List

Jun 10, 2017 at 01:36 AM

166

avatar image
Former Member

Hi Experts,

My Client want me to create a query that summing up all items and qnty in my pick list

now i have a query but it seem it does not work the items is grouping by but the qnty is not summing

can you help me guys thanks sorry for my english

here my query

SELECT SUM(T1.PickQtty) AS 'QTY.',T2.Dscription As 'SKU' FROM OPKL T0 INNER JOIN PKL1 T1 ON T0.AbsEntry = T1.AbsEntry INNER JOIN RDR1 T2 on T2.PickIdNo = T0.AbsEntry and T1.OrderLine = T2.LineNum AND T1.OrderEntry = T2.DocEntry INNER JOIN ORDR T3 ON T2.DocEntry = T3.DocEntry and T3.ObjType = T1.BaseObject INNER JOIN OITM T4 ON T2.ItemCode = T4.ItemCode WHERE T0.AbsEntry = '[%0]' GROUP BY T2.Dscription ORDER BY T2.Dscription

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

2 Answers

DIEGO LOTHER Jun 10, 2017 at 10:11 PM
0

Hi Socrates,

The idea of your query is correct, why you thinks that the result is not correct? I did some adjust on your query.

SELECT 
	SUM(T1.PickQtty) AS 'QTY.',
	T2.Dscription As 'SKU' 
FROM 
	OPKL T0 
	INNER JOIN PKL1 T1 ON T0.AbsEntry = T1.AbsEntry 
	LEFT JOIN RDR1 T2 ON T2.DocEntry = T1.OrderEntry AND T1.OrderLine = T2.LineNum AND BaseObject = 17
	LEFT JOIN ORDR T3 ON T2.DocEntry = T3.DocEntry and T3.ObjType = T1.BaseObject 
WHERE 
	T0.AbsEntry = '[%0]' 
GROUP BY 
	T2.Dscription 
ORDER BY 
	T2.Dscription

Hope it helps.

Kind Regards,

Diego Lother

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Sorry My Mistake It's okay now

0
Former Member

But my Problem now is how can I connect to it to OBIN so I can show where location they pick the items any idea?

0
Nagarajan K Jun 12, 2017 at 04:06 AM
0

Hi,

No issue in your query. What is your expected result from your query?

Regards,

Nagarajan

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Sorry My Mistake It's okay now

0
Former Member

But my Problem now is how can I connect to it to OBIN so I can show where location they pick the items any idea?

0

Please close this thread by marking correct answer. Thanks

0