Skip to Content
0

Repeated styles and quantity in SAP B1 9.1 Query

Nov 20, 2017 at 06:12 PM

20

avatar image
query-output.jpg

Hi Gurus,

Below query is giving me correct out on quantity but item code and item description is repeated. i want to see one time code having Total PO qty and what in stock.

Can you please advise what's wrong with this query.

Thanks

Shahzad Ahmed

SELECT

T1.[ItemCode], 
T1.[Dscription], 
sum(T1.[Quantity]) as 'PO QTY', 
T3.[OnHand] 

FROM 

ORDR T0  INNER JOIN RDR1 T1 ON T0.[DocEntry] = T1.[DocEntry] 
INNER JOIN OITM T2 ON T1.[ItemCode] = T2.[ItemCode] 
INNER JOIN OITW T3 ON T2.[ItemCode] = T3.[ItemCode] 

WHERE

 T0.[CardCode] = 'c00192' and
    T0.[NumAtCard]  Like '818276%%'  and
    T3.[WhsCode] = '161' 

GROUP BY T1.[ItemCode], T1.[Dscription], T1.[Quantity],  T3.[OnHand] 
query-output.jpg (252.4 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers