Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3116

Re: Store Procedure for blocking stock when is it null in Inventory transfer Request

$
0
0

Hi try with this,

 

IF @object_type= '1250000001' AND @transaction_type in ('A')

BEGIN

IF EXISTS (SELECT T0.DocEntry FROM [dbo].[WTQ1] T0, [dbo].[OITW] T1, dbo.[OWTQ] T2, dbo.[OWHS] T3 WHERE T3.WhsCode = T2.U_Test

and

T1.ItemCode = T0.ItemCode and T2.Filler = '2' and T1.OnHand <0 and T0.WhsCode = 'DS' and T2.DocEntry = T0.DocEntry  AND

T2.DOCENTRY= @list_of_cols_val_tab_del)

BEGIN

SELECT @Error = 1, @error_message = 'Insufficient Stock'

END

END


Thanks,

Harshal


Viewing all articles
Browse latest Browse all 3116

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>