cancel
Showing results for 
Search instead for 
Did you mean: 

Item Availabilty Check

Former Member
0 Kudos

Hi Guys

Has anyone else experienced that the item availability check does not work when using the copy to functionality from the Sales Quotation to Sales Order? Even if you select the qty cell and tab out of it?

What can be done to trigger the check on every order not just ones that have no base documents?

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Suda here is my stored proc, thanks for your help:

if( @object_type = 17 and(@transaction_type = 'A' or @transaction_type = 'U'))

begin

set @backorder = (select top(1) T0.itemcode from rdr1 T0 inner join oitw T1 on T0.WhsCode = T1.WhsCode where

(T0.Quantity >= T1.OnHand-T1.iscommited) and T0.itemcode = T1.itemcode and T0.docentry = @list_of_cols_val_tab_del )

if (@backorder is not null)

begin

set @error = 1

set @error_message = N'Item '@backorder' exceeds available quantity'

end

end

former_member583013
Active Contributor
0 Kudos

Did you try the one I had posted on the other thread and if you did what are you seeing..

Former Member
0 Kudos

Yes Suda i did, it gives the same error like mine, it says the item is not available even if there is actually stock, unless you actually put a value that is half the actual qty then it works, so for qty in stock of 5, only will allow orders of 2 or less.

What do you advise?

former_member583013
Active Contributor
0 Kudos

Could you paste the query I posted...I am not able to locate the thread..I will test it one more time and get back

Former Member
0 Kudos

IF @object_type = '17' AND @transaction_type IN ('A', 'U')

BEGIN

DECLARE @Item AS VARCHAR(20)

SELECT TOP 1 @Item = T1.ItemCode FROM [dbo].[RDR1] T1 INNER JOIN [dbo].[OITW] T0

ON T0.ItemCode = T1.ItemCode AND T0.WhsCode = T1.WhsCode

WHERE (T1.Quantity+T0.IsCommited) > T0.OnHand AND T0.DocEntry = @list_of_cols_val_tab_del

IF (@Item IS NOT NULL)

BEGIN

SELECT @error = 1, @error_message = 'Item '+ @Item +' exceeds available quantity'

END

END

thank you

former_member583013
Active Contributor
0 Kudos

Found the problem. It should be T1.DocEntry and not T0.DocEntry. Fixed below

IF @object_type = '17' AND @transaction_type IN ('A', 'U')
BEGIN
DECLARE @Item AS VARCHAR(20)
SELECT TOP 1 @Item = T1.ItemCode FROM [dbo].[RDR1] T1 INNER JOIN [dbo].[OITW] T0 
ON T0.ItemCode = T1.ItemCode AND T0.WhsCode = T1.WhsCode
WHERE (T1.Quantity+T0.IsCommited) > T0.OnHand AND T1.DocEntry = @list_of_cols_val_tab_del
IF (@Item IS NOT NULL)
BEGIN
SELECT @error = 1, @error_message = 'Item '+ @Item +' exceeds available quantity'
END
END

Former Member
0 Kudos

Hi Suda i tried that yesterday as i saw that, it still doesnt work?

im not sure y, i tried on demo db's as well but still not?

former_member583013
Active Contributor
0 Kudos

Did you try the one I just posted. I tested it on SBO_Demo and it worked fine

Suda

Former Member
0 Kudos

Hi Suda i have tested it, it still gets triggered for values that are not unavailable?

i have tried on 3 different dbs and same results. i am not sure why.

Former Member
0 Kudos

Hi Euston,

The feature that you are talking about does not work when you copy a Sales Quotation into a Sales Order. It will work if after copying, you change the quantity.

In order to activate this feature in each and every document, you do not have an in-built feature as such. But you can do what we have done. We have created a generic add-on (using SDK) and enabled this feature in all the documents.

Regards

Sudatta

Former Member
0 Kudos

Hi Euston,

My suggestion is using a user query to triger alert function. Because SP will stop any of short qty orders creation that might not be adequate. On the other hand, an alert is just like the desired function to ring a bell for you.

Thanks,

Gordon

Former Member
0 Kudos

Hi Gordon

I do require a sort of block to stop the back order, a alert is not sufficient, it could be a interim fix until i get the sales quote to order item availability check to work or i get my stored proc to work, there must never be back order but the users will try regardless, so i need a block not a "heads up" so to say.

Former Member
0 Kudos

You may face something unexpected by adding too many blocks in this SP. Take a caution.

former_member583013
Active Contributor
0 Kudos

What query do you currently have in your SP. Could you paste the same here.

Former Member
0 Kudos

Hi Guys

Does anyone know how to call the item availability check method? or actually simulate the action that triggers the item availability check in the order, i will try do this in the Transaction Notification.

jitin_chawla
Advisor
Advisor
0 Kudos

Hi,

Administration > System Initialization > Document Settings > Per Document Tab; select Sales Order from dropdown.

Activate Automatic Availability Check : Select to check the available quantities of items included in a sales order before it is added and to offer different solutions in case the available quantity is less than the quantity in the sales order.

Check this tickbox and see if it helps in your case.

Regards,

Jitin

Former Member
0 Kudos

i have done that, the check works ONLY when doing a sales order with no base document.

If there is a sales quotation that you have copied to a order the check doesn't work.

former_member583013
Active Contributor
0 Kudos

Hello Euston,

At this point, I think it is a system issue and if you are on the latest patch for your localization.....you should report this to SAP support so that they can look at it and fix in the next patch.

If you are not on the latest patch, you should try to upgrade or even before read the patch release noted to see the list of fixes.

Best wishes

Suda

Former Member
0 Kudos

Thank You Suda will do so.

Do you have any other idea of how negative inventory can be blocked in the system so the Sales People don not sell stock that we dont have, ie no back order?

former_member583013
Active Contributor
0 Kudos

In Document Settings..General tab...Check Block negative inventory

jitin_chawla
Advisor
Advisor
0 Kudos

Hi,

Block Negative inventory under Admin > System Initialization > General Settings > General tab

http://help.sap.com/saphelp_sbo2007a/helpdata/en/b1/8fe14910cf46b9b2ff2de2f315e5a2/frameset.htm

Rgds,

Jitin

Former Member
0 Kudos

Sorry i did not make myself clear, i mean to block sales orders not invoices, the negative inventory gets triggered on invoicing. i do not want goods to be ordered by the customer that are not physically in stock.

former_member583013
Active Contributor
0 Kudos

This as you seem to have already tried can be done only through SP Transaction Notification.

Suda

Former Member
0 Kudos

Ok thank you, yes i have tried but yet to succeed with the Stored Proc.

Former Member
0 Kudos

Hi Bishal

It does not check when added, the item availability check triggers when exiting the column when doing a sales order and the screen pops up. the issue is that from the sales quotation using the copy to functionality it doesnt check item availability at all.

Former Member
0 Kudos

Hi Euston,

It usually does when you add the document .

BTW ,Have you check Item Availabilty check from Document Setting -Per document --Sales Order --Item availabilty check

Thank you

Bishal