Zero stock query
hi experts,
how can i make a query that will display all items with zero stock?
I have tried linking OITM and OITW('manage by warehouse' is selected), and using the 'onhand' attribute, but with no success.
thanks
Michael
hi all,
thank you for your prompt answers. However this not what i am really looking for. I have already tried all the proposed solutions.
I need a query that will give all items with a sum of zero stock from all warehouses.
The reason is that i need to update each item so that it does not require the use of 'batches' anymore. And to do this, i need to be able to identify all items with zero stock from all warehouses, so that i can update them.
thanks
Michael
Similar Messages
-
Hi
I'm looking to generate a report that counts the number of days an item is at zero stock within each warehouse, over a specified time.
I've tried various ways yet seem to fail to get a concise report. Would anybody be able to help?Hi Gordon
Thank you for your response, and that query worked as expected once I realised that the Warehouse variable needed to be %1.
If you could help me a little further then that would be most kind?
I've amended the code to bring item descriptions (as below), but I really would like to go further.
1.
It would be important for me to select a date range, from and to, and the query to show the number of days out of stock. Would it be easier for the report to show in columns the stock level each day, and so I could see a pattern of gap periods? Either that or a count of zero stock days over a given period.
2.
I would also need to filter the results by certain item properties (Qrygroup), or am I asking too much!
Anyways this is where I got to:
Select T0.ItemCode, T0.[Dscription], sum(T0.InQty - T0.OutQty) as "Qty In/Out"
from dbo.OINM T0
Where T0.DocDate <= '[%0]' and T0.InQty != T0.OutQty and t0.Warehouse LIKE '%[%1]%'
Group by T0.[Dscription], T0.ItemCode Having sum(T0.InQty) = sum(T0.OutQty)
Order by T0.ItemCode
Many thanks
Andy -
Hi
Is any standard report to findout the zero stock in warehouse.
regards
RamachandraHi Ram,,
Plz chk MB5W.. Select the check box--materials with zero stock.
please reward suitable points,, if it answers your query.
regards,
sudhakar -
Items with zero stock quantity show negative stock value in Stock reports
When running Stock reports for controlling the stock value towards the GL accounts, some items appear with zero stock quantity, but the report still shows a stock value (negative value in my case)
How can this happen, and how can I correct this situation ?
System parameters are : negative stock is not allowed, Items with zero cost price not allowed. On item level average cost price method is used.
P.K.JohnsenHi Johnsen,
I believe you have checked the" Manage Inventory by warehouse". I have noticed this issue in SAP B1 2005B but this is rectified in 2007B. The system behaves in this way as the system maintains item cost for the item for all warehouses and even if the stock is not present in the warehouse, the system would still show you a value for the same. Hope this helps. please search the forum. You'll find related threads.
Thanks,
Joseph -
Opening +Receipts-isseue =Closing Stock Query
Dear Experts,
I need a query with condition from to date for stock movement.
Following Column I required in Query
Item code, Item description, Opening +Receipts-issue =Closing Stock Query
Thanks in Advance.
Regards
MANGESH PAGDAHRE.
Edited by: MANGESH PAGDHARE on Dec 2, 2011 11:04 AMHi
Here is the query
Declare @FromDate Datetime
Declare @ToDate Datetime
Declare @Whse nvarchar(10)
select @FromDate = min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >='[%0]'
select @ToDate = max(S1.Docdate) from dbo.OINM s1 where S1.Docdate <='[%1]'
select @Whse = Max(s2.Warehouse) from dbo.OINM S2 Where S2.Warehouse = '[%2]'
Select @Whse as 'Warehouse', a.Itemcode, max(a.Dscription) as ItemName,
sum(a.OpeningBalance) as OpeningBalance, sum(a.INq) as 'IN', sum(a.OUT) as OUT,
((sum(a.OpeningBalance) + sum(a.INq)) - Sum(a.OUT)) as Closing ,
(Select i.InvntryUom from OITM i where i.ItemCode=a.Itemcode) as UOM
from( Select N1.Warehouse, N1.Itemcode, N1.Dscription, (sum(N1.inqty)-sum(n1.outqty))
as OpeningBalance, 0 as INq, 0 as OUT From dbo.OINM N1
Where N1.DocDate < @FromDate and N1.Warehouse = @Whse Group By N1.Warehouse,N1.ItemCode,
N1.Dscription Union All select N1.Warehouse, N1.Itemcode, N1.Dscription, 0 as OpeningBalance,
sum(N1.inqty) , 0 as OUT From dbo.OINM N1 Where N1.DocDate >= @FromDate and N1.DocDate <= @ToDate
and N1.Inqty >0 and N1.Warehouse = @Whse Group By N1.Warehouse,N1.ItemCode,N1.Dscription
Union All select N1.Warehouse, N1.Itemcode, N1.Dscription, 0 as OpeningBalance, 0 , sum(N1.outqty) as OUT
From dbo.OINM N1 Where N1.DocDate >= @FromDate and N1.DocDate <=@ToDate and N1.OutQty > 0
and N1.Warehouse = @Whse Group By N1.Warehouse,N1.ItemCode,N1.Dscription) a, dbo.OITM I1
where a.ItemCode=I1.ItemCode
Group By a.Itemcode Having sum(a.OpeningBalance) + sum(a.INq) + sum(a.OUT) > 0 Order By a.Itemcode
Regards,
Sudhir B. -
Stock transfer with zero stock
Hi all,
Stock tranfer is happening with zero stock.
Is there any way to avoid this ?
Thanks
JeyakanthanHi Jeyakanthan,
If you have already selected 'Block below negative quantity', please check Item Master Data ->Stock Tab: checkbox for
'Manage Stock by Warehouse' is ticked or not.
With it ticked, the system considers the stock in each warehouse and none of the warehouses can go into negative stock for this item.
If this box is not ticked, the system calculates the overall stock availability and e.g. if you do a stock transfer for an item from warehouse A to warehouse B, you will never go into negative stock in an overall view for this particular item although it is negative in warehouse A.
To sum up, you need to check the box "Manage Inventory by Warehouse" in the "Item Master Data" and at the same time "Block below negative quantity" checkbox in the Document Settings in order to block negative quantity by warehouse.
I hope this answers your question.
Regards,
Ivy Zhang
SAP Business One Forums Team -
In help.sap.con the description of the Blocked stock query includes:
"The vendor consignment stock and the returnable transport packaging are non-valuated; therefore there are no associated stock value key figures for these quantity key figures."
What does this mean? ThanksThis means that it doesn't make sense to have a value for a stock that...is not yours !!!
Consignement stocks and returnable transport packaging are not on your property, so, you can monitor them only about qty, but not about their values...
Hope now is clearer...
Bye,
Roberto -
Hi All
Please find my requirement below:
I have created a program to confirm the TO. For this I'm calling L_TO_CONFIRM FM to confirm TO. But my client asks to perform Zero Stock Check, as in LT12, in my program befor TO confirm. Please tell me how to do this?
And, the condition for this is I need to check if the Bin doesn't have any more quantities. For this, I'm asked to activate this check when the TO quantity and BIN quantity is equal. Please tell me how to check this as well with Technical field names.
Thanks in advance.
SkysenHi,
you can get list of all quants for selected material with BAPI BAPI_WHSE_STOCK_GET_LIST. BAPI BAPI_WHSE_STOCK_GET_DETAIL will give you an information about quant. You should be able to do zero stock check from data retrieved by these two BAPIs. Another way is to debug LT12 to figure out how SAP does zero stock check.
Cheers -
Bins are getting blocked for putaway due to Zero Stock Check.
We have configured the system to do zero stock check. However, this blocks the bin for stock placement & removal till the TO is confirmed.
There could be a significant time lag between the TO creation and confirmation.
While the Bin is blocked for putaway , the receiving dock cannot putaway goods to the bin.
This is creating issues with the inventory movements around the WH.
Any ideas ?Hi,
In your storage type customization, the option 'Block upon stock plcmt' would have been set to 1, which blocks entire bin against goods movements. try set it to 2, it should work. -
Delete batches with zero stock from dropdown list
Hi All,
I have a requirement on batch stock materials.The exist program displaying multiple batches for material plant with stock and without stock in the drop down list for MCH1 table in the pop up window.
Now i would need to delete the batches with zero stock from drop down list.I could find the data for stock and non stock from MCHB table .
Any idea how to delete the entry of non stock batches from drop down list
Regards,
ReddyHi All,
The logic has already been implemented to for drop down list for all batches(with or without stock) for material plant.the follwing code has been written for the same.
Any idea how to delete the entry for non stck baches from the drop down list.
this is the code
SET PARAMETER ID 'MAT' FIELD help_lips-matnr.
SET PARAMETER ID 'WRK' FIELD help_lips-werks.
Export parameters to memory to enable search help via classes
CLEAR dseltab.
REFRESH dseltab.
dseltab-fldname = 'MANDT'.
MOVE sy-mandt TO dseltab-fldinh.
APPEND dseltab.
dseltab-fldname = 'MATNR'.
MOVE help_lips-matnr TO dseltab-fldinh.
APPEND dseltab.
dseltab-fldname = 'WERKS'.
MOVE help_lips-werks TO dseltab-fldinh.
APPEND dseltab.
dseltab-fldname = 'CHARG'.
MOVE help_lips-charg TO dseltab-fldinh.
APPEND dseltab.
EXPORT dseltab TO MEMORY ID 'DSELTAB'.
Get description for search help
mc_object = 'MCH1'.
lf_shlpname = mc_object.
CALL FUNCTION 'F4IF_GET_SHLP_DESCR'
EXPORTING
shlpname = lf_shlpname
shlptype = 'SH'
IMPORTING
shlp = lx_shlp
EXCEPTIONS
OTHERS = 1.
Enable value copy from search help to dynpro field
READ TABLE lx_shlp-interface INTO ls_interface
WITH KEY shlpfield = 'CHARG'.
ls_interface-valfield = 'X'.
MODIFY lx_shlp-interface FROM ls_interface INDEX sy-tabix.
Start search help dialog
CALL FUNCTION 'F4IF_START_VALUE_REQUEST'
EXPORTING
shlp = lx_shlp
TABLES
return_values = lt_retvalues
EXCEPTIONS
OTHERS = 1.
IF sy-subrc EQ 0.
READ TABLE lt_retvalues INTO ls_retvalue
WITH KEY fieldname = 'CHARG'.
IF sy-subrc EQ 0.
lips-charg = ls_retvalue-fieldval.
gs_lips-charg = ls_retvalue-fieldval.
ENDIF.
ENDIF.
Regards
Reddy -
Dear experts,
I have activated zero stock check for a storage type (V_T331_C KZNKO).
During TO confirmation (LT12), when I click the button ZERO STOCK CHECK, i get a pop-up and i click CONFIRM EMPTY BIN.
Then i get this error" Act.quantities and diff.quantities are not target quantities. Check entry. Message no. L3025"
Any ideas or advice?Hi guest,
See for this approach you need to know the expected messages which you want to display in more elaborated form. like the errors which occurs frequently can be displayed in more generic form.
When you catch the same error message you can replace the same in your program with a new message. For this approach you need to know what all messages you need to change.
For the second approach, where you can create a table there you can have the fields you have mentioned and in that table you can store the text of standard SAP message and the custom message. Then by fetching data from this table you can replace standard message by custom message.
Remember one thing that the standard SAP message will contain some fixed text along with some values. So remember that you need to store only the text which will remain same.
Hope this clarifies you a bit on your approach.
Thanks,
Swamy H P -
No Inventory record generated for zero stock check
Hi All,
The issue is no inventory record created for zero stock check.
prerequisite:
1. I activated the zero stock check for the storage type in warehouse,
2. I also activate the PZ inventory method for zero stock check for this storage type.
3. storage type is under with 'P -Storage unit type" putaway strategy.
Steps:
1. First time I moved the last SU out of the bin, it generated a physical inventory when creating the TO.
we can go to the item - other data of the TO, and found that hte inventory record created with "PN" inventory method. and the zero stock check indicator is 1.
2. Then I continued to confirmed the TO with empty bin check. the invetory record was cleared when confirmed the TO.
3. Then I moved that SU back to the same bin. (only has one SU in the bin)
4. Try to create the TO to move the SU out, the TO created, and if we go to TO item - other data, the Zero stock check indicator is 1, but this time, it doesn't create any inventory record?
Can anyone tell me why it didn't create the inventory record in the 2nd TO?
Thanks,i tried to replicate the case and got the same result that only first time inventory documen was created.
seems its standard behaviour and if the inventory is already done for the bin then it does not carry out again for the same bin automatically as it did earlier. -
Continuous inventory based on zero stock check doesn't work
Hello!
The contiunous inventory based on zero stock check doesn't work.
The problem is that I ticked both signs in the customizing for zero
stock check and it doesn't work. The box for zero stock check
appears, but if you check afterwards the inventory with LX25 nothing
is done.
Could the problem be that I my inventory method is PZ - continuous
inventory?
Help urgently needed!
ThanksNow I can see the problem - fault of a beginner!
I have not created any inventory document including this storage bins.
Now my question is, how to create this?
I have tried to create one for the continuous inventory stock, but I'm not able
to book any goods movement on it because it is locked.
Please help me how to create the inventory document, so that
the continuous inventory based on zero stock check works.
Kind regards,
Barbara -
Hello,
Can any one please brief me on Short Picking & Zero Stock Check...How do we do in SAP?....Are they two differenet?...Also How they are related to Backorder and a Partial Order in SAP.Friends,
Can any one help me on the above?..... -
Manual Zero Stock Check during TO confirmation in SAP 5.0
Dear All,
1.We have a requirement to do zero stock check for SU managed Bulk Storage type during TO confirmation. Is there any exit/enhancement which can help us achieve this? We hve used FM L_TA_QUITTIEREN for TO confirmation for bulk storage type.
2. We also want to do manual zero stock check during TO confirmation as we have same source SU in multiple TO line item in a TO. SAP note 22067 only says to do manual zero stock for this type of scenario. We are able to request empty bin in manual zero stock check. But unable to post any difference. Is there any exit or enhancement which will enable us to post difference during manual zero stock check?
Best Regards
DineshSolved Probelm on my own
Maybe you are looking for
-
How do I move photos from Pictures in Finder to the iPhotoLibrary?
I have a Mac OS X 10.9.4. How do I move photos I have downloaded and saved in the Pictures folder in Finder to the iPhotoLibrary? Thanks.
-
GL account doesnt exist in company code-error in Sub contracting PO.
While doing GR for the sub contracting PO, I am getting this error for line item 4: GL account 490237 is doesnot exist in company code 0600. 3 line items are already recieved to the GL account 490223 which is correct. for 4 th line item when i am go
-
Dynamic Image ONLY appearing in Safari
I am trying to create a page that uses a URL variable to get a value from a database and use it to display an image on a page. When I preview the page in Safari, the image appears. When I preview the page in Firefox or IE, the alt text appears instea
-
Cannot merge several PDF-documents
Hello dear adobe, I've had a rough time trying to figure this out. The scenario is the following: I'm the IT-guy within a huge company. Today I recieved a computer and a annoyed user complaining about our adobe acrobat standard 9. It seems like most
-
Loading ActiveX with panel after TestStand API
Hi, My problem is : With Labwindows CVI 8.5 and API TestStand, after loading TestStand by its API, i can't load another activeX control with associate panel. There is an activeX library error - 143 It seems to work when i load my activeX control befo