on 03-07-2015 1:53 PM
Hi,
I am looking for a query with following output:
Item Code, Warehouse Name, Bin No., Stock on Hand
The query should accept a Date parameter and should return the stock position on that date by item, warehouse and bin.
Thanks.
Hi Rajesh...
Try This
select t0.ItemCode , t5.ItemName, t4.OnHandQty ,t2.BinCode, t2.sl1code, t2.SL2Code, t0.WhsCode
FROM [dbo].[OITW] T0 left JOIN [dbo].[OITM] T1 ON T1.[ItemCode] = T0.[ItemCode]
inner join OIBQ t4 on t0.ItemCode = t4.ItemCode and T0.WhsCode = t4.WhsCode
left JOIN [dbo].[OITW] T3 ON T3.ItemCode = T0.ItemCode
inner JOIN [dbo].[OBIN] T2 ON t2.AbsEntry = t3.dftbinabs
inner join OITM t5 on t0.ItemCode = t5.ItemCode
WHERE T2.[SL1Code] Between '[%0]' AND '[%1]'
order by t2.sl1code, t2.SL2Code, t0.ItemCode
Rgds
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kennedy,
You have mentioned 4 tables in your query:
OITW, OITM, OBIN, OIBQ
OITM is for Item Master, and OBIN is for BIN master, I suppose
Can you briefly explain the other tables are for what?
Moreover how will this query give me the bin wise stock on a given date? Where is the date parameter, and where is the posting date of the document being referred in the query?
Thanks.
Hi Rajesh,
Check below link. It may achieve your requirement.
http://www.scn.sap.com/thread/3451574
Regards,
Chintan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That link does not give any information regarding what I am looking for.
Can you post the SQL query which will give me the desired result?
Can someone tell me which table contains the Bin Allocation data in the marketing documents or the Inventory documents, and how that table is linked to the main document header table which contains the Posting Date?
Thanks.
User | Count |
---|---|
104 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.