on 01-04-2011 11:19 AM
Dear SAP Members,
I need a query to display a list of items having stock by considering all the marketing documents,goods receipt,BOM,Production Order,etc.
I have written query like this:
SELECT T0.[ItemCode], T0.[ItemName], T1.[ItmsGrpNam],T0.[OnHand],
T0.[IsCommited], T0.[OnOrder] FROM OITM T0 INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod
WHERE T1.[ItmsGrpNam] ='[%0]' or T0.[DfltWH] ='[%1]'
The issue is
The InStock shows the total by calculating all warehouses stock but i need the total for the default warehouse.
Plz suggest or modify my query if i have missed out any fields.
With Regards,
Revathy
Dear Gordon,BalaKumar and Neetu,
Thanks.Your Query is working fine but i need some modifications in that query.(i.e)For a parent item it shows the committed value but for a child item only if we raise the production order then only it is showing value in the committed column.Whether it is possible to create a query by considering all the child items also so that it will be better for production planning..
With Regards,
Revathy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Revathy,
Try this:
SELECT T0.[ItemCode], T0.[ItemName], T1.[ItmsGrpNam],T2.[OnHand],
T2.[IsCommited], T2.[OnOrder] FROM OITM T0 INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod
inner join OITW T2 on T2.ItemCode =T0.ItemCode and T0.[DfltWH] = T2.WhsCode
WHERE T1.[ItmsGrpNam] ='[%0]' and T2.WhsCode = [%1]
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this:
SELECT T0.[ItemCode], T0.[ItemName], T1.[ItmsGrpNam],T2.[OnHand],
T0.[IsCommited], T0.[OnOrder] FROM OITM T0 INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod
inner join OITW T2 on T2.ItemCode =T0.ItemCode
WHERE T1.[ItmsGrpNam] ='[%0]' and T2.WhsCode = [%1]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Revathy,
Try this
SELECT T0.[ItemCode], T0.[ItemName], T1.[ItmsGrpNam],T2.[OnHand],
T0.[IsCommited], T0.[OnOrder] FROM OITM T0 INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod
inner join OITW T2 on T2.ItemCode =T0.ItemCode
WHERE T1.[ItmsGrpNam] ='[%0]' and T0.[DfltWH] = T2.WhsCode
Or
SELECT T0.[ItemCode], T0.[ItemName], T1.[ItmsGrpNam],T2.[OnHand],
T0.[IsCommited], T0.[OnOrder] FROM OITM T0 INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod
inner join OITW T2 on T2.ItemCode =T0.ItemCode
WHERE T1.[ItmsGrpNam] ='[%0]' and T2.WhsCode ='[%1]'
Regards,
Bala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
3 | |
3 | |
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.