cancel
Showing results for 
Search instead for 
Did you mean: 

Query report of Bin location and Batch SAP Business One

former_member681067
Discoverer
0 Kudos
3,085

Hello all,

Please help me on query report for item wise batch details with it's bin location.

SAP Business One HANA

Regards,

Nikunj Mehta

View Entire Topic
MuhammadBilal
Discoverer
0 Kudos

Try the below query, Replace or Remove the item code as required.

Select x."ItemCode", x."BatchID", x."BatchNumber", x."ExpDate", x."BinLocation", x."Qty"
From(
Select a."ItemCode", a."SnBMDAbs" as "BatchID", c."DistNumber" as "BatchNumber", c."ExpDate", b."BinCode" as "BinLocation",
Sum(a."OnHandQty") as "Qty"
From OBBQ a
Inner Join OBIN b on b."AbsEntry" = a."BinAbs"
Inner Join OBTN c on c."AbsEntry" = a."SnBMDAbs" AND a."ItemCode" = c."ItemCode"
Where a."ItemCode" = '10001'
Group By a."ItemCode", a."SnBMDAbs", b."BinCode", c."DistNumber", c."ExpDate"
) as X
Where x."Qty" != 0